static void Main(string[] args) { #pragma warning disable 436 #if LEADTOOLS_V19_OR_LATER if (!Support.SetLicense()) { return; } #else Support.SetLicense(); if (RasterSupport.KernelExpired) { return; } #endif #pragma warning restore 436 if (Elevation.Restart()) { DemosGlobal.TryRestartElevated(args); return; } Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); #if (LEADTOOLS_V20_OR_LATER) if (DemosGlobal.IsDotNet45OrLaterInstalled() == false) { MessageBox.Show("To run this application, you must first install Microsoft .NET Framework 4.5 or later.", "Microsoft .NET Framework 4.5 or later Required", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); return; } #endif try { Leadtools.Dicom.DicomEngine.Startup( ); Leadtools.Dicom.DicomNet.Startup( ); Application.ThreadException += new System.Threading.ThreadExceptionEventHandler(Application_ThreadException); WorkstationShellController.Instance.Run( ); } catch (Exception exception) { ViewErrorDetailsDialog detailedError; detailedError = new ViewErrorDetailsDialog(exception); detailedError.ShowDialog( ); } finally { Leadtools.Dicom.DicomEngine.Shutdown( ); Leadtools.Dicom.DicomNet.Shutdown( ); } }