TrackTouchDown() public method

public TrackTouchDown ( Point position, System.DateTime timestamp ) : void
position Point
timestamp System.DateTime
return void
コード例 #1
0
        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();
            }
        }