コード例 #1
0
 public async void ShowRedditDownMessage()
 {
     await Windows.ApplicationModel.Core.CoreApplication.MainView.CoreWindow.Dispatcher.RunAsync(CoreDispatcherPriority.Normal, async() =>
     {
         bool?showStatus = await ShowYesNoMessage("Reddit is Down", "It looks like reddit is down right now. Go outside for a while and try again in a few minutes.", "Check Reddit's Status", "Go Outside");
         if (showStatus.HasValue && showStatus.Value)
         {
             m_baconMan.ShowGlobalContent("http://www.redditstatus.com/");
         }
     });
 }
コード例 #2
0
ファイル: MessageManager.cs プロジェクト: wrhighfield/Baconit
 public async void ShowRedditDownMessage()
 {
     await Windows.ApplicationModel.Core.CoreApplication.MainView.CoreWindow.Dispatcher.RunAsync(CoreDispatcherPriority.Normal, async() =>
     {
         try
         {
             var showStatus = await ShowYesNoMessage("Reddit is Down", "It looks like reddit is down right now. Go outside for a while and try again in a few minutes.", "Check Reddit's Status", "Go Outside");
             if (showStatus.HasValue && showStatus.Value)
             {
                 _baconMan.ShowGlobalContent("http://www.redditstatus.com/");
             }
         }
         catch (Exception e)
         {
             TelemetryManager.ReportUnexpectedEvent(this, "FailedToShowMessage", e);
         }
     });
 }