Exemple #1
0
 private async void CurrentDomain_UnhandledException(object sender, System.UnhandledExceptionEventArgs e)
 {
     ContentDialog Dialog = new ContentDialog
     {
         Title             = "遇到了错误",
         Content           = e.ExceptionObject.ToString(),
         PrimaryButtonText = "退出"
     };
     ContentDialogResult result = await Dialog.ShowAsync();
 }
Exemple #2
0
 private void CurrentDomain_UnhandledException(object sender, System.UnhandledExceptionEventArgs e)
 {
     Crashes.TrackError((Exception)e.ExceptionObject);
     Common.Invoke((async() =>
     {
         ContentDialog Dialog = new ContentDialog
         {
             Title = "遇到了错误",
             Content = e.ExceptionObject.ToString(),
             PrimaryButtonText = "退出"
         };
         ContentDialogResult result = await Dialog.ShowAsync();
         Environment.Exit(0);
     }));
 }