private static void UnhandledExceptionsCatch(object sender, ThreadExceptionEventArgs e)
 {
     using (var dialog = new frmCrash(e.Exception))
     {
         if (dialog.ShowDialog() == DialogResult.Retry)
             Process.Start(Application.ExecutablePath);
     }
     Application.Exit();
 }
 private static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e)
 {
     using (var dialog = new frmCrash((Exception) e.ExceptionObject))
     {
         if (dialog.ShowDialog() == DialogResult.Retry)
             Process.Start(Application.ExecutablePath);
     }
     Application.Exit();
 }