private void MenuEditClasses_Click(object sender, EventArgs e) { if (!bIsAdmin) { Form fPassword = new PasswordPrompt(this); fPassword.ShowDialog(this); } if (bIsAdmin || CheckPassword()) { bIsAdmin = bStayAdmin; Form fClasses = new ClassManagement(sqlite_conn, sqlite_cmd); fClasses.Show(); } else { MessageBox.Show("Invalid password."); } }