示例#1
0
        private void SetButtonStateTo(MouseButton button, SharpDX.Toolkit.Input.ButtonState state)
        {
            switch (button)
            {
            case MouseButton.None:
                break;

            case MouseButton.Left:
                left = state;
                break;

            case MouseButton.Middle:
                middle = state;
                break;

            case MouseButton.Right:
                right = state;
                break;

            case MouseButton.XButton1:
                xButton1 = state;
                break;

            case MouseButton.XButton2:
                xButton2 = state;
                break;

            default:
                throw new ArgumentOutOfRangeException("button");
            }
        }
示例#2
0
 private void SetButtonStateTo(MouseButton button, SharpDX.Toolkit.Input.ButtonState state)
 {
     switch (button)
     {
         case MouseButton.None:
             break;
         case MouseButton.Left:
             left = state;
             break;
         case MouseButton.Middle:
             middle = state;
             break;
         case MouseButton.Right:
             right = state;
             break;
         case MouseButton.XButton1:
             xButton1 = state;
             break;
         case MouseButton.XButton2:
             xButton2 = state;
             break;
         default:
             throw new ArgumentOutOfRangeException("button");
     }
 }