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(); } }
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(); } }