public static void Main() { #if !DEBUG Application.ThreadException += new ThreadExceptionEventHandler(Application_ThreadException); Application.SetUnhandledExceptionMode( UnhandledExceptionMode.CatchException); AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException); #endif if (!IsOSSupported()) { Environment.Exit(0); } if (!AllRequiredFilesAvailable()) { Environment.Exit(0); } Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); using (GUI.MainForm form = new GUI.MainForm()) { form.FormClosed += delegate(Object sender, FormClosedEventArgs e) { Application.Exit(); }; Application.Run(); } }
public static void Main() { #if !DEBUG Application.ThreadException += new ThreadExceptionEventHandler(Application_ThreadException); Application.SetUnhandledExceptionMode( UnhandledExceptionMode.CatchException); AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException); #endif if (!IsOSSupported()) Environment.Exit(0); if (!AllRequiredFilesAvailable()) Environment.Exit(0); Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); using (GUI.MainForm form = new GUI.MainForm()) { form.FormClosed += delegate(Object sender, FormClosedEventArgs e) { Application.Exit(); }; Application.Run(); } }