Beispiel #1
0
        static void Main(string[] Args)
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            // Add listeners
            System.Diagnostics.Trace.Listeners.Add(new System.Diagnostics.ConsoleTraceListener());
            // Detect languages
            DetectSupportedLanguages();
            // Load settings
            Settings = new Properties.Settings();
            Settings.Reload();
            // First run ?
            if (!Program.Settings.FirstRun)
            {
                FixFolders();
                FixPalette();
                ControlMappingSettings.BuildDefaultControlSettings();
                try
                {
                    FormFirstRun frm = new FormFirstRun();
                    frm.ShowDialog();

                    Program.Settings.FirstRun = true;
                }
                catch (Exception ex)
                {
                    MMB.ManagedMessageBox.ShowErrorMessage(ex.Message);
                }
            }
            // Set language
            Language        = Settings.Language;
            ResourceManager = new ResourceManager("MyNes.LanguageResources.Resource",
                                                  Assembly.GetExecutingAssembly());

            Program.Emulator = new Emulator(TVSystem.NTSC);

            // Start-up nes emulation engine
            Program.Emulator.WarmUp();

            // Create the main form
            FormMain = new FormMain(Program.Emulator);

            // Do command lines
            DoCommandLines(Args);

            // Run !
            Application.Run(FormMain);
        }
Beispiel #2
0
        static void Main(string[] Args)
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
        
            // Add listeners
            System.Diagnostics.Trace.Listeners.Add(new System.Diagnostics.ConsoleTraceListener());
            // Detect languages
            DetectSupportedLanguages();
            // Load settings
            Settings = new Properties.Settings();
            Settings.Reload();
            // First run ?
            if (!Program.Settings.FirstRun)
            {
                FixFolders();
                FixPalette();
                ControlMappingSettings.BuildDefaultControlSettings();
                try
                {
                    FormFirstRun frm = new FormFirstRun();
                    frm.ShowDialog();

                    Program.Settings.FirstRun = true;
                }
                catch (Exception ex)
                {
                    MMB.ManagedMessageBox.ShowErrorMessage(ex.Message);
                }
            }
            // Set language
            Language = Settings.Language;
            ResourceManager = new ResourceManager("MyNes.LanguageResources.Resource",
              Assembly.GetExecutingAssembly());

            // Start-up nes emulation engine
            MyNes.Core.NesEmu.WarmUp();

            // Create the main form
            FormMain = new FormMain();

            // Do command lines
            DoCommandLines(Args);

            // Run !
            Application.Run(FormMain);
        }