Exemplo n.º 1
0
 private void ModelsButton_Click(object sender, EventArgs e)
 {
     try
     {
         this.Hide();                                      //Hides Menu
         ManageOptions modelsOption = new ManageOptions(); //Create instance ManageOptions
         modelsOption.Name = "Manage Models";              //Changes the label in the ManageOptions form
         modelsOption.ShowDialog();                        // Shows ManageOptions
     }
     catch
     {
         MessageBox.Show("An error has occured, the program will be terminated", "Warning", MessageBoxButtons.OK);
     }
 }
Exemplo n.º 2
0
 private void BackButton_Click(object sender, EventArgs e)
 {
     try
     {
         DialogResult answer = MessageBox.Show("Your changes have not been submitted. Are you sure you want to leave?", "Exit?", MessageBoxButtons.YesNo); //Warning
         if (answer == DialogResult.Yes)                                                                                                                   //User answer selection
         {
             this.Hide();                                                                                                                                  //Hides Menu
             ManageOptions defectOption = new ManageOptions();                                                                                             //Create instance ManageOptions
             defectOption.Name = "Manage Defects";                                                                                                         //Changes the label in the ManageOptions form
             defectOption.ShowDialog();                                                                                                                    // Shows ManageOptions              }
         }
     }
     catch
     {
         MessageBox.Show("An error has occured, the program will be terminated", "Warning", MessageBoxButtons.OK);
     }
 }