private void logOutToolStripMenuItem_Click(object sender, EventArgs e) { Program.ARTISClient.logOut(Program.TOKEN); txtUsername.Text = ""; txtPassword.Text = ""; lblUsername.Visible = true; lblPassword.Visible = true; txtUsername.Visible = true; txtPassword.Visible = true; btnLogIn.Visible = true; lblLogInError.Visible = false; this.Text = "ARTIS Administration System - Logged Out"; ArtisMessage msg = new ArtisMessage("Logged Out"); msg.Show(); }
private void btnLogIn_Click(object sender, EventArgs e) { Program.TOKEN = Program.ARTISClient.logIn(txtUsername.Text, txtPassword.Text); if (Program.TOKEN == "Invalid Credentials") { lblLogInError.Visible = true; } else { lblUsername.Visible = false; lblPassword.Visible = false; txtUsername.Visible = false; txtPassword.Visible = false; btnLogIn.Visible = false; lblLogInError.Visible = false; this.Text = "ARTIS Administration System - Logged In"; ArtisMessage msg = new ArtisMessage("Log In Successful"); msg.Show(); } }