コード例 #1
0
ファイル: frmMain.cs プロジェクト: slagovskiy/psa
 private void mnuClient_Click(object sender, EventArgs e)
 {
     if (CheckState(db_connection))
     {
         bool open = true;
         foreach (Form f in this.MdiChildren)
         {
             if (f.Name == "frmClientTable")
             {
                 f.MdiParent = this;
                 f.Show();
                 f.WindowState = FormWindowState.Maximized;
                 open = false;
             }
         }
         if (open)
         {
             frmClientTable frm = new frmClientTable(db_connection, usr);
             frm.MdiParent = this;
             frm.WindowState = FormWindowState.Maximized;
             frm.Show();
         }
     }
 }
コード例 #2
0
ファイル: frmMain.cs プロジェクト: slagovskiy/psa
 private void toolStripMenuItem2_Click(object sender, EventArgs e)
 {
     bool open = true;
     foreach (Form f in this.MdiChildren)
     {
         if (f.Name == "frmClientTable")
         {
             f.MdiParent = this;
             f.Show();
             f.WindowState = FormWindowState.Maximized;
             open = false;
         }
     }
     if (open)
     {
         frmClientTable fATable = new frmClientTable(db_connection, usr);
         fATable.MdiParent = this;
         fATable.Show();
         fATable.WindowState = FormWindowState.Maximized;
     }
 }