Example #1
0
        /// <summary>
        /// Handle key up events of the code editor component.
        /// </summary>
        /// <param name="s"></param>
        /// <param name="e"></param>
        private void HandleKeyUp(object s, KeyEventArgs e)
        {
            // only disable editing if Ctrl is pressed
            DisableEditing = false;

            switch (e.KeyCode)
            {
            case Keys.F:
                if (e.Control)
                {
                    // start text search
                    DisableEditing = true;
                    FindText.Clear();
                    FindText.Focus();
                }
                break;

            case Keys.R:
                if (e.Control)
                {
                    // select all indicator to allow text replacement
                    DisableEditing = true;
                    SelectIndicators(HighlightIndicatorIndex);
                }
                break;

            case Keys.Space:
                if (e.Control)
                {
                    // show auto complete menu
                    DisableEditing = true;
                    AutoCShow(CurrentPosition);
                }
                break;
            }
        }
Example #2
0
 protected override void OnActivated(EventArgs e)
 {
     FindText.Focus();
     ResetSearch();
 }
 private void OnLoaded(object sender, RoutedEventArgs e)
 {
     FindText.Focus();
 }
Example #4
0
 private void EditFind_Activated(object sender, System.EventArgs e)
 {
     FindText.Focus();
 }
Example #5
0
 private void CommandFind(object sender, ExecutedRoutedEventArgs e)
 {
     FindText.Focus();
 }