Beispiel #1
0
 private void miContenedor_Click(object sender, EventArgs e)
 {
     try
     {
         Form frm = this.MdiChildren.FirstOrDefault(X => X is frm_AdmContenedor);
         if (frm != null)
         {
             frm.BringToFront();
             return;
         }
         frm               = new frm_AdmContenedor();
         frm.MdiParent     = this;
         frm.WindowState   = FormWindowState.Normal;
         frm.StartPosition = FormStartPosition.Manual;
         frm.Location      = new Point(0, 0);
         frm.Show();
     }
     catch (Exception)
     {
         MessageBox.Show("Disculpe, el sistema se encuentra fuera de servicio!",
                         this.Text,
                         MessageBoxButtons.OK,
                         MessageBoxIcon.Error);
     }
 }
Beispiel #2
0
 private void miContenedor_Click(object sender, EventArgs e)
 {
     try
     {
         Form frm = this.MdiChildren.FirstOrDefault(X => X is frm_AdmContenedor);
         if (frm != null)
         {
             frm.BringToFront();
             return;
         }
         frm = new frm_AdmContenedor();
         frm.MdiParent = this;
         frm.WindowState = FormWindowState.Normal;
         frm.StartPosition = FormStartPosition.Manual;
         frm.Location = new Point(0, 0);
         frm.Show();
     }
     catch (Exception)
     {
         MessageBox.Show("Disculpe, el sistema se encuentra fuera de servicio!",
                               this.Text,
                               MessageBoxButtons.OK,
                               MessageBoxIcon.Error);
     }
 }