Exemple #1
0
 //simple button click
 private void simple_Click(object sender, EventArgs e)
 {
     //performs if sectionoptions has not already been created
     if (!Form1.Instance.PnlContainer.Controls.ContainsKey("sectionOptions"))
     {
         //creates new section options and adds it to the panel
         sectionOptions sc = new sectionOptions();
         sc.Dock = DockStyle.Fill;
         Form1.Instance.PnlContainer.Controls.Add(sc);
     }
     //displays sectionoptions
     Form1.Instance.PnlContainer.Controls["sectionOptions"].BringToFront();
 }
Exemple #2
0
 private void Simple_Click_1(object sender, EventArgs e)
 {
     //performs if sectionoptions is pressed and not created already
     if (!Form1.Instance.PnlContainer.Controls.ContainsKey("sectionOptions"))
     {
         //creates new section options and adds it to the control
         sectionOptions sc = new sectionOptions();
         sc.Dock = DockStyle.Fill;
         Form1.Instance.PnlContainer.Controls.Add(sc);
     }
     //displays sectionOptions
     Form1.Instance.PnlContainer.Controls["sectionOptions"].BringToFront();
     //makes error label invisible to avoid confusion from user on main re-entry after modification
     errorLabel.Visible = false;
 }