private void bntSignUp_Click(object sender, EventArgs e) { SignUpForm signupForm = new SignUpForm(); signupForm.Show(); txtUsername.Clear(); txtPassword.Clear(); }
/// <summary> /// Closes the main form and goes back to the sign in form /// </summary> private void buttonLogOut_Click(object sender, EventArgs e) { DialogResult dialogResult = MessageBox.Show("Are you sure you want to sign out?", "Signing out", MessageBoxButtons.YesNo); if (dialogResult == DialogResult.Yes) { SignUpForm form = new SignUpForm(); form.Show(); form.SetBounds(this.Location.X, this.Location.Y, form.Width, form.Height); form.FormClosing += (obj, args) => { this.Close(); }; this.Hide(); } }