コード例 #1
0
 public N64ControllersSetup(
     IMainFormForConfig mainForm,
     N64SyncSettings syncSettings)
 {
     _mainForm     = mainForm;
     _syncSettings = syncSettings;
     InitializeComponent();
     Icon = Properties.Resources.GameController_MultiSize;
 }
コード例 #2
0
 public ZxSpectrumJoystickSettings(
     IMainFormForConfig mainForm,
     ZXSpectrum.ZXSpectrumSyncSettings syncSettings)
 {
     _mainForm     = mainForm;
     _syncSettings = syncSettings;
     InitializeComponent();
     Icon = Properties.Resources.GameController_MultiSize;
 }
コード例 #3
0
        public NdsSyncSettings(
            IMainFormForConfig mainForm,
            MelonDS.MelonSyncSettings syncSettings)
        {
            _mainForm     = mainForm;
            _syncSettings = syncSettings;

            InitializeComponent();
        }
コード例 #4
0
 public ZxSpectrumAudioSettings(
     IMainFormForConfig mainForm,
     ZXSpectrum.ZXSpectrumSettings settings)
 {
     _mainForm = mainForm;
     _settings = settings;
     InitializeComponent();
     Icon = Properties.Resources.GameControllerIcon;
 }
コード例 #5
0
 public IntvControllerSettings(
     IMainFormForConfig mainForm,
     Intellivision.IntvSyncSettings syncSettings)
 {
     _mainForm     = mainForm;
     _syncSettings = syncSettings;
     InitializeComponent();
     Icon = Properties.Resources.GameControllerIcon;
 }
コード例 #6
0
 public ZxSpectrumCoreEmulationSettings(
     IMainFormForConfig mainForm,
     ZXSpectrum.ZXSpectrumSyncSettings syncSettings)
 {
     _mainForm     = mainForm;
     _syncSettings = syncSettings;
     InitializeComponent();
     Icon = Properties.Resources.GameControllerIcon;
 }
コード例 #7
0
 public AmstradCpcNonSyncSettings(
     IMainFormForConfig mainForm,
     AmstradCPC.AmstradCPCSettings settings)
 {
     _mainForm = mainForm;
     _settings = settings;
     InitializeComponent();
     Icon = Properties.Resources.GameControllerIcon;
 }
コード例 #8
0
 public ColecoControllerSettings(
     IMainFormForConfig mainForm,
     ColecoVision.ColecoSyncSettings settings)
 {
     _mainForm     = mainForm;
     _syncSettings = settings;
     InitializeComponent();
     Icon = Properties.Resources.GameControllerIcon;
 }
コード例 #9
0
ファイル: SNESControllerConfig.cs プロジェクト: gocha/BizHawk
 public SNESControllerSettings(
     IMainFormForConfig mainForm,
     LibsnesCore.SnesSyncSettings syncSettings)
 {
     _mainForm     = mainForm;
     _syncSettings = syncSettings;
     InitializeComponent();
     Icon = Properties.Resources.GameControllerIcon;
 }
コード例 #10
0
 public TI83PaletteConfig(
     IMainFormForConfig mainForm,
     TI83.TI83Settings settings)
 {
     _mainForm = mainForm;
     _settings = settings;
     InitializeComponent();
     Icon = Properties.Resources.calculator_MultiSize;
 }
コード例 #11
0
ファイル: A7800FilterSettings.cs プロジェクト: gocha/BizHawk
 public A7800FilterSettings(
     IMainFormForConfig mainForm,
     A7800Hawk.A7800SyncSettings syncSettings)
 {
     _mainForm     = mainForm;
     _syncSettings = syncSettings;
     InitializeComponent();
     Icon = Properties.Resources.GameControllerIcon;
 }
コード例 #12
0
 public PSXControllerConfig(
     IMainFormForConfig mainForm,
     Octoshock.SyncSettings syncSettings)
 {
     _mainForm     = mainForm;
     _syncSettings = syncSettings;
     InitializeComponent();
     Icon = Properties.Resources.GameControllerIcon;
 }
コード例 #13
0
        //private Bitmap _bmp;

        public NESGraphicsConfig(
            IMainFormForConfig mainForm,
            Config config,
            NES.NESSettings settings)
        {
            _mainForm = mainForm;
            _config   = config;
            _settings = settings;
            InitializeComponent();
        }
コード例 #14
0
        public ZxSpectrumPokeMemory(
            IMainFormForConfig mainForm,
            ZXSpectrum speccy)
        {
            _mainForm = mainForm;
            _speccy   = speccy;

            InitializeComponent();
            Icon = Properties.Resources.GameController_MultiSize;
        }
コード例 #15
0
ファイル: QuickNesConfig.cs プロジェクト: tutifrutas/BizHawk
 public QuickNesConfig(
     IMainFormForConfig mainForm,
     Config config,
     QuickNES.QuickNESSettings settings)
 {
     _mainForm = mainForm;
     _config   = config;
     _settings = settings;
     InitializeComponent();
     Icon = Properties.Resources.QuickNesIcon;
 }
コード例 #16
0
 public ProfileConfig(
     IMainFormForConfig mainForm,
     IEmulator emulator,
     Config config)
 {
     _mainForm = mainForm;
     _emulator = emulator;
     _config   = config;
     InitializeComponent();
     Icon = Properties.Resources.ProfileIcon;
 }
コード例 #17
0
        public static void DoSettingsDialog(IMainFormForConfig mainForm, BsnesCore bsnes)
        {
            var s  = bsnes.GetSettings();
            var ss = bsnes.GetSyncSettings();

            using var dlg = new BSNESOptions
                  {
                      AlwaysDoubleSize = s.AlwaysDoubleSize,
                      CropSGBFrame     = s.CropSGBFrame,
                      Entropy          = ss.Entropy,
                      Hotfixes         = ss.Hotfixes,
                      FastPPU          = ss.FastPPU,
                      UseSGB2          = ss.UseSGB2,
                      ShowObj1         = s.ShowOBJ_0,
                      ShowObj2         = s.ShowOBJ_1,
                      ShowObj3         = s.ShowOBJ_2,
                      ShowObj4         = s.ShowOBJ_3,
                      ShowBg1_0        = s.ShowBG1_0,
                      ShowBg1_1        = s.ShowBG1_1,
                      ShowBg2_0        = s.ShowBG2_0,
                      ShowBg2_1        = s.ShowBG2_1,
                      ShowBg3_0        = s.ShowBG3_0,
                      ShowBg3_1        = s.ShowBG3_1,
                      ShowBg4_0        = s.ShowBG4_0,
                      ShowBg4_1        = s.ShowBG4_1
                  };

            DialogResult result = mainForm.ShowDialogAsChild(dlg);

            if (result == DialogResult.OK)
            {
                s.AlwaysDoubleSize = dlg.AlwaysDoubleSize;
                s.CropSGBFrame     = dlg.CropSGBFrame;
                ss.Entropy         = dlg.Entropy;
                ss.Hotfixes        = dlg.Hotfixes;
                ss.FastPPU         = dlg.FastPPU;
                ss.UseSGB2         = dlg.UseSGB2;
                s.ShowOBJ_0        = dlg.ShowObj1;
                s.ShowOBJ_1        = dlg.ShowObj2;
                s.ShowOBJ_2        = dlg.ShowObj3;
                s.ShowOBJ_3        = dlg.ShowObj4;
                s.ShowBG1_0        = dlg.ShowBg1_0;
                s.ShowBG1_1        = dlg.ShowBg1_1;
                s.ShowBG2_0        = dlg.ShowBg2_0;
                s.ShowBG2_1        = dlg.ShowBg2_1;
                s.ShowBG3_0        = dlg.ShowBg3_0;
                s.ShowBG3_1        = dlg.ShowBg3_1;
                s.ShowBG4_0        = dlg.ShowBg4_0;
                s.ShowBG4_1        = dlg.ShowBg4_1;

                mainForm.PutCoreSettings(s);
                mainForm.PutCoreSyncSettings(ss);
            }
        }
コード例 #18
0
ファイル: PSXOptions.cs プロジェクト: HenJigg/BizHawk
        public static DialogResult DoSettingsDialog(IMainFormForConfig mainForm, Config config, Octoshock psx)
        {
            var s    = psx.GetSettings();
            var ss   = psx.GetSyncSettings();
            var vid  = psx.SystemVidStandard;
            var size = psx.CurrentVideoSize;

            using var dlg = new PSXOptions(mainForm, config, s, ss, vid, size);

            var result = mainForm.ShowDialogAsChild(dlg);

            return(result);
        }
コード例 #19
0
ファイル: FirmwaresConfig.cs プロジェクト: HenJigg/BizHawk
        public FirmwaresConfig(
            FirmwareManager firmwareManager,
            IDictionary <string, string> firmwareUserSpecifications,
            IMainFormForConfig mainForm,
            PathEntryCollection pathEntries,
            bool retryLoadRom    = false,
            string reloadRomPath = null)
        {
            _firmwareUserSpecifications = firmwareUserSpecifications;
            _mainForm    = mainForm;
            _pathEntries = pathEntries;
            Manager      = firmwareManager;

            InitializeComponent();

            tbbGroup.Image
                          = tbbScan.Image
                          = tbbOrganize.Image
                          = tbbImport.Image
                          = tbbClose.Image
                          = tbbCloseReload.Image
                          = tbbOpenFolder.Image = Resources.Placeholder;

            // prep ImageList for ListView
            imageList1.Images.AddRange(new Image[]
            {
                Resources.RetroQuestion,
                Resources.ExclamationRed,
                Resources.GreenCheck,
                Resources.ThumbsDown,
            });
            // these constants are used for items' ImageIndex, the order matters
            Debug.Assert(imageList1.Images[IdUnsure] == Resources.RetroQuestion);
            Debug.Assert(imageList1.Images[IdMissing] == Resources.ExclamationRed);
            Debug.Assert(imageList1.Images[IdOk] == Resources.GreenCheck);
            Debug.Assert(imageList1.Images[IdBad] == Resources.ThumbsDown);

            _listViewSorter = new ListViewSorter(-1);

            if (retryLoadRom)
            {
                toolStripSeparator1.Visible = true;
                tbbCloseReload.Visible      = true;
                tbbCloseReload.Enabled      = true;


                tbbCloseReload.ToolTipText = string.IsNullOrWhiteSpace(reloadRomPath)
                                        ? "Close Firmware Manager and reload ROM"
                                        : $"Close Firmware Manager and reload {reloadRomPath}";
            }
        }
コード例 #20
0
ファイル: PSXOptions.cs プロジェクト: HenJigg/BizHawk
        private PSXOptions(
            IMainFormForConfig mainForm,
            Config config,
            Octoshock.Settings settings,
            Octoshock.SyncSettings syncSettings,
            OctoshockDll.eVidStandard vidStandard,
            Size currentVideoSize)
        {
            InitializeComponent();
            _mainForm             = mainForm;
            _config               = config;
            _settings             = settings;
            _syncSettings         = syncSettings;
            _previewVideoStandard = vidStandard;
            _previewVideoSize     = currentVideoSize;

            if (_previewVideoStandard == OctoshockDll.eVidStandard.NTSC)
            {
                lblNTSC.Font = new Font(lblNTSC.Font, FontStyle.Bold);
            }
            else
            {
                lblPAL.Font = new Font(lblPAL.Font, FontStyle.Bold);
            }

            _lblPixelProText        = lblPixelPro.Text;
            _lblMednafenText        = lblMednafen.Text;
            _lblTweakedMednafenText = lblTweakedMednafen.Text;

            rbPixelPro.Checked            = _settings.ResolutionMode == Octoshock.eResolutionMode.PixelPro;
            rbDebugMode.Checked           = _settings.ResolutionMode == Octoshock.eResolutionMode.Debug;
            rbMednafenMode.Checked        = _settings.ResolutionMode == Octoshock.eResolutionMode.Mednafen;
            rbTweakedMednafenMode.Checked = _settings.ResolutionMode == Octoshock.eResolutionMode.TweakedMednafen;
            rbClipNone.Checked            = _settings.HorizontalClipping == Octoshock.eHorizontalClipping.None;
            rbClipBasic.Checked           = _settings.HorizontalClipping == Octoshock.eHorizontalClipping.Basic;
            rbClipToFramebuffer.Checked   = _settings.HorizontalClipping == Octoshock.eHorizontalClipping.Framebuffer;

            cbLEC.Checked    = _syncSettings.EnableLEC;
            cbGpuLag.Checked = _settings.GPULag;

            rbWeave.Checked     = _settings.DeinterlaceMode == Octoshock.eDeinterlaceMode.Weave;
            rbBob.Checked       = _settings.DeinterlaceMode == Octoshock.eDeinterlaceMode.Bob;
            rbBobOffset.Checked = _settings.DeinterlaceMode == Octoshock.eDeinterlaceMode.BobOffset;

            NTSC_FirstLineNumeric.Value = _settings.ScanlineStart_NTSC;
            NTSC_LastLineNumeric.Value  = _settings.ScanlineEnd_NTSC;
            PAL_FirstLineNumeric.Value  = _settings.ScanlineStart_PAL;
            PAL_LastLineNumeric.Value   = _settings.ScanlineEnd_PAL;
        }
コード例 #21
0
 public PathConfig(
     FirmwareManager firmwareManager,
     IDictionary <string, string> firmwareUserSpecifications,
     IGameInfo game,
     IMainFormForConfig mainForm,
     PathEntryCollection pathEntries)
 {
     _firmwareManager            = firmwareManager;
     _firmwareUserSpecifications = firmwareUserSpecifications;
     _game        = game;
     _mainForm    = mainForm;
     _pathEntries = pathEntries;
     InitializeComponent();
     SpecialCommandsBtn.Image = Properties.Resources.Help;
 }
コード例 #22
0
 public static void DoDialog(
     IMainFormForConfig owner,
     string title,
     bool isMovieActive,
     bool hideSettings,
     bool hideSyncSettings)
 {
     using var dlg = new GenericCoreConfig(
               owner,
               isMovieActive: isMovieActive,
               ignoreSettings: hideSettings,
               ignoreSyncSettings: hideSyncSettings)
           {
               Text = title,
           };
     owner.ShowDialogAsChild(dlg);
 }
コード例 #23
0
        private GenericCoreConfig(
            IMainFormForConfig mainForm,
            bool isMovieActive,
            bool ignoreSettings     = false,
            bool ignoreSyncSettings = false)
        {
            InitializeComponent();
            _mainForm = mainForm;

            var settable = new SettingsAdapter(_mainForm.Emulator);

            if (settable.HasSettings && !ignoreSettings)
            {
                _s = settable.GetSettings();
            }

            if (settable.HasSyncSettings && !ignoreSyncSettings)
            {
                _ss = settable.GetSyncSettings();
            }

            if (_s != null)
            {
                propertyGrid1.SelectedObject = _s;
                propertyGrid1.AdjustDescriptionHeightToFit();
            }
            else
            {
                tabControl1.TabPages.Remove(tabPage1);
            }

            if (_ss != null)
            {
                propertyGrid2.SelectedObject = _ss;
                propertyGrid2.AdjustDescriptionHeightToFit();
            }
            else
            {
                tabControl1.TabPages.Remove(tabPage2);
            }

            if (isMovieActive)
            {
                propertyGrid2.Enabled = false;                 // disable changes to sync setting when movie, so as not to confuse user
            }
        }
コード例 #24
0
        public static void DoGBPrefsDialog(IMainFormForConfig mainForm, Config config, IGameInfo game, IMovieSession movieSession, Gameboy gb)
        {
            var s  = gb.GetSettings();
            var ss = gb.GetSyncSettings();

            using var dlg = new GBPrefs(mainForm.DialogController);
            dlg.gbPrefControl1.PutSettings(config, game, movieSession, s, ss);
            dlg.gbPrefControl1.ColorGameBoy = gb.IsCGBMode() && (!gb.IsCGBDMGMode() || ss.EnableBIOS);
            if (mainForm.ShowDialogAsChild(dlg).IsOk())
            {
                dlg.gbPrefControl1.GetSettings(out s, out ss);
                gb.PutSettings(s);
                if (dlg.gbPrefControl1.SyncSettingsChanged)
                {
                    mainForm.PutCoreSyncSettings(ss);
                }
            }
        }
コード例 #25
0
ファイル: GBPrefs.cs プロジェクト: zcatt/BizHawk
        public static void DoGBPrefsDialog(IMainFormForConfig mainForm, Gameboy gb)
        {
            var s  = gb.GetSettings();
            var ss = gb.GetSyncSettings();

            using var dlg = new GBPrefs();
            dlg.gbPrefControl1.PutSettings(s, ss);
            dlg.gbPrefControl1.ColorGameBoy = gb.IsCGBMode();
            if (mainForm.ShowDialogAsChild(dlg) == DialogResult.OK)
            {
                dlg.gbPrefControl1.GetSettings(out s, out ss);
                gb.PutSettings(s);
                if (dlg.gbPrefControl1.SyncSettingsChanged)
                {
                    mainForm.PutCoreSyncSettings(ss);
                }
            }
        }
コード例 #26
0
        public NesControllerSettings(
            IMainFormForConfig mainForm,
            NES.NESSyncSettings syncSettings)
        {
            _mainForm     = mainForm;
            _syncSettings = syncSettings;
            InitializeComponent();
            Icon = Properties.Resources.GameControllerIcon;

            // TODO: use combobox extension and add descriptions to enum values
            comboBoxFamicom.Items.AddRange(NESControlSettings.GetFamicomExpansionValues().Cast <object>().ToArray());
            comboBoxNESL.Items.AddRange(NESControlSettings.GetNesPortValues().Cast <object>().ToArray());
            comboBoxNESR.Items.AddRange(NESControlSettings.GetNesPortValues().Cast <object>().ToArray());

            comboBoxFamicom.SelectedItem = _syncSettings.Controls.FamicomExpPort;
            comboBoxNESL.SelectedItem    = _syncSettings.Controls.NesLeftPort;
            comboBoxNESR.SelectedItem    = _syncSettings.Controls.NesRightPort;
            checkBoxFamicom.Checked      = _syncSettings.Controls.Famicom;
        }
コード例 #27
0
        public FirmwaresConfig(
            FirmwareManager firmwareManager,
            IDictionary <string, string> firmwareUserSpecifications,
            IGameInfo game,
            IMainFormForConfig mainForm,
            PathEntryCollection pathEntries,
            bool retryLoadRom    = false,
            string reloadRomPath = null)
        {
            _firmwareUserSpecifications = firmwareUserSpecifications;
            _game        = game;
            _mainForm    = mainForm;
            _pathEntries = pathEntries;
            Manager      = firmwareManager;

            InitializeComponent();

            tbbGroup.Image
                          = tbbScan.Image
                          = tbbOrganize.Image
                          = tbbImport.Image
                          = tbbClose.Image
                          = tbbCloseReload.Image
                          = tbbOpenFolder.Image = Resources.Placeholder;

            // prep ImageList for ListView with 3 item states for {idUnsure, idMissing, idOk}
            imageList1.Images.AddRange(new Image[] { Resources.RetroQuestion, Resources.ExclamationRed, Resources.GreenCheck });

            _listViewSorter = new ListViewSorter(-1);

            if (retryLoadRom)
            {
                toolStripSeparator1.Visible = true;
                tbbCloseReload.Visible      = true;
                tbbCloseReload.Enabled      = true;


                tbbCloseReload.ToolTipText = string.IsNullOrWhiteSpace(reloadRomPath)
                                        ? "Close Firmware Manager and reload ROM"
                                        : $"Close Firmware Manager and reload {reloadRomPath}";
            }
        }
コード例 #28
0
ファイル: DGBPrefs.cs プロジェクト: xHailFirex/BizHawk
        public static void DoDGBPrefsDialog(IMainFormForConfig mainForm, GambatteLink gambatte)
        {
            var s  = gambatte.GetSettings();
            var ss = gambatte.GetSyncSettings();

            using var dlg = new DGBPrefs();
            dlg.PutSettings(s, ss);

            dlg.gbPrefControl1.ColorGameBoy = gambatte.IsCGBMode(false);
            dlg.gbPrefControl2.ColorGameBoy = gambatte.IsCGBMode(true);

            if (mainForm.ShowDialogAsChild(dlg) == DialogResult.OK)
            {
                dlg.GetSettings(out s, out ss);
                gambatte.PutSettings(s);
                if (dlg.SyncSettingsChanged)
                {
                    mainForm.PutCoreSyncSettings(ss);
                }
            }
        }
コード例 #29
0
        public static void DoSettingsDialog(IMainFormForConfig mainForm, LibsnesCore bsnes)
        {
            var s  = bsnes.GetSettings();
            var ss = bsnes.GetSyncSettings();

            using var dlg = new SNESOptions
                  {
                      RandomizedInitialState = ss.RandomizedInitialState,
                      AlwaysDoubleSize       = s.AlwaysDoubleSize,
                      CropSGBFrame           = s.CropSGBFrame,
                      ShowObj1 = s.ShowOBJ_0,
                      ShowObj2 = s.ShowOBJ_1,
                      ShowObj3 = s.ShowOBJ_2,
                      ShowObj4 = s.ShowOBJ_3,
                      ShowBg1  = s.ShowBG1_0,
                      ShowBg2  = s.ShowBG2_0,
                      ShowBg3  = s.ShowBG3_0,
                      ShowBg4  = s.ShowBG4_0
                  };

            var result = mainForm.ShowDialogAsChild(dlg);

            if (result == DialogResult.OK)
            {
                s.AlwaysDoubleSize        = dlg.AlwaysDoubleSize;
                s.CropSGBFrame            = dlg.CropSGBFrame;
                ss.RandomizedInitialState = dlg.RandomizedInitialState;
                s.ShowOBJ_0 = dlg.ShowObj1;
                s.ShowOBJ_1 = dlg.ShowObj2;
                s.ShowOBJ_2 = dlg.ShowObj3;
                s.ShowOBJ_3 = dlg.ShowObj4;
                s.ShowBG1_0 = s.ShowBG1_1 = dlg.ShowBg1;
                s.ShowBG2_0 = s.ShowBG2_1 = dlg.ShowBg2;
                s.ShowBG3_0 = s.ShowBG3_1 = dlg.ShowBg3;
                s.ShowBG4_0 = s.ShowBG4_1 = dlg.ShowBg4;

                mainForm.PutCoreSettings(s);
                mainForm.PutCoreSyncSettings(ss);
            }
        }
コード例 #30
0
 public static void DoDialog(IMainFormForConfig owner, string title)
 {
     if (owner.Emulator is Emulation.Cores.Waterbox.NymaCore core)
     {
         var desc = new Emulation.Cores.Waterbox.NymaTypeDescriptorProvider(core.SettingsInfo);
         try
         {
             // OH GOD THE HACKS WHY
             TypeDescriptor.AddProvider(desc, typeof(Emulation.Cores.Waterbox.NymaCore.NymaSettings));
             TypeDescriptor.AddProvider(desc, typeof(Emulation.Cores.Waterbox.NymaCore.NymaSyncSettings));
             DoDialog(owner, "Nyma Core", !core.SettingsInfo.HasSettings, !core.SettingsInfo.HasSyncSettings);
         }
         finally
         {
             TypeDescriptor.RemoveProvider(desc, typeof(Emulation.Cores.Waterbox.NymaCore.NymaSettings));
             TypeDescriptor.RemoveProvider(desc, typeof(Emulation.Cores.Waterbox.NymaCore.NymaSyncSettings));
         }
     }
     else if (owner.Emulator is Emulation.Cores.Arcades.MAME.MAME mame)
     {
         var desc = new Emulation.Cores.Arcades.MAME.MAMETypeDescriptorProvider(mame.CurrentDriverSettings);
         try
         {
             TypeDescriptor.AddProvider(desc, typeof(Emulation.Cores.Arcades.MAME.MAME.MAMESyncSettings));
             DoDialog(owner, "MAME", true, false);
         }
         finally
         {
             TypeDescriptor.RemoveProvider(desc, typeof(Emulation.Cores.Arcades.MAME.MAME.MAMESyncSettings));
         }
     }
     else
     {
         using var dlg = new GenericCoreConfig(owner)
               {
                   Text = title
               };
         owner.ShowDialogAsChild(dlg);
     }
 }