private void btnDashInvestigation_Click(object sender, EventArgs e) { try { if (Application.OpenForms.OfType <frmInvestigations>().Count() == 1) { Application.OpenForms.OfType <frmInvestigations>().First().BringToFront(); } else { frmInvestigations frm = new frmInvestigations(); frm.MdiParent = this.MdiParent; frm.Show(); } } catch (Exception ex) { CommonLogger.Info(ex.ToString()); } }
private void menuItemInves_Click(object sender, EventArgs e) { try { if (Application.OpenForms.OfType <frmInvestigations>().Count() == 1) { Application.OpenForms.OfType <frmInvestigations>().First().BringToFront(); } else { frmInvestigations fdc = new frmInvestigations(); fdc.MdiParent = this; fdc.Show(); fdc.WindowState = FormWindowState.Maximized; } } catch (Exception ex) { CommonLogger.Info(ex.ToString()); } }