private void btnLOgin_Click(object sender, RoutedEventArgs e) { if (ifLoginSuccess()) { HomeWindow home = new HomeWindow(this); home.Show(); this.Hide(); } }
private async void txtPassword_KeyDown(object sender, System.Windows.Input.KeyEventArgs e) { if (e.Key == Key.Return && e.Key == Key.Enter) { if (ifLoginSuccess()) { HomeWindow home = new HomeWindow(this); home.Show(); this.Hide(); } else { await this.ShowMessageAsync("LOG IN", "Incorrect username/password. Please try again!"); } } }