예제 #1
0
        private void BTN_Salir_Click(object sender, EventArgs e)
        {
            ventanas = PNL_Ventanas.MdiForm.MdiChildren.Count();
            if (ventanas != 0)
            {
                for (int i = ventanas - 1; i > -1; i--)
                {
                    PNL_Ventanas.MdiForm.MdiChildren[i].Close();
                }
            }
            PNL_Ventanas.Refresh();
            Settings.Default.TipoUsuario   = 0;
            Settings.Default.NombreUsuario = "";
            WIN_GLO_Login Login = new WIN_GLO_Login();

            Login.Show();
            this.Close();
        }
예제 #2
0
 private void ValidarLogin()
 {
     try
     {
         if (Modificar == false)
         {
             if (Settings.Default.ConexionGuardada == true && Settings.Default.ConexionValida == true)
             {
                 WIN_GLO_Login Login = new WIN_GLO_Login();
                 if (Modificar == false)
                 {
                     Login.Show();
                 }
             }
         }
     }
     catch (Exception ex)
     {
         Glo.Mensajes(10, ex.Message);
     }
 }