コード例 #1
0
 private void petsManagementToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (!(this.ParentForm is PetsManagement))
     {
         this.ParentForm.Hide();
         PetsManagement form = new PetsManagement();
         form.ShowDialog();
         this.ParentForm.Close();
     }
 }
コード例 #2
0
 private void btnPetsManagement_Click(object sender, EventArgs e)
 {
     try
     {
         this.Hide();
         PetsManagement newForm = new PetsManagement(admin);
         newForm.ShowDialog();
         this.Show();
     }
     catch (Exception)
     {
         // ignored
     }
 }