public void ProcessTouchEvent(TouchType touchType, int x, int y) { var touchCache = new TouchCache(DateTime.Now.AddMilliseconds(MaxSwipeLengthMS), touchType, x, y, touchRects); touchCache.Process(); touchCaches.Add(touchCache); //ignore result for mouseup }
private void ProcessSwipe(TouchCache start, double distance, Point direction) { foreach (var swipeRect in swipeRects) { if (swipeRect.Collides(start.X, start.Y)) { if (!swipeRect.SwipeEventToTrigger(swipeRect, start.X - swipeRect.X, start.Y - swipeRect.Y, direction, distance)) { break; } } } }