private void Password_KeyPress(object sender, KeyPressEventArgs e) { if (e.KeyChar == Convert.ToChar(Keys.Enter)) { LoginButton.Focus(); } }
private void Window_KeyDown(object sender, System.Windows.Input.KeyEventArgs e) { if (e.Key == Key.Return || e.Key == Key.Enter) { if (UsernameInput.IsFocused) { PasswordInput.Focus(); } else if (PasswordInput.IsFocused) { LoginButton.Focus(); SendKeys.SendWait("{Enter}"); } } else { if (System.Windows.Forms.Control.IsKeyLocked(Keys.CapsLock)) { CapsCheck.Visibility = Visibility.Visible; Jim.Background = Brushes.Red; Bob.Background = Brushes.Green; } else { // System.Windows.MessageBox.Show("The Caps Lock key is OFF."); CapsCheck.Visibility = Visibility.Collapsed; Jim.Background = Brushes.DarkTurquoise; Bob.Background = Brushes.PaleVioletRed; } } }
private void pass_KeyDown(object sender, KeyEventArgs e) { if (e.Key == Key.Enter) { LoginButton.Focus(); } }
private void PasswordTextBox_KeyDown(object sender, KeyEventArgs e) { if ((e.KeyCode == Keys.Enter)) { LoginButton.Focus(); } }
async void OnIndexChange(object sender, EventArgs e) { // var picker = (Picker)sender; // await Navigation.PushAsync(new MainPage(picker.SelectedIndex + 1)); // picker.Unfocus(); LoginButton.Focus(); }
private void PasswordTextBox_KeyDown(object sender, KeyRoutedEventArgs e) { if (e.Key.Equals(Windows.System.VirtualKey.Enter)) { LoginButton.Focus(FocusState.Programmatic); } }
private void PasswordBox_PreviewKeyDown(object sender, KeyEventArgs e) { if (e.Key == Key.Return) { LoginButton.Focus(); } }
private void LoginButton_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.Enter) { LoginButton.Focus(); } }
public LoginPage() { InitializeComponent(); EmailEntry.Completed += (sender, args) => { PasswordEntry.Focus(); }; PasswordEntry.Completed += (sender, args) => { LoginButton.Focus(); }; //this.AnimationView.IsVisible = false; //this.LoginButton.Clicked += LoginButton_Clicked; }
private void ShowPassword_MouseLeave(object sender, MouseEventArgs e) { ShowPasswordLabel.Text = ""; ShowPasswordLabel.Visibility = Visibility.Hidden; PasswordTB.Password = password; LoginButton.Focus(); PasswordTB.IsEnabled = true; }
private void PasswordKeyDown(object sender, KeyRoutedEventArgs e) { if (e.Key == Windows.System.VirtualKey.Enter) { LoginButton.Focus(FocusState.Programmatic); LoginButton.Command.Execute(null); } }
private void Enter(object sender, KeyEventArgs e) { if (e.Key == Key.Enter) { LoginButton.Focus(); ButtonLogin_Click(sender, null); } }
private void KeyTextBox_OnPreviewKeyDown(object sender, KeyEventArgs e) { if (e.Key == Key.Enter) { e.Handled = true; LoginButton.Focus(); LoginButton.Command.Execute(null); } }
private void passTBox_KeyDown(object sender, KeyEventArgs e) { if (e.KeyData == Keys.Enter) { // go to next form } if (e.KeyData == Keys.Tab) { // switch focus to login button LoginButton.Focus(); } }
private void PasswordEntry_Completed(object sender, EventArgs e) { if (!string.IsNullOrEmpty(PasswordEntry.Text)) { LoginButton.Focus(); } else { //DependencyService.Get<IMessage>().LongAlert("Password is blank!"); UserDialogs.Instance.ShowError("Password is blank!", 3000); PasswordEntry.Focus(); } }
public LoginScreen() { InitializeComponent(); Login.Completed += (object sender, EventArgs e) => { Password.Focus(); }; Password.Completed += (object sender, EventArgs e) => { LoginButton.Focus(); }; }
private void LoginWindow_KeyDown(object sender, KeyEventArgs e) { if (e.Key == Key.Enter) { LoginButton.Focus(); var peer = new ButtonAutomationPeer(LoginButton); var invokeProv = peer.GetPattern(PatternInterface.Invoke) as IInvokeProvider; invokeProv?.Invoke(); } else if (e.Key == Key.Escape) { Application.Current.Shutdown(); } }
private void TextBox_KeyUp(object sender, KeyRoutedEventArgs e) { if (e.Key == Windows.System.VirtualKey.Enter) { switch (((Control)sender).Name) { case "Token": LoginButton.Focus(FocusState.Pointer); LoginButton_Click(sender, null); break; default: break; } } }
private void Window_Loaded(object sender, RoutedEventArgs e) { WindowToolTip.Opacity = 0; TextBlockSoftName.Text = SoftResources.StringResouce.SoftName; TextBlockSoftVersion.Text = UserClient.CurrentVersion.ToString(); TextBlockSoftCopyright.Text = $"本软件著作权归{CommonLibrary.SoftResources.StringResouce.SoftCopyRight}所有"; // 上次登录为7天以前则清除账户密码 if ((DateTime.Now - UserClient.JsonSettings.LoginTime).TotalDays < UserClient.JsonSettings.PasswordOverdueDays) { //加载数据 NameTextBox.Text = UserClient.JsonSettings.LoginName ?? ""; PasswordBox.Password = UserClient.JsonSettings.Password ?? ""; Remember.IsChecked = UserClient.JsonSettings.Password != ""; } //初始化输入焦点 if (UserClient.JsonSettings.Password != "") { LoginButton.Focus(); } else if (UserClient.JsonSettings.LoginName != "") { PasswordBox.Focus(); } else { NameTextBox.Focus(); } // 加载原先保存的主题配色 if (File.Exists(AppDomain.CurrentDomain.BaseDirectory + @"Palette.txt")) { using (StreamReader sr = new StreamReader(AppDomain.CurrentDomain.BaseDirectory + @"Palette.txt", Encoding.UTF8)) { string temp = sr.ReadToEnd(); MaterialDesignThemes.Wpf.Palette obj = JObject.Parse(temp).ToObject <MaterialDesignThemes.Wpf.Palette>(); new PaletteHelper().ReplacePalette(obj); } } }
protected override void OnAppearing() { base.OnAppearing(); if (string.IsNullOrEmpty(EmailEntry.Text)) { EmailEntry.Focus(); } else if (string.IsNullOrEmpty(PasswordEntry.Text)) { PasswordEntry.Focus(); } else { LoginButton.Focus(); } ViewModel.MessageLabel = string.Empty; ViewModel.CanExecuteCommands = true; }
public LoginMenu() { InitializeComponent(); _eventManager = EventManager.Instance; _user = User.Instance; _userAccess = UserAccess.Instance; // handle Remembre-me if (Settings.Default.RememberMe) { RememberMeCheckbox.IsChecked = true; UsernameEntry.Text = Settings.Default.Username; PasswordEntry.Password = Settings.Default.Password; PasswordEntryTip.Visibility = Visibility.Hidden; LoginButton.Focus(); } // Change Title MainWindow.Instance.SwitchTitle("Connexion"); }
} // FindIDTextBox_KeyDown /// <summary> /// On Find button click start search /// </summary> /// <param name="sender">event source</param> /// <param name="e">event parametres</param> private void FindButton_Click(object sender, RoutedEventArgs e) { // Check step 1 if (currentUser == null || token == null) { ErrorText.Content = "Шаг 1: войдите ВКонтакте, нажав Войти"; ErrorText.Foreground = new SolidColorBrush(Color.FromRgb(223, 0, 0)); LoginButton.Focus(); System.Media.SystemSounds.Exclamation.Play(); return; } // if (currentUser == null || token == null) // Check step 2 if (searchedUser == null) { ErrorText.Content = "Шаг 2: введите адрес и нажмите Проверить"; ErrorText.Foreground = new SolidColorBrush(Color.FromRgb(223, 0, 0)); System.Media.SystemSounds.Exclamation.Play(); FindIDTextBox.Focus(); return; } // if (findingUser == null) }// FindButton_Click
private void OnTextBoxKeyReleased(object sender, KeyEventArgs args) { if (args.Key == Key.Enter) { if (sender == Username) { Password.Focus(); // Show move keyboard to password input } else if (sender == Password) { LoginButton.Focus(); // Hide keyboard } else if (sender == ServerUrl) { ServerUrlButton.Focus(); // Hide keyboard SaveServer(); } else if (sender == NewLibraryId) { NewLibraryAddButton.Focus(); // Hide keyboard RequestAddingLibrary(); } } }
protected void Page_Load(object sender, EventArgs e) { if (((ELearn.User)Session["user"]) != null) { Response.Redirect("home.aspx"); } List <ClassRoom> classes = ClassRoom.GetAllClassRooms(); foreach (ClassRoom cls in classes) { Level lvl = Level.GetLevelById(cls.levelID); string lname = ""; if (lvl != null) { lname = lvl.levelName; } else { lname = cls.levelID.ToString(); } ListBox1.Items.Add(new ListItem(lname + " - " + cls.classRoomID.ToString(), cls.classRoomID.ToString())); } LoginButton.Focus(); }
private void PasswordEntry_Completed(object sender, EventArgs e) { LoginButton.Focus(); }
protected void edsenha_TextChanged(object sender, EventArgs e) { LoginButton.Focus(); }
private void ToggleButton_Unchecked(object sender, RoutedEventArgs e) { LoginButton.Focus(); }
/// <summary> /// Initializes a new instance of <see cref="MainWindow"/> class /// </summary> public MainWindow() { InitializeComponent(); mouse = new Point(); LoginButton.Focus(); }
protected void Page_Init(object sender, EventArgs e) { UserNameBox.Text = Request.Cookies.Get("userName")?.Value ?? "User"; LoginButton.Focus(); }
public LoginPage() { InitializeComponent(); EmailEntry.Completed += (sender, args) => { PasswordEntry.Focus(); }; PasswordEntry.Completed += (sender, args) => { LoginButton.Focus(); }; }