private void runBtn_Click(object sender, EventArgs e)
 {
     // End of diagnostics runninng
     if (this.runBtn.Text == "Back")
     {
         this.checkMsg.Visible        = false;
         this.title.Text              = "Maintenance Control System Training";
         this.checkedListBox1.Visible = true;
         this.checkMsg.Text           = "Diagnostics are running.\r\nPlease wait . . ."; // location of checkMsg is (0,200)
         this.checkMsg.Location       = new Point(0, 340);
         this.checkMsg.Font           = new Font("Arial", 12, FontStyle.Regular);
         this.runBtn.Text             = "Run";
         this.checkedListBox1.SetItemChecked(0, false);
     }
     else
     {
         if (this.checkedListBox1.CheckedItems.Count > 1)
         {
             this.checkMsg.Text    = "check ONLY ONE. . . ";
             this.checkMsg.Visible = true;
         }
         else if (this.checkedListBox1.CheckedItems.Count < 1)
         {
             this.checkMsg.Text    = "Please check . . . ";
             this.checkMsg.Visible = true;
         }
         else
         {
             if (this.checkedListBox1.GetItemChecked(1))
             {
                 this.Hide();
                 var frmCM = new ConfigurationManagement(mainScen);
                 frmCM.Show();
             }
             else if (this.checkedListBox1.GetItemChecked(0))
             {
                 this.title.Text = "System Diagnostics";
                 this.checkedListBox1.Visible = false;
                 this.checkMsg.Text           = "Diagnostics are running.\r\nPlease wait . . ."; // location of checkMsg is (0,349)
                 this.checkMsg.Location       = new Point(0, 200);
                 this.checkMsg.Font           = new Font("Arial", 18, FontStyle.Bold);
                 this.checkMsg.Visible        = true;
                 this.runBtn.Text             = "Back";
                 diagnosticsTimer.Start();
                 diagnosticsTimer.Enabled = true;
             }
             else  // this.checkedListBox1.GetItemChecked(2)
             {
                 this.Hide();
                 var frmSA = new SystemAdjustments(mainScen);
                 frmSA.Show();
             }
         }
     }
 }
Exemplo n.º 2
0
 public Bibliography(MainScen mS)
 {
     InitializeComponent();
     mainScen = mS;
     frmCM    = new ConfigurationManagement(mainScen);
 }