Exemplo n.º 1
0
 static void Main()
 {
     Application.EnableVisualStyles();
     Application.SetCompatibleTextRenderingDefault(false);
     try
     {
         Application.Run(new MainForm());
     }
     catch (Exception ex)
     {
         var form = new AppCrashForm();
         form.SetDetails(ex, "Aplicatia s-a inchis din cauza unor erori, doriti sa o reporniti?");
         if (form.ShowDialog() == DialogResult.Yes)
             Application.Run(new MainForm());
     }
 }
Exemplo n.º 2
0
 static void Main()
 {
     Application.EnableVisualStyles();
     Application.SetCompatibleTextRenderingDefault(false);
     try
     {
         Application.Run(new MainForm());
     }
     catch (Exception ex)
     {
         var form = new AppCrashForm();
         form.SetDetails(ex, "Aplicatia s-a inchis din cauza unor erori, doriti sa o reporniti?");
         if (form.ShowDialog() == DialogResult.Yes)
         {
             Application.Run(new MainForm());
         }
     }
 }
Exemplo n.º 3
0
 private void timerDbCon_Tick(object sender, EventArgs e)
 {
     try
     {
         new Utilizator().IsConnectionAvailable();
     }
     catch (Exception ex)
     {
         timerDbCon.Stop();
         loginWindow.Close();
         closeWithoutAskingFlag = true;
         var form = new AppCrashForm();
         form.SetDetails(ex, "Aplicatia s-a inchis din cauza lipsei de conexiune cu baza de date, doriti sa o reporniti?");
         if (form.ShowDialog() == DialogResult.Yes)
         {
             Application.Restart();
         }
         else
         {
             Application.Exit();
         }
     }
 }