Exemplo n.º 1
0
    int numberOfSwipedFingers(DirectionSwiped direction)
    {
        int count = 0;

        foreach (var item in pointSwiped)
        {
            DirectionSwiped swipe = item.Value;
            if (swipe == direction)
            {
                count += 1;
            }
        }
        return(count);
    }
Exemplo n.º 2
0
    private void NotififyListenerIfSwiped(DirectionSwiped direction)
    {
        int fingers = numberOfSwipedFingers(direction);

        if (fingers >= 1)
        {
            if (SwipeDetected != null)
            {
                SwipeDetected(this, new SwipeEventArgs()
                {
                    Direction = direction, NumberOfTouches = fingers
                });
            }
        }
        if (fingers > 0)
        {
            pointSwiped.Clear();
        }
    }