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(); }
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); })); }