public KeyPressWindow()
 {
     InitializeComponent();
     SetFormState();
     TextBoxKeyPress.Focus();
     ComboBoxBreak.SelectedIndex        = 0;
     ComboBoxKeyPressTime.SelectedIndex = 0;
 }
Esempio n. 2
0
 public KeyPressReadingBigWindow(bool supportIndefinite = true)
 {
     InitializeComponent();
     SetFormState();
     TextBoxKeyPress.Focus();
     ComboBoxBreak.SelectedIndex        = 0;
     ComboBoxKeyPressTime.SelectedIndex = 0;
     _supportIndefinite = supportIndefinite;
 }
 public KeyPressWindow(KeyPressInfo keyPressInfo)
 {
     InitializeComponent();
     //comboBoxBreak.ItemsSource = Enum.GetValues(typeof(KeyPressLength));
     ComboBoxBreak.SelectedItem        = keyPressInfo.LengthOfBreak;
     TextBoxKeyPress.Text              = keyPressInfo.VirtualKeyCodesAsString;
     ComboBoxKeyPressTime.SelectedItem = keyPressInfo.LengthOfKeyPress;
     SetFormState();
     TextBoxKeyPress.Focus();
 }
Esempio n. 4
0
 public KeyPressReadingBigWindow(KeyPressInfo keyPressInfo, bool supportIndefinite = true)
 {
     InitializeComponent();
     //comboBoxBreak.ItemsSource = Enum.GetValues(typeof(KeyPressLength));
     ComboBoxBreak.SelectedItem        = keyPressInfo.LengthOfBreak;
     TextBoxKeyPress.Text              = keyPressInfo.VirtualKeyCodesAsString;
     ComboBoxKeyPressTime.SelectedItem = keyPressInfo.LengthOfKeyPress;
     _supportIndefinite = supportIndefinite;
     SetFormState();
     TextBoxKeyPress.Focus();
 }
Esempio n. 5
0
 private void ButtonDelete_OnClick(object sender, RoutedEventArgs e)
 {
     try
     {
         TextBoxKeyPress.Text = string.Empty;
         TextBoxKeyPress.Focus();
         SetFormState();
     }
     catch (Exception ex)
     {
         Common.ShowErrorMessageBox(ex);
     }
 }
Esempio n. 6
0
        private void KeyPressReadingWindow_OnLoaded(object sender, RoutedEventArgs e)
        {
            try
            {
                if (_loaded)
                {
                    return;
                }

                TextBoxKeyPress.Focus();
                _loaded = true;
            }
            catch (Exception ex)
            {
                Common.ShowErrorMessageBox(ex);
            }
        }