public KeyPressWindow() { InitializeComponent(); SetFormState(); TextBoxKeyPress.Focus(); ComboBoxBreak.SelectedIndex = 0; ComboBoxKeyPressTime.SelectedIndex = 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(); }
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(); }
private void ButtonDelete_OnClick(object sender, RoutedEventArgs e) { try { TextBoxKeyPress.Text = string.Empty; TextBoxKeyPress.Focus(); SetFormState(); } catch (Exception ex) { Common.ShowErrorMessageBox(ex); } }
private void KeyPressReadingWindow_OnLoaded(object sender, RoutedEventArgs e) { try { if (_loaded) { return; } TextBoxKeyPress.Focus(); _loaded = true; } catch (Exception ex) { Common.ShowErrorMessageBox(ex); } }