private void Button_Click(object sender, RoutedEventArgs e)
        {
            HomeWindow hw = new HomeWindow(User);

            hw.Show();

            this.Close();
        }
Example #2
0
 private void Login_Click(object sender, RoutedEventArgs e)
 {
     if (ValidateAllEntries())
     {
         UserAccount account = Users.FirstOrDefault(x => x.Email == username.Text);
         if (account?.Password == password.Password)
         {
             /*MainWindow mw = new MainWindow(account, Users);
              * this.Close();
              * mw.ShowDialog();*/
             HomeWindow hw = new HomeWindow(account);
             hw.Show();
             this.Close();
         }
         else
         {
             MessageBox.Show("Invalid Login credentials", "Sign In Error");
         }
     }
 }