public TrackTouchDown ( Point position, System.DateTime timestamp ) : void | ||
position | Point | |
timestamp | System.DateTime | |
Résultat | void |
public void TrackTouchDown(Point position, DateTime timestamp)
{
if (IsCompleted || IsAborted)
return;
this.TouchDownTime = timestamp;
this.StartPoint = position;
IsStarted = true;
OnGestureStarted();
_timer.Start();
}
public void TrackTouchDown(Point position, DateTime timestamp) { if (IsCompleted || IsAborted) { return; } if (!firstTap.IsStarted) { firstTap.TrackTouchDown(position, timestamp); IsStarted = true; OnGestureStarted(); } else if (!secondTap.IsStarted) { Vector delta = position - firstTap.EndPoint; if (delta.Length > _maxMovement) { AbortGesture(); return; } _timer.Stop(); secondTap.TrackTouchDown(position, timestamp); } else { AbortGesture(); } }