示例#1
0
        public NESSyncSettingsForm()
        {
            InitializeComponent();

            SyncSettings = ((NES)Global.Emulator).GetSyncSettings();

            if ((Global.Emulator as NES).HasMapperProperties)
            {
                DTDB = new DataTableDictionaryBind <string, string>(SyncSettings.BoardProperties);
                dataGridView1.DataSource = DTDB.Table;
                InfoLabel.Visible        = false;
            }
            else
            {
                BoardPropertiesGroupBox.Enabled = false;
                dataGridView1.DataSource        = null;
                dataGridView1.Enabled           = false;
                InfoLabel.Visible = true;
            }

            RegionComboBox.Items.AddRange(Enum.GetNames(typeof(NES.NESSyncSettings.Region)));
            RegionComboBox.SelectedItem = Enum.GetName(typeof(NES.NESSyncSettings.Region), SyncSettings.RegionOverride);

            if (SyncSettings.InitialWRamStatePattern != null && SyncSettings.InitialWRamStatePattern.Any())
            {
                var sb = new StringBuilder();
                foreach (var b in SyncSettings.InitialWRamStatePattern)
                {
                    sb.Append(b.ToHexString(2));
                }

                RamPatternOverrideBox.Text = sb.ToString();
            }
        }
示例#2
0
        public NESSyncSettingsForm()
        {
            InitializeComponent();
            SyncSettings             = (NES.NESSyncSettings)Global.Emulator.GetSyncSettings();
            DTDB                     = new DataTableDictionaryBind <string, string>(SyncSettings.BoardProperties);
            dataGridView1.DataSource = DTDB.Table;

            comboBox1.DropDownStyle = ComboBoxStyle.DropDownList;
            comboBox1.Items.AddRange(Enum.GetNames(typeof(NES.NESSyncSettings.Region)));
            comboBox1.SelectedItem = Enum.GetName(typeof(NES.NESSyncSettings.Region), SyncSettings.RegionOverride);
        }
示例#3
0
        public NESSyncSettingsForm(
            IMainFormForConfig mainForm,
            NES.NESSyncSettings syncSettings,
            bool hasMapperProperties)
        {
            _mainForm        = mainForm;
            _syncSettings    = syncSettings;
            DialogController = mainForm.DialogController;
            InitializeComponent();
            HelpBtn.Image = Properties.Resources.Help;

            if (hasMapperProperties)
            {
                _dataTableDictionary     = new DataTableDictionaryBind <string, string>(_syncSettings.BoardProperties);
                dataGridView1.DataSource = _dataTableDictionary.Table;
                InfoLabel.Visible        = false;
            }
            else
            {
                BoardPropertiesGroupBox.Enabled = false;
                dataGridView1.DataSource        = null;
                dataGridView1.Enabled           = false;
                InfoLabel.Visible = true;
            }

            RegionComboBox.Items.AddRange(Enum.GetNames(typeof(NES.NESSyncSettings.Region)).Cast <object>().ToArray());
            RegionComboBox.SelectedItem = Enum.GetName(typeof(NES.NESSyncSettings.Region), _syncSettings.RegionOverride);

            if (_syncSettings.InitialWRamStatePattern != null && _syncSettings.InitialWRamStatePattern.Any())
            {
                var sb = new StringBuilder();
                foreach (var b in _syncSettings.InitialWRamStatePattern)
                {
                    sb.Append($"{b:X2}");
                }

                RamPatternOverrideBox.Text = sb.ToString();
            }
        }
示例#4
0
        public NESSyncSettingsForm()
        {
            InitializeComponent();

            SyncSettings = ((NES)Global.Emulator).GetSyncSettings();

            if ((Global.Emulator as NES).HasMapperProperties)
            {
                DTDB = new DataTableDictionaryBind <string, string>(SyncSettings.BoardProperties);
                dataGridView1.DataSource = DTDB.Table;
                InfoLabel.Visible        = false;
            }
            else
            {
                BoardPropertiesGroupBox.Enabled = false;
                dataGridView1.DataSource        = null;
                dataGridView1.Enabled           = false;
                InfoLabel.Visible = true;
            }

            RegionComboBox.Items.AddRange(Enum.GetNames(typeof(NES.NESSyncSettings.Region)));
            RegionComboBox.SelectedItem = Enum.GetName(typeof(NES.NESSyncSettings.Region), SyncSettings.RegionOverride);
        }