Exemple #1
0
 private void Login_Button(object sender, RoutedEventArgs e)
 {
     if (read.UserLogIn(UsernameBox.Text, PasswordBox.Password))
     {
         UserWindow userWindow = new UserWindow(UsernameBox.Text);
         userWindow.ShowDialog();
         UsernameBox.Text                    = "Username";
         PasswordBox.Password                = "******";
         allData.Visibility                  = Visibility.Collapsed;
         checkPasswords.Visibility           = Visibility.Collapsed;
         checkUsernameAndPassword.Visibility = Visibility.Collapsed;
         accountCreated.Visibility           = Visibility.Collapsed;
         userExists.Visibility               = Visibility.Collapsed;
     }
     else
     {
         allData.Visibility                  = Visibility.Collapsed;
         checkPasswords.Visibility           = Visibility.Collapsed;
         checkUsernameAndPassword.Visibility = Visibility.Visible;
         accountCreated.Visibility           = Visibility.Collapsed;
         userExists.Visibility               = Visibility.Collapsed;
     }
 }