private void mnLogout_Click(object sender, EventArgs e) { try { UserLogIn.userLogedIn = null; Hide(); fl = new frmLogin(); fl.ShowDialog(); } catch { } }
private void FrmMain_Load(object sender, EventArgs e) { fl = new frmLogin(); fl.ShowDialog(); if (fl.pass < 1) { //this.Close(); Application.Exit(); } else { LoadUser(); } }