private void OkButtonClick(object sender, RoutedEventArgs e) { if (textBoxLogin.Text == "" | textBoxPassword.Text == "") { MessageBox.Show("Please fill all gaps"); } else { if (manager.CheckIfUserExists(textBoxLogin.Text)) { if (manager.CheckPassword(textBoxLogin.Text, textBoxPassword.Text)) { var window = new EnterWindow(manager); window.ShowDialog(); } else { MessageBox.Show("Wrong password"); } } else { MessageBox.Show("User with this login don't exist"); } } }
private void SignInButton_Click(object sender, RoutedEventArgs e) { var window = new EnterWindow(manager); window.ShowDialog(); }