예제 #1
0
 private static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e)
 {
     using ErrorCatcher ec = new ErrorCatcher((Exception)e.ExceptionObject)
           {
               Enabled = true
           };
     ec.ShowDialog();
 }
예제 #2
0
        private static void Main()
        {
            try {
                AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException;
                CultureInfo.DefaultThreadCurrentCulture     = new CultureInfo("en-US");
                Directory.SetCurrentDirectory(AppDomain.CurrentDomain.BaseDirectory);
                Initialize();
                Application.EnableVisualStyles();
                Application.SetCompatibleTextRenderingDefault(false);

                CheckFonts();
                Launcher = new Launcher();
                Application.Run(Launcher);
            } catch (Exception e) {
                using ErrorCatcher ec = new ErrorCatcher(e)
                      {
                          Enabled = true
                      };
                ec.ShowDialog();
            }
        }