Exemplo n.º 1
0
        /// <summary>
        /// Handles the OnTextButtonClicked event of the LoginKeyboard control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="BKiosk.UserControls.TextButtonClickedEventArgs"/> instance containing the event data.</param>
        protected void LoginKeyboard_OnTextButtonClicked(object sender, TextButtonClickedEventArgs e)
        {
            int selectionStart;
            int selectionLength;

            if (_lastFocusedInputControlName.Equals(InputControlNames.UserName))
            {
                selectionStart  = UserName.SelectionStart;
                selectionLength = UserName.SelectionLength;

                UserName.Text           = UserName.Text.Insert(UserName.SelectionStart, e.Character);
                UserName.SelectionStart = selectionStart;
                if (!string.IsNullOrEmpty(e.Character))
                {
                    UserName.Text           = UserName.Text.Remove(UserName.SelectionStart + 1, selectionLength);
                    UserName.SelectionStart = selectionStart + 1;
                }

                UserName.Focus();
            }
            else if (_lastFocusedInputControlName.Equals(InputControlNames.Password))
            {
                Password.Password = Password.Password + e.Character;
                SetSelection(Password, Password.Password.Length, 0);
                Password.Focus();
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// Handles the OnTextButtonClicked event of the ZipcodeNumericKeyboard control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="TextButtonClickedEventArgs" /> instance containing the event data.</param>
        protected void ZipcodeNumericKeyboard_OnTextButtonClicked(object sender, TextButtonClickedEventArgs e)
        {
            if (e.Character == "Del")
            {
                ZipCodeTextBox.Text = string.Empty;
            }
            else
            {
                SendInput(ZipCodeTextBox, e.Character);
            }

            ZipCodeTextBox.Focus();
        }
        /// <summary>
        /// Handles the OnTextButtonClicked event of the MembershipKeyboard control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="TextButtonClickedEventArgs" /> instance containing the event data.</param>
        protected void MembershipKeyboard_OnTextButtonClicked(object sender, TextButtonClickedEventArgs e)
        {
            SendInput(MembershipTextBox, e.Character);

            MembershipTextBox.Focus();
        }
        /// <summary>
        /// Handles the OnTextButtonClicked event of the MembershipKeyboard control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="TextButtonClickedEventArgs" /> instance containing the event data.</param>
        protected void MembershipKeyboard_OnTextButtonClicked(object sender, TextButtonClickedEventArgs e)
        {
            SendInput(_currentControl, e.Character);

            _currentControl.Focus();
        }