示例#1
0
文件: frmMain.cs 项目: Wasim77500/Erp
        private void mnuAccVariables_Click(object sender, EventArgs e)
        {
            MyForm f = new MyForm();

            f = (MyForm)Application.OpenForms["frmAccVariable"];
            if (f != null)
            {
                f.BringToFront();
            }
            else
            {
                Accounts.frmAccVariable f1 = new Accounts.frmAccVariable();
                f1.Show(this);
            }
            // new Account.frmAccVariable().Show(this);
        }
示例#2
0
 public static void OpenForm(Form Parent, MyForm frm, bool isDialog)
 {
     if (isDialog)
     {
         frm.ShowDialog();
     }
     else
     {
         MyForm f = new MyForm();
         f = (MyForm)Application.OpenForms[frm.Name];
         if (f != null)
         {
             f.BringToFront();
         }
         else
         {
             //frm f1 = new frmChangePassword();
             frm.Show(Parent);
         }
     }
 }