Exemplo n.º 1
0
 private static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e)
 {
     if (!Debugger.IsAttached)
     {
         ToolkitExceptionHandler.ShowExceptionForm((Exception)e.ExceptionObject);
     }
 }
Exemplo n.º 2
0
 private static void Application_ThreadException(object sender, System.Threading.ThreadExceptionEventArgs e)
 {
     if (!Debugger.IsAttached)
     {
         ToolkitExceptionHandler.ShowExceptionForm(e.Exception);
     }
 }
Exemplo n.º 3
0
        static void Main(string[] args)
        {
            ToolkitAssemblyLoadContext.SetupLoadContext();
            ToolkitExceptionHandler.Initialise();

            if (args.Length > 0)
            {
                CheckINIExists();
                ToolkitSettings.ReadINI();
                ProcessCommandArguments(args);
                return;
            }

            Encoding.RegisterProvider(CodePagesEncodingProvider.Instance);
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            // Load INI
            CheckINIExists();
            ToolkitSettings.ReadINI();
            CheckIfNewUpdate();

            GameStorage.Instance.InitStorage();
            Language.ReadLanguageXML();
            CheckLatestRelease();

            if (ToolkitSettings.SkipGameSelector)
            {
                GameStorage.Instance.SetSelectedGameByIndex(ToolkitSettings.DefaultGame);
                OpenGameExplorer();
                return;
            }

            GameSelector selector = new GameSelector();

            if (selector.ShowDialog() == DialogResult.OK)
            {
                selector.Dispose();
                OpenGameExplorer();
            }
        }