private void addNewClientOrderToolStripMenuItem_Click(object sender, EventArgs e) { try { AddNewClientOrder ARF = null; if (IsFormAlreadyOpen(typeof(AddNewClientOrder)) == null) { ARF = new AddNewClientOrder(); ARF.MdiParent = this; ARF.Show(); } else { Form selectedForm = IsFormAlreadyOpen(typeof(AddNewClientOrder)); foreach (Form OpenForm in this.MdiChildren) { if (OpenForm == selectedForm) { if (selectedForm.WindowState == FormWindowState.Minimized) { selectedForm.WindowState = FormWindowState.Normal; } selectedForm.Select(); } } } } catch (Exception x) { MessageBox.Show(x.GetBaseException().ToString()); } }
private void addNewClientOrderToolStripMenuItem_Click(object sender, EventArgs e) { try { AddNewClientOrder ARF = null; if (IsFormAlreadyOpen(typeof(AddNewClientOrder)) == null) { ARF = new AddNewClientOrder(); ARF.MdiParent = this; ARF.Show(); } else { Form selectedForm = IsFormAlreadyOpen(typeof(AddNewClientOrder)); foreach (Form OpenForm in this.MdiChildren) { if (OpenForm == selectedForm) { if (selectedForm.WindowState == FormWindowState.Minimized) { selectedForm.WindowState = FormWindowState.Normal; } selectedForm.Select(); } } } } catch (Exception x) { MessageBox.Show(x.GetBaseException().ToString()); } }