private void logoutToolStripMenuItem_Click(object sender, EventArgs e) { if (!LoggedInDetails.GetLoggedInState()) { // login openForm(new FormLogin()); } else { //logout LoggedInDetails.SetLoggedInState(false); } setLoginLogoutState(LoggedInDetails.GetLoggedInState()); setTsUserName(); }
private void frmMain_Load(object sender, EventArgs e) { setTsFrmName(); setLoginLogoutState(LoggedInDetails.GetLoggedInState()); }