Beispiel #1
0
 void Application_ThreadException(object sender, ThreadExceptionEventArgs e)
 {
     using (var dlg = new ExceptionDialog())
     {
         dlg.Exception = e.Exception;
         dlg.ShowDialog(this);
     }
 }
Beispiel #2
0
 private void backgroundWorker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
 {
     if (e.Error != null)
     {
         using (var dlg = new ExceptionDialog())
         {
             dlg.Exception = e.Error;
             dlg.ShowDialog(this);
         }
     }
     Text = AppTitle;
     runButton.Enabled = true;
     UseWaitCursor     = false;
     Activate();
 }