Esempio n. 1
0
 private void btnBS_Click(object sender, RoutedEventArgs e)
 {
     if (txtInput.Visibility == Visibility.Visible)
     {
         txtInput.Focus();
     }
     else
     {
         pwdInput.Focus();
     }
     MySendKey.SendKeyPress(MySendKey.KeyCode.BACKSPACE);
 }
Esempio n. 2
0
        private void btnCaps_CheckedChanged(object sender, RoutedEventArgs e)
        {
            bool capslock = Keyboard.GetKeyStates(Key.CapsLock) == KeyStates.Toggled;

            if (btnCaps.IsChecked != capslock)
            {
                MySendKey.SendKeyPress(MySendKey.KeyCode.CAPS_LOCK);
            }
            if (txtInput.Visibility == Visibility.Visible)
            {
                txtInput.Focus();
            }
            else
            {
                pwdInput.Focus();
            }
            Display_KeyChar();
        }
Esempio n. 3
0
        private void btnKeyin_Click(object sender, RoutedEventArgs e)
        {
            if (txtInput.Visibility == Visibility.Visible)
            {
                txtInput.Focus();
            }
            else
            {
                pwdInput.Focus();
            }

            string inStr = (sender as Button).Tag.ToString();

            char[] inChar = inStr.ToCharArray();
            if (inChar.Length > 0)
            {
                MySendKey.SendKeyPress((MySendKey.KeyCode)inChar[0]);
            }
        }