private void ContactsToolStripItem_Click(object sender, EventArgs e)
 {
     if (Application.OpenForms["SystemContacts"] as SystemContacts == null)
     {
         SystemContacts systemContacts = new SystemContacts(schedulerID)
         {
             MdiParent   = this,
             WindowState = FormWindowState.Maximized
         };
         Center(systemContacts);
         systemContacts.Show();
     }
 }
Exemple #2
0
        private void ContactsToolStripItem_Click(object sender, EventArgs e)
        {
            for (int i = Application.OpenForms.Count - 1; i >= 0; i--)
            {
                if (Application.OpenForms[i] != this && Application.OpenForms[i].Name != "WelcomeHomePage")
                {
                    Application.OpenForms[i].Close();
                }
            }

            if (Application.OpenForms["SystemContacts"] as SystemContacts == null)
            {
                SystemContacts systemContacts = new SystemContacts(thisProviderID)
                {
                    MdiParent   = this,
                    WindowState = FormWindowState.Maximized
                };
                Center(systemContacts);
                systemContacts.Show();
            }
        }