Example #1
0
        private void ShowPasswordWindow()
        {
            PasswordViewModel passwordViewModel = new PasswordViewModel();
            string            enteredPassword   = dialogService.OpenPasswordDialog(passwordViewModel);

            if (password.CheckPassword(enteredPassword))
            {
                IsSingIn = true;
            }
            else if (enteredPassword == null)
            {
            }
            else
            {
                MessageBox.Show("Неправельный пароль!");
                ShowPasswordWindow();
            }
        }
Example #2
0
        public string OpenPasswordDialog(PasswordViewModel passwordViewModel)
        {
            PasswordWindow passwordWindow = new PasswordWindow(passwordViewModel);

            return(passwordWindow.ShowDialog() == true ? passwordViewModel.EnteredPassword : null);
        }