【发布时间】:2014-06-28 18:04:50
【问题描述】:
如果 IsDownloaded 为 True,此代码将不会继续。如果 False 和 Return;,我如何正确弹出 MessageBox?如果我拿出'Return;'即使 IsDownloaded 为 True,RingToneTask 也不会发生。
private void ExecuteSaveSoundAsRingtone(string soundPath)
{
if (IsDownloaded == false)
MessageBox.Show("Will not download until you short press atleast once");
return;
App.Current.RootVisual.Dispatcher.BeginInvoke(() =>
{
SaveRingtoneTask task = new SaveRingtoneTask();
task.Source = new Uri("isostore:/" + this.SavePath);
task.DisplayName = this.Title;
task.Show();
}
);
【问题讨论】:
-
你问如何使用
if-statement?在这种情况下,请从学习 C# 开始 -
你的问题完全糊涂了。
标签: c# windows-phone-8 return messagebox