Esempio n. 1
0
 /// <summary>
 /// Opens the add emulator dialog when the button is clicked
 /// </summary>
 /// <param name="sender">Sender.</param>
 /// <param name="e">E.</param>
 protected void AddEmulatorOnActivate(object sender, EventArgs e)
 {
     EmulatorDialog ed = new EmulatorDialog (new Emulator ());
     if ((ResponseType)ed.Run () == ResponseType.Ok)
     {
         ed.UpdateEmulator ();
         EmulatorController.emulators.Add (ed.emulator);
         UpdateTree ();
     }
     ed.Destroy ();
 }
Esempio n. 2
0
 /// <summary>
 /// Opens the dialog to edit the information for a given emulator
 /// </summary>
 /// <param name="sender">Sender.</param>
 /// <param name="e">E.</param>
 protected void EditButtonOnActivate(object sender, EventArgs e)
 {
     if (activeGame != null)
     {
         GameDialog gd = new GameDialog (activeGame);
         if ((ResponseType)gd.Run () == ResponseType.Ok)
         {
             gd.UpdateGame ();
             GameView.UpdateView ();
         }
         gd.Destroy ();
     }
     else if (activeEmulator != null)
     {
         EmulatorDialog ed = new EmulatorDialog (activeEmulator);
         if ((ResponseType)ed.Run () == ResponseType.Ok)
             ed.UpdateEmulator ();
         ed.Destroy ();
     }
 }