示例#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;
     }
 }