Beispiel #1
0
        private void BtnLuncheria_Click(object sender, EventArgs e)
        {
            Form g_ExisteFormulario = Application.OpenForms.OfType <SeleccionDeAreaDeTrabajo>().Where(pre => pre.Text == "Principal").SingleOrDefault <Form>();

            if (g_ExisteFormulario != null)
            {
                if (g_ExisteFormulario.WindowState == FormWindowState.Minimized)
                {
                    g_ExisteFormulario.WindowState = FormWindowState.Normal;
                }
                g_ExisteFormulario.BringToFront();
            }
            else
            {
                FormInterfaz frm = new FormInterfaz(8);
                frm.Show();
            }
            Hide();
        }
Beispiel #2
0
 private void BtnSalon_Click(object sender, EventArgs e)
 {
     if (ClaseComunes.chkPermiso(true, 1, claseControlUsuario.UserName, 40))
     {
         Form g_ExisteFormulario = Application.OpenForms.OfType <SeleccionDeAreaDeTrabajo>().Where(pre => pre.Text == "Principal").SingleOrDefault <Form>();
         if (g_ExisteFormulario != null)
         {
             if (g_ExisteFormulario.WindowState == FormWindowState.Minimized)
             {
                 g_ExisteFormulario.WindowState = FormWindowState.Normal;
             }
             g_ExisteFormulario.BringToFront();
         }
         else
         {
             FormInterfaz frm = new FormInterfaz(3);
             frm.Show();
         }
         Hide();
     }
 }