Пример #1
0
        private void summonsToolStripMenuItem_Click(object sender, EventArgs e)
        {
            bool alreadyexist = false;

            foreach (Form item in MdiChildren)
            {
                if (item is SummonsEditor)
                {
                    alreadyexist = true;
                    item.Show();
                    item.Activate();
                }
            }
            if (!alreadyexist)
            {
                SummonsEditor newForm = new SummonsEditor();
                newForm.MdiParent = this;
                newForm.Show();
            }
        }
Пример #2
0
 private void summonsToolStripMenuItem_Click(object sender, EventArgs e)
 {
     bool alreadyexist = false;
     foreach (Form item in MdiChildren)
     {
         if (item is SummonsEditor)
         {
             alreadyexist = true;
             item.Show();
             item.Activate();
         }
     }
     if (!alreadyexist)
     {
         SummonsEditor newForm = new SummonsEditor();
         newForm.MdiParent = this;
         newForm.Show();
     }
 }