예제 #1
0
        static void Main(string[] args)
        {
            bool terminate;

            LoadConfig(out terminate);
            if (terminate)
            {
                return;
            }

            LoadDBConfig(out terminate);
            if (terminate)
            {
                return;
            }


            if (args.Length == 0)
            {
                // For our application-idle task queue
                Application.Idle += new EventHandler(Application_Idle);

                // Called before RomDB.LoadDBs so if there is an error, the error window looks pretty. Yes, really.
                Application.EnableVisualStyles();

                // Load and parse all DBs
                RomDB.LoadDBs();

                Application.Run(new HashForm());
            }

            SaveConfig();
            // Database config is save when (and only when) user re-configured DBs
        }
예제 #2
0
        /// <summary>
        /// Displays a database config dialog to the users, and re-loads databases when the dialog is dismissed.
        /// </summary>
        internal static void ConfigureDatabases()
        {
            (new frmDBConfig()).ShowDialog();

            RomDB.UnloadDbs();
            Program.SaveConfig();
            SaveDBConfig();

            RomDB.LoadDBs();
        }