/// <summary> /// Handles what happens when the login button is clicked. /// </summary> /// <param name="sender">Object that raised this event.</param> /// <param name="e">Contains the data for the event.</param> private void loginButton_Click(object sender, EventArgs e) { loginPanel.Visible = true; BlankForm cf = new BlankForm(); LoadNewForm(cf); loginButton.BackColor = Color.Gainsboro; }
/// <summary> /// Handles what happens when the log out button is clicked. /// </summary> /// <param name="sender">Object that raised this event.</param> /// <param name="e">Contains the data for the event.</param> private void logOutButton_Click(object sender, EventArgs e) { BlankForm cf = new BlankForm(); usernameBox.Text = ""; passwordBox.Text = ""; loginPanel.Visible = true; NoUserButtons(); Controllers.UserControl.CurrentUser = null; LoadNewForm(cf); logOutButton.BackColor = Color.Gainsboro; }