Ejemplo n.º 1
0
 private void ApiKeyTextBoxKeyDown(object sender, KeyEventArgs e)
 {
     if (e.Key == Key.Enter)
     {
         LoginPasswordBox.Focus();
     }
 }
Ejemplo n.º 2
0
        public LoginView()
        {
            InitializeComponent();
            App.Logger.Info("Login view loaded");

            DataContext = DIContainer.Resolve <LoginViewModel>();
            _viewModel  = (DataContext as LoginViewModel);
            _viewModel.passwordService = this;

            LoginPasswordBox.Focus();
        }
Ejemplo n.º 3
0
        protected override void OnInit()
        {
            if (string.IsNullOrEmpty(UsernameTextBox.Text))
            {
                UsernameTextBox.Focus();
                return;
            }

            if (string.IsNullOrEmpty(ApiKeyTextBox.Text))
            {
                ApiKeyTextBox.Focus();
                return;
            }

            LoginPasswordBox.Focus();
        }
Ejemplo n.º 4
0
 private void ShowLoginPassword_OnClick(object sender, RoutedEventArgs e)
 {
     if (ShowLoginPasswordToggleButton.IsChecked is true)
     {
         LoginPasswordBox.Visibility     = Visibility.Collapsed;
         ShowLoginPasswordBox.Text       = LoginPasswordBox.Password;
         ShowLoginPasswordBox.Visibility = Visibility.Visible;
         ShowLoginPasswordBox.Focus();
     }
     else
     {
         LoginPasswordBox.Visibility     = Visibility.Visible;
         ShowLoginPasswordBox.Visibility = Visibility.Collapsed;
         LoginPasswordBox.Focus();
     }
 }
 private void proxy_authenticateCompleted(object sender, Server.authenticateCompletedEventArgs e)
 {
     if (e.Error == null)
     {
         if (e.Result.success)
         {
             SaveLastLoginUser(LoginUsernameTextBox.Text);
             App.ViewModel.Me.Email = LoginUsernameTextBox.Text;
             this.NavigationService.Navigate(new Uri("/MainPage.xaml", UriKind.Relative));
         }
         else
         {
             MessageBox.Show("Login Failed. Please try again.");
             LoginPasswordBox.Password = "";
             LoginPasswordBox.Focus();
         }
     }
     LOGINBUTTON.IsEnabled = true;
     REGISTERBUTTON.IsEnabled = true;
     progressBar.Visibility = System.Windows.Visibility.Collapsed;
 }