Example #1
0
        private void UserControl_PreviewKeyDown(object sender, KeyEventArgs e)
        {
            switch (e.Key)
            {
            case Key.L:
            {
                if (Keyboard.IsKeyDown(Key.LeftCtrl))
                {
                    MoveNextRemovedRow();
                    e.Handled = true;
                }
            }
            break;

            case Key.O:
            {
                if (Keyboard.IsKeyDown(Key.LeftCtrl))
                {
                    MovePrevRemovedRow();
                    e.Handled = true;
                }
            }
            break;

            case Key.K:
            {
                if (Keyboard.IsKeyDown(Key.LeftCtrl))
                {
                    MoveNextAddedRow();
                    e.Handled = true;
                }
            }
            break;

            case Key.I:
            {
                if (Keyboard.IsKeyDown(Key.LeftCtrl))
                {
                    MovePrevAddedRow();
                    e.Handled = true;
                }
            }
            break;

            case Key.F8:
            {
                MovePrevMatchCell();
                e.Handled = true;
            }
            break;

            case Key.F9:
            {
                MoveNextMatchCell();
                e.Handled = true;
            }
            break;

            case Key.F:
            {
                if (Keyboard.IsKeyDown(Key.LeftCtrl))
                {
                    ToolExpander.IsExpanded = true;
                    SearchTextCombobox.Focus();
                    e.Handled = true;
                }
            }
            break;

            case Key.B:
            {
                if (Keyboard.IsKeyDown(Key.LeftCtrl))
                {
                    ShowLog();
                    e.Handled = true;
                }
            }
            break;
            }
        }
Example #2
0
        private void UserControl_PreviewKeyDown(object sender, KeyEventArgs e)
        {
            switch (e.Key)
            {
            case Key.Right:
            {
                if (Keyboard.IsKeyDown(Key.LeftCtrl))
                {
                    MoveNextModifiedCell();
                    e.Handled = true;
                }
            }
            break;

            case Key.Left:
            {
                if (Keyboard.IsKeyDown(Key.LeftCtrl))
                {
                    MovePrevModifiedCell();
                    e.Handled = true;
                }
            }
            break;

            case Key.Down:
            {
                if (Keyboard.IsKeyDown(Key.LeftCtrl))
                {
                    MoveNextModifiedRow();
                    e.Handled = true;
                }
            }
            break;

            case Key.Up:
            {
                if (Keyboard.IsKeyDown(Key.LeftCtrl))
                {
                    MovePrevModifiedRow();
                    e.Handled = true;
                }
            }
            break;

            case Key.L:
            {
                if (Keyboard.IsKeyDown(Key.LeftCtrl))
                {
                    MoveNextRemovedRow();
                    e.Handled = true;
                }
            }
            break;

            case Key.O:
            {
                if (Keyboard.IsKeyDown(Key.LeftCtrl))
                {
                    MovePrevRemovedRow();
                    e.Handled = true;
                }
            }
            break;

            case Key.K:
            {
                if (Keyboard.IsKeyDown(Key.LeftCtrl))
                {
                    MoveNextAddedRow();
                    e.Handled = true;
                }
            }
            break;

            case Key.I:
            {
                if (Keyboard.IsKeyDown(Key.LeftCtrl))
                {
                    MovePrevAddedRow();
                    e.Handled = true;
                }
            }
            break;

            case Key.F8:
            {
                MovePrevMatchCell();
                e.Handled = true;
            }
            break;

            case Key.F9:
            {
                MoveNextMatchCell();
                e.Handled = true;
            }
            break;

            case Key.F:
            {
                if (Keyboard.IsKeyDown(Key.LeftCtrl))
                {
                    ToolExpander.IsExpanded = true;
                    SearchTextCombobox.Focus();
                    e.Handled = true;
                }
            }
            break;

            case Key.C:
            {
                if (Keyboard.IsKeyDown(Key.LeftCtrl))
                {
                    CopyToClipboardSelectedCells(Keyboard.IsKeyDown(Key.RightShift) || Keyboard.IsKeyDown(Key.LeftShift) ? "," : "\t");
                    e.Handled = true;
                }
            }
            break;

            case Key.B:
            {
                if (Keyboard.IsKeyDown(Key.LeftCtrl))
                {
                    ShowLog();
                    e.Handled = true;
                }
            }
            break;
            }
        }