コード例 #1
0
 public CreateConsoleWindow(CreateConsoleParameters parameters, bool edit = false)
 {
     this.parameters = parameters;
     this.edit       = edit;
     InitializeComponent();
     if (edit)
     {
         Text         = "Edit Game Console";
         _create.Text = "Modify";
         _numberOfConsolesUpDown.Visible = false;
         _numberOfConsolesLabel.Visible  = false;
     }
     _numberOfConsolesUpDown.Maximum = parameters.Count;
     _consoleNameTxtBox.Text         = parameters.Setup.Name;
     _htmlColorTxTBox.Text           = parameters.Setup.ColorID;
 }
コード例 #2
0
 private void _addConsole_Click(object sender, EventArgs e)
 {
     try
     {
         if (setupConfiguration.NumberOfConsoles < 10)
         {
             CreateConsoleParameters ccp = new CreateConsoleParameters();
             ccp.Count = setupConfiguration.AvailableNumberIDs.Count;
             using (CreateConsoleWindow ccw = new CreateConsoleWindow(ccp))
             {
                 if (ccw.ShowDialog() == DialogResult.OK)
                 {
                     AddConsoles(ccp.Count, ccp.Setup);
                 }
             }
         }
         else
         {
             MessageBox.Show("You've reached the limit amount of Consoles");
         }
     } catch (Exception ex)
     { MessageLogManager.LogMessage("PBM  - MW ::::> Error failed to start Add Console:" + ex.Message); }
 }