Example #1
0
 private void romDataView_ManualDataUpdateRequested(RomData data)
 {
     using (ManualUpdateForm form = new ManualUpdateForm())
     {
         form.Initialize(data);
         if (form.ShowDialog(this) == DialogResult.OK)
         {
             selectedRom = (RomData)form.Tag;
             romMgr.UpdateRomData(selectedRom);
             UpdateEmulatorList();
             romDataView.ChildUpdate(selectedRom);
         }
     }
 }
        public void RunEmulator(IReadOnlyEmulator emulator, RomData rom)
        {
            IEmulator emu;

            if (availableEmulators.TryGetValue(emulator, out emu))
            {
                Stopwatch timer = new Stopwatch();
                timer.Start();
                emu.ExecuteRom(rom);
                timer.Stop();
                rom.TimePlayed += timer.Elapsed;
                romMgr.UpdateRomData(rom);
            }
            else
            {
                throw new EmulatorManagerException(String.Format("The selected emulator {0} has not been installed", emulator.EmulatorName));
            }
        }