static void Main() { #if !DEBUG try { #endif // Checks the version of both the application and the DVTk library. // If one or both are a non-official or Alpha version, a warning message box is displayed. DvtkApplicationLayer.VersionChecker.CheckVersion(); DvtkApplicationLayer.DefinitionFilesChecker.CheckVersion("1.0.0", "2.0.0"); // Initialize the Dvtk library Dvtk.Setup.Initialize(); // Invoke the form and start the processing DCMCompareForm form = new DCMCompareForm(); form.ShowDialog(); // Terminate the Dvtk library Dvtk.Setup.Terminate(); #if !DEBUG } catch (Exception exception) { CustomExceptionHandler.ShowThreadExceptionDialog(exception); } #endif }
} // Main() /// <summary> /// Handle the UI exceptions by showing a dialog box, and asking the user whether /// or not they wish to abort execution. /// NOTE: This exception cannot be kept from terminating the application - it can only /// log the event, and inform the user about it. /// </summary> /// <param name="sender">The sender.</param> /// <param name="e">The <see cref="UnhandledExceptionEventArgs"/> instance /// containing the event data.</param> private static void OnCurrentDomainUnhandledException(object sender, UnhandledExceptionEventArgs e) { var result = CustomExceptionHandler.ShowThreadExceptionDialog( (Exception)e.ExceptionObject); if (result == DialogResult.Abort) { Application.Exit(); } // if } // OnCurrentDomainUnhandledException()
static void Main() { #if !DEBUG try { #endif // Checks the version of both the application and the DVTk library. // If one or both are a non-official or Alpha version, a warning message box is displayed. DvtkApplicationLayer.VersionChecker.CheckVersion(); Application.Run(new QRSCUEmulator()); #if !DEBUG } catch (Exception exception) { CustomExceptionHandler.ShowThreadExceptionDialog(exception); } #endif }