예제 #1
0
        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();
            }
        }
예제 #2
0
        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();
            }
        }