Esempio n. 1
0
        private void UpdateTabs()
        {
            tabMain.SelectedIndexChanged -= tabMain_SelectedIndexChanged;
            _coprocessorType              = EmuApi.GetRomInfo().CoprocessorType;

            tabMain.TabPages.Clear();
            if (_coprocessorType != CoprocessorType.Gameboy)
            {
                tabMain.TabPages.AddRange(new TabPage[] { tpgCpu, tpgDma, tpgPpu, tpgSpc, tpgDsp });
                tabMain.SelectedTab = tpgCpu;
            }

            if (_coprocessorType == CoprocessorType.SA1 || _coprocessorType == CoprocessorType.Gameboy || _coprocessorType == CoprocessorType.SGB)
            {
                tpgCoprocessor       = new TabPage();
                tpgCoprocessor.Text  = _coprocessorType == CoprocessorType.SA1 ? "SA-1" : "Gameboy";
                ctrlCoprocessor      = new ctrlPropertyList();
                ctrlCoprocessor.Dock = DockStyle.Fill;
                tpgCoprocessor.Controls.Add(ctrlCoprocessor);
                tabMain.TabPages.Add(tpgCoprocessor);

                if (_coprocessorType == CoprocessorType.Gameboy)
                {
                    tabMain.SelectedTab = tpgCoprocessor;
                }
            }

            ctrlScanlineCycleSelect.Initialize(ctrlScanlineCycleSelect.Scanline, ctrlScanlineCycleSelect.Cycle, EmuApi.GetRomInfo().CoprocessorType == CoprocessorType.Gameboy ? CpuType.Gameboy : CpuType.Cpu);

            tabMain.SelectedIndexChanged += tabMain_SelectedIndexChanged;
        }