private void Create_Account_Button_Click(object sender, EventArgs e) { if (UserName_MaskedTextBox.Text == string.Empty || Password_MaskedTextBox.Text == string.Empty || Email_MaskedTextbox.Text == string.Empty) { MessageBox.Show("Error! Missing either Username OR Password"); UserName_MaskedTextBox.ResetText(); Password_MaskedTextBox.ResetText(); Email_MaskedTextbox.ResetText(); return; } bool success = DataConnection.CreateUserLogin(UserName_MaskedTextBox.Text, Password_MaskedTextBox.Text, Email_MaskedTextbox.Text); if (success == true) { MessageBox.Show("Success! New User has been Created and Logged In"); this.Hide(); mainFormView main = new mainFormView(); main.Show(); } else { MessageBox.Show("Error! Could not create a new user"); } }
private void Back_Button_Click(object sender, EventArgs e) { this.Hide(); if (ReturnToProfile == false) { MainHandle.Show(); } else { ProfileHandle.Show(); } }
private void LogIn_Button_Click(object sender, EventArgs e) { bool success = DataConnection.GetUserLogin(UserName_MaskedTextBox.Text); if (success == true) { this.Hide(); mainFormView main = new mainFormView(); main.Show(); } else { MessageBox.Show("Error, Username OR Password entered is incorrect."); UserName_MaskedTextBox.ResetText(); Password_MaskedTextBox.ResetText(); } }
private void Back_Button_Click(object sender, EventArgs e) { this.Hide(); MainHandle.Show(); }