Example #1
0
 public static void DeleteGameConsoleControl(GameConsole gc)
 {
     using (ConfirmationWindow confirmation = new ConfirmationWindow("#delete"))
     {
         if (confirmation.ShowDialog() == DialogResult.OK)
         {
             Program.ReportPipe.SendPackage("INACxCOM", "deletereport", gc.Settings.ReportProperties.COSExR_Name);
             setupConfiguration.ConsolesSetup.Remove(gc.Settings);
             gc.Parent.Controls.Remove(gc);
             setupConfiguration.AvailableNumberIDs.Add(gc.Settings.NumberID);
             gc.Dispose();
             setupConfiguration.NumberOfConsoles--;
         }
         SaveSetup();
     }
 }
Example #2
0
 private void _removeAllConsoles_Click(object sender, EventArgs e)
 {
     using (ConfirmationWindow confirmation = new ConfirmationWindow("#deleteAll"))
     {
         _autoSaveTimer.Stop();
         if (confirmation.ShowDialog() == DialogResult.OK)
         {
             Program.ReportPipe.SendPackage("INACxCOM", "deleteall", "cosexr");
             _consolesContainer.Controls.Clear();
             setupConfiguration.AvailableNumberIDs.Clear();
             setupConfiguration.ConsolesSetup.Clear();
             setupConfiguration.NumberOfConsoles = 0;
             InitializeIDs();
         }
         SaveSetup();
         _autoSaveTimer.Start();
     }
 }