public bool HasGesture(GestureType gestureType, Rectangle area, out GestureSample gesture) { for (int i = 0; i < _gestures.Count; i++) { if (gestureType.ContainsFlag(_gestures[i].GestureType) && area.Contains(_gestures[i].Position)) { gesture = _gestures[i]; return true; } } gesture = default(GestureSample); return false; }
public IEnumerable<GestureSample> GetGesturesAt(GestureType gestureType, Rectangle area) { for (int i = 0; i < _gestures.Count; i++) { if (gestureType.ContainsFlag(_gestures[i].GestureType) && area.Contains(_gestures[i].Position)) { yield return _gestures[i]; } } }
public bool HasGesture(GestureType gestureType, out GestureSample gesture) { for (int i = 0; i < _gestures.Count; i++) { if (gestureType.ContainsFlag(_gestures[i].GestureType)) { gesture = _gestures[i]; return true; } } gesture = default(GestureSample); return false; }