Exemplo n.º 1
0
 private static void Main()
 {
     if (!SingleInstance.Start()) { return; }
     Application.EnableVisualStyles();
     Application.SetCompatibleTextRenderingDefault(false);
     try
     {
         esProviderFactory.Factory = new esDataProviderFactory();
         var applicationContext = new CustomApplicationContext();
         Application.Run(applicationContext);
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, "Program Terminated Unexpectedly",
             MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
     SingleInstance.Stop();
 }
Exemplo n.º 2
0
 private static void Main()
 {
     if (!SingleInstance.Start())
     {
         return;
     }
     Application.EnableVisualStyles();
     Application.SetCompatibleTextRenderingDefault(false);
     try
     {
         esProviderFactory.Factory = new esDataProviderFactory();
         var applicationContext = new CustomApplicationContext();
         Application.Run(applicationContext);
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, "Program Terminated Unexpectedly",
                         MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
     SingleInstance.Stop();
 }