コード例 #1
0
 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());
     }
 }
コード例 #2
0
ファイル: frmMain.cs プロジェクト: insynctechs/hosmsgen
 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());
     }
 }