Beispiel #1
0
        public void ShowLoginView()
        {
            isLoginWindowOpen = true;

            loginWindow = new LoginDialog();
            LoginViewModel loginViewModel = new LoginViewModel(this);
            loginViewModel.Content = loginViewModel;
            loginWindow.DataContext = loginViewModel;
            loginWindow.Closed += CloseLoginWindow;
            loginViewModel.PasswordBox = loginWindow.PasswordBox;
            loginWindow.ShowDialog();
        }
Beispiel #2
0
 public void CloseLoginWindow(object sender = null, EventArgs e = null)
 {
     if (loginWindow != null)
     {
         isLoginWindowOpen = false;
         if (sender == null)
         {
             loginWindow.Close();
             loginWindow = null;
         }
     }
 }