예제 #1
0
 internal static frmProductos GetInstancia()
 {
     if (_instancia == null || _instancia.IsDisposed)
     {
         _instancia = new frmProductos();
     }
     _instancia.BringToFront();
     return(_instancia);
 }
예제 #2
0
파일: frmMain.cs 프로젝트: rodriman92/Stock
        private void productosToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (this.panelContenedor.Controls.Count > 0)
            {
                this.panelContenedor.Controls.RemoveAt(0);
            }
            frmProductos hijo2 = frmProductos.GetInstancia();

            hijo2.TopLevel = false;

            hijo2.Dock = DockStyle.Fill;
            this.panelContenedor.Controls.Add(hijo2);
            this.panelContenedor.Tag = hijo2;
            hijo2.Show();
        }