Exemple #1
0
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            try
            {
                LanguageManager.SetLanguage(new CultureInfo(Settings.Default.Language));
            }
            catch (Exception)
            {
                LanguageManager.SetLanguage(new CultureInfo("en-US"));

                // TODO: Write the exception to log file.
            }

            Launcher launcher = new Launcher();

            Application.Run(launcher);

            if (launcher.IsSafe == true)
            {
                launcher.Dispose();
                Application.Run(new Main());
            }
        }
Exemple #2
0
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            try
            {
                LanguageManager.SetLanguage(new CultureInfo(Settings.Default.Language));
            }
            catch (Exception)
            {
                LanguageManager.SetLanguage(new CultureInfo("en-US"));

                // TODO: Write the exception to log file.
            }

            Launcher launcher = new Launcher();
            Application.Run(launcher);

            if (launcher.IsSafe == true)
            {
                launcher.Dispose();
                Application.Run(new Main());
            }
        }
Exemple #3
0
        static void Main()
        {
            Application.ThreadException += new ThreadExceptionEventHandler(ExceptionHandler.UIThreadException);

            Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException);
            AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(ExceptionHandler.UnhandledException);

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            Localization.Culture = new CultureInfo(Settings.Default.Language);

            Launcher launcher = new Launcher();

            launcher.ShowDialog();

            if (launcher.IsSafe == true)
            {
                launcher.Dispose();
                Application.Run(new Main());
            }
        }