Esempio n. 1
0
        void CalculateLeftRight(Point current, bool isInertial)
        {
            if (isInertial && !_isSwiped)
            {
                var swipedDistance = current.X;
                if (Math.Abs(swipedDistance) <= MAX_SWIPE_DISTANCE)
                {
                    return;
                }

                if (swipedDistance > 0)
                {
                    RightSwipe?.Invoke(this, EventArgs.Empty);
                }
                else
                {
                    LeftSwipe?.Invoke(this, EventArgs.Empty);
                }
                _isSwiped = true;
            }
        }
Esempio n. 2
0
 public void OnRightSwipe(object sender, EventArgs e)
 {
     RightSwipe?.Invoke(this, e);
 }