예제 #1
0
        protected virtual void OnKeyboardChangeView(KeyRoutedEventArgs e)
        {
            if (IsCtrlKeyPressed())
            {
                switch (e.Key)
                {
                case VirtualKey.PageUp:
                case VirtualKey.F:
                    OnFrontView?.Invoke(Viewport, EventArgs.Empty);
                    e.Handled = true;
                    break;

                case VirtualKey.PageDown:
                case VirtualKey.B:
                    OnBackView?.Invoke(Viewport, EventArgs.Empty);
                    e.Handled = true;
                    break;

                case VirtualKey.Left:
                case VirtualKey.L:
                    OnLeftView?.Invoke(Viewport, EventArgs.Empty);
                    e.Handled = true;
                    break;

                case VirtualKey.Right:
                case VirtualKey.R:
                    OnRightView?.Invoke(Viewport, EventArgs.Empty);
                    e.Handled = true;
                    break;

                case VirtualKey.Up:
                case VirtualKey.U:
                    OnTopView?.Invoke(Viewport, EventArgs.Empty);
                    e.Handled = true;
                    break;

                case VirtualKey.Down:
                case VirtualKey.D:
                    OnBottomView?.Invoke(Viewport, EventArgs.Empty);
                    e.Handled = true;
                    break;
                }
            }
        }
예제 #2
0
 protected void RaiseOnFrontView()
 {
     OnFrontView?.Invoke(Viewport, EventArgs.Empty);
 }