private void PBCancelar_Click(object sender, EventArgs e)
        {
            this.Close();
            FRM_login frmLogin = new FRM_login(true);

            frmLogin.Show();
        }
Esempio n. 2
0
 private void Load_Load(object sender, EventArgs e)
 {
     using (FRM_login frmLogin = new FRM_login(false))
     {
         frmLogin.ShowDialog();
         // Aqui considerei que se o login for efetuado com sucesso, o DialogResult será OK
         if (frmLogin.DialogResult != DialogResult.OK)
         {
             Application.Exit();
         }
         else
         {
             FRM_MenuPrincipal frmMenu = new FRM_MenuPrincipal();
             frmMenu.Show();
         }
     }
 }
 private void BTLogout_Click(object sender, EventArgs e)
 {
     frmLogin = new FRM_login(true);
     frmLogin.Show();
     this.Close();
 }