Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void loginButton_Click(object sender, RoutedEventArgs e)
- {
- var dashboard = new MainWindow();
- dashboard.Owner = this;
- // dashboard.Show();
- // this.Hide();
- string user = usernameTextBox.Text;
- string pass = passwordTextBox.Text;
- if (string.IsNullOrEmpty(usernameTextBox.Text) &&
- string.IsNullOrEmpty(passwordTextBox.Text))
- {
- label3.Content = "U dient beide velden in te vullen";
- }
- else if (string.IsNullOrEmpty(usernameTextBox.Text))
- {
- label3.Content = "U dient een gebruiksnaam in te vullen";
- }
- else if (string.IsNullOrEmpty(passwordTextBox.Text))
- {
- label3.Content = "U dient een wachtwoord in te vullen";
- }
- // inlog verwerking
- bool r = validate_login(user, pass);
- if (r)
- {
- // MessageBox.Show("Correct Login Credentials");
- var MainWindow = new MainWindow();
- MainWindow.hiddenTextBox.Text = user.ToString();
- MainWindow.Show();
- this.Hide();
- }
- else
- MessageBox.Show("Incorrect Login Credentials");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement