private void textBoxTargetWord_Enter(object sender, EventArgs e) { if (!String.IsNullOrEmpty(_strTargetKeyboard)) { KeyboardController.ActivateKeyboard(_strTargetKeyboard); } contextMenuStripAmbiguityPicker.Items.Clear(); if (String.IsNullOrEmpty(textBoxTargetWord.Text)) { return; } // if we have multiple interpretations, then throw up a choice list if (textBoxTargetWord.Text.IndexOf(strAmbiguitySeparator) != -1) { string[] astrWords = textBoxTargetWord.Text.Split(strAmbiguitySeparator.ToCharArray(), StringSplitOptions.RemoveEmptyEntries); foreach (string strWord in astrWords) { ToolStripMenuItem aTSMI = new ToolStripMenuItem(strWord, null, OnSelectAmbiguity); aTSMI.Font = textBoxTargetWord.Font; contextMenuStripAmbiguityPicker.Items.Add(aTSMI); } contextMenuStripAmbiguityPicker.Show(textBoxTargetWord, textBoxTargetWord.Bounds.Location, ToolStripDropDownDirection.BelowRight); } }
private void _keyman7TestBox_Enter(object sender, EventArgs e) { #if WANT_PORT string name = KeyboardController.GetAvailableKeyboards(KeyboardController.Engines.Keyman7)[0].ShortName; KeyboardController.ActivateKeyboard(name); #endif }
protected void SetKeyboard(string strKeybaordToSet) { if (!String.IsNullOrEmpty(strKeybaordToSet)) { KeyboardController.ActivateKeyboard(strKeybaordToSet); } }
private void _keyman6TestBox_Enter(object sender, EventArgs e) { if (KeyboardController.EngineAvailable(KeyboardController.Engines.Keyman6)) { string name = KeyboardController.GetAvailableKeyboards(KeyboardController.Engines.Keyman6)[0].Name; KeyboardController.ActivateKeyboard(name); } MessageBox.Show("keyman 6 not available"); }
protected void KeepTrackOfLastTextBoxSelected() { _inTextBox = this; if (!String.IsNullOrEmpty(_strKeyboardName)) { KeyboardController.ActivateKeyboard(_strKeyboardName); } if (_nLastVerse != _ctrlVerseParent.VerseNumber) { _nLastVerse = _ctrlVerseParent.VerseNumber; // start a timer that will wake up shortly and set the focus to the other panes as well. _ctrlVerseParent.TheSE.myFocusTimer.Tag = _ctrlVerseParent.VerseNumber; _ctrlVerseParent.TheSE.myFocusTimer.Start(); } }