Beispiel #1
0
 public async void LogIn_Click(object sender, RoutedEventArgs e)
 {
     loginModel.Password = PassBox.Password;
     if (loginModel.LogUserCommand.CanExecute(null))
     {
         await loginModel.LogUser(); // command.execute executes async without awaiting the result in this method , thus the result I receive has not actually completed the login procedure unless I use LogUser
     }
     if (!loginModel.NotLoggedIn)
     {
         AccountManagementWindow accountWindow = new AccountManagementWindow();
         accountWindow.Show();
         this.Close();
     }
 }
Beispiel #2
0
 private void openAccountManagementWindow(object o)
 {
     if (_AccountManagementWindow == null)
     {
         _AccountManagementWindow = new AccountManagementWindow(ref _SelectableOwners, ref _SelectableAccounts);
         _AccountManagementWindow.Closed += delegate (object sender, EventArgs e)
         {
             _AccountManagementWindow = null;
         };
         _AccountManagementWindow.WindowStartupLocation = System.Windows.WindowStartupLocation.CenterOwner;
         _AccountManagementWindow.Show();
     }
     _AccountManagementWindow.Visibility = System.Windows.Visibility.Visible;
     _AccountManagementWindow.WindowState = System.Windows.WindowState.Normal;
 }