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