Пример #1
0
 /// <summary>Creates a new <see cref="JoystickEventArgs"/> instance.</summary>
 public JoystickEventArgs(RoutedEvent ev, JoystickGesture gesture, InputSource inputSource) : base(ev) {
    Gesture = gesture;
    InputSource = inputSource;
 }
Пример #2
0
 /// <summary>Creates a new <see cref="JoystickEventArgs"/> instance.</summary>
 public JoystickEventArgs(RoutedEvent ev, JoystickGesture gesture) : base(ev) {
    Gesture = gesture;
    InputSource = InputSource.Unknown;
 }
Пример #3
0
 private bool _matchesExact(JoystickGesture[] flags) {
    for (var i = 0; i < flags.Length; i++) {
       if (_matchesExact(flags[i])) return true;
    }
    return false;
 }
Пример #4
0
 private JoystickGesture _maskout(JoystickGesture flags) {
    if ((Gesture & flags) != flags) return JoystickGesture.None;
    var code = (int)Gesture;
    var mask = (int)0x0000FFFF;
    return (JoystickGesture)(code & mask);
 }
Пример #5
0
 private bool _matchesExact(JoystickGesture flags) {
    return ((Gesture & flags) == flags);
 }