Ejemplo n.º 1
0
 private static void Main()
 {
     ServicePointManager.ServerCertificateValidationCallback = new RemoteCertificateValidationCallback(Program.Validator);
     ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12 | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls;
     Application.EnableVisualStyles();
     Application.SetCompatibleTextRenderingDefault(false);
     logSystemDetails();
     MainWindow = new ConVPX.MainWindow();
     Application.Run(MainWindow);
     log.Info("Application main thread exited");
 }
Ejemplo n.º 2
0
 private static void FatalError()
 {
     log.Fatal(string.Format(Messages.MESSAGEBOX_PROGRAM_UNEXPECTED, DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), GetLogFile_()) + "\n" + Environment.StackTrace);
     ConVPX.MainWindow mainWindow = MainWindow;
     if (mainWindow == null)
     {
         log.Fatal("Program.MainWindow is null");
     }
     else
     {
         log.FatalFormat("Program.MainWindow.Visible == {0}", mainWindow.Visible);
         log.FatalFormat("Program.MainWindow.InvokeRequired == {0}", mainWindow.InvokeRequired);
         log.FatalFormat("CurrentThread.Name == {0}", Thread.CurrentThread.Name);
     }
 }