Exemplo n.º 1
0
        public static void RefreshAndKeepDomains()
        {
            List <string> MemoryBanks = new List <string>(); //Saves current targetted zones

            foreach (object oneItem in RTC_MemoryZones.SelectedDomains)
            {
                MemoryBanks.Add(oneItem.ToString());
            }

            RTC_MemoryZones.RefreshDomains(); //refresh and reload zones

            int nbZones = RTC_Core.coreForm.lbMemoryZones.Items.Count;

            for (int i = 0; i < nbZones; i++)
            {
                foreach (string SelectedItem in MemoryBanks)
                {
                    if (RTC_Core.coreForm.lbMemoryZones.Items[i].ToString() == SelectedItem)
                    {
                        RTC_Core.coreForm.lbMemoryZones.SetSelected(i, true);
                        break;
                    }
                }
            }
        }
Exemplo n.º 2
0
        private void btnSelectAll_Click(object sender, EventArgs e)
        {
            RTC_MemoryZones.RefreshDomains();

            for (int i = 0; i < lbMemoryZones.Items.Count; i++)
            {
                lbMemoryZones.SetSelected(i, true);
            }

            RTC_Restore.SaveRestore();
        }
Exemplo n.º 3
0
        public static void LoadRom(string RomFile)
        {
            List <string> MemoryBanks = null;

            if (isLoaded)
            {
                MemoryBanks = new List <string>(); //Saves current targetted zones
                foreach (object oneItem in RTC_MemoryZones.SelectedDomains)
                {
                    MemoryBanks.Add(oneItem.ToString());
                }
            }

            GlobalWin.Sound.StopSound();
            GlobalWin.DisplayManager.NeedsToPaint = false;

            var args = new BizHawk.Client.EmuHawk.MainForm.LoadRomArgs();

            if (RomFile == null)
            {
                RomFile = GlobalWin.MainForm.CurrentlyOpenRom;
            }

            var lra = new BizHawk.Client.EmuHawk.MainForm.LoadRomArgs {
                OpenAdvanced = new OpenAdvanced_OpenRom {
                    Path = RomFile
                }
            };

            GlobalWin.MainForm.LoadRom(RomFile, lra);

            GlobalWin.DisplayManager.NeedsToPaint = true;
            GlobalWin.Sound.StartSound();

            if (isLoaded)
            {
                RTC_MemoryZones.RefreshDomains(); //refresh and reload zones
                int nbZones = coreForm.lbMemoryZones.Items.Count;

                for (int i = 0; i < nbZones; i++)
                {
                    foreach (string SelectedItem in MemoryBanks)
                    {
                        if (coreForm.lbMemoryZones.Items[i].ToString() == SelectedItem)
                        {
                            coreForm.lbMemoryZones.SetSelected(i, true);
                            break;
                        }
                    }
                }
            }
        }
Exemplo n.º 4
0
        private void btnRefreshZones_Click(object sender, EventArgs e)
        {
            RTC_MemoryZones.RefreshDomains();

            //RTC_Restore.SaveRestore();
        }