Exemplo n.º 1
0
        private void btnMaterial_Click(object sender, EventArgs e)
        {
            int nI = 0;

            foreach (Form form in Application.OpenForms)
            {
                if (form.Name == "frmMaterialView")
                {
                    form.Activate();
                    form.BringToFront();
                    nI++;
                }
            }
            if (nI == 0)
            {
                frmMaterialView MaterialView = new frmMaterialView();
                MaterialView.MdiParent = this;
                this.splitContainer2.Panel2.Controls.Add(MaterialView);
                MaterialView.Dock = DockStyle.Fill;
                MaterialView.Show();
            }
        }
Exemplo n.º 2
0
 private void btnMaterial_Click(object sender, EventArgs e)
 {
     int nI = 0;
     foreach (Form form in Application.OpenForms)
     {
         if (form.Name == "frmMaterialView")
         {
             form.Activate();
             form.BringToFront();
             nI++;
         }
     }
     if (nI == 0)
     {
         frmMaterialView MaterialView = new frmMaterialView();
         MaterialView.MdiParent = this;
         this.splitContainer2.Panel2.Controls.Add(MaterialView);
         MaterialView.Dock = DockStyle.Fill;
         MaterialView.Show();
     }
 }