private void sportviewToolStripMenuItem_Click(object sender, EventArgs e) { ToolStripMenuItem sel_item = sender as ToolStripMenuItem; if (sel_item.Checked) { if (IsProcessRunning) { MessageBox.Show("A process is already running"); sel_item.Checked = false; return; } else { Form childForm = new CouponManage(sel_item.Name, sel_item.Text); childForm.Name = sel_item.Name; childForm.MdiParent = this; childForm.Show(); } } else { foreach (Form form in this.MdiChildren) { if (form.Name.Equals(sel_item.Name)) { form.Close(); } } } }
private void sportviewToolStripMenuItem_Click(object sender,EventArgs e) { ToolStripMenuItem sel_item = sender as ToolStripMenuItem; if (sel_item.Checked) { if (IsProcessRunning) { MessageBox.Show("A process is already running"); sel_item.Checked = false; return; } else { Form childForm = new CouponManage(sel_item.Name,sel_item.Text); childForm.Name = sel_item.Name; childForm.MdiParent = this; childForm.Show(); } } else { foreach (Form form in this.MdiChildren) { if (form.Name.Equals(sel_item.Name)) { form.Close(); } } } }