private void loginButton_Click(object sender, RoutedEventArgs e) { var userData = new UserData(); var dlg = new LoginDialog(); dlg.Owner = this; dlg.ShowDialog(); // Process data entered by user if dialog box is accepted if (dlg.DialogResult == true) { if (userData.LogIn(dlg.nameTextBox.Text, dlg.passwordTextBox.Password) == true) { this.statusTextBlock.Text = userData.FullName + ", you are logged in as User #" + userData.UserID; } else { MessageBox.Show("MAIN You could not be verified. Please try again."); } } }
private void loginButton_Click(object sender, RoutedEventArgs e) { var userData = new UserData(); var dlg = new LoginDialog(); dlg.Owner = this; dlg.ShowDialog(); // Process data entered by user if dialog box is accepted if (dlg.DialogResult == true) { if (userData.LogIn(dlg.uname.Text, dlg.password.Password) == true) { this.statusTextBlock.Text = "You are logged in as User #" + userData.UserId; AppWindow.Title = "Testing"; //Change Title } else { MessageBox.Show("You could not be verified. Please try again."); } } }