Пример #1
0
 private void btnLOgin_Click(object sender, RoutedEventArgs e)
 {
     if (ifLoginSuccess())
     {
         HomeWindow home = new HomeWindow(this);
         home.Show();
         this.Hide();
     }
 }
Пример #2
0
 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!");
         }
     }
 }