Exemple #1
0
 protected virtual void ManageTapGesture(bool register, OnGestureRecognized callBackMethod)
 {
     if (register)
     {
         OnTapGesture += callBackMethod;
     }
     else
     {
         OnTapGesture -= callBackMethod;
     }
 }
Exemple #2
0
        protected virtual void ManageGestureEvents(GestureType gestureType, bool state, OnGestureRecognized callBackMethod)
        {
            switch (gestureType)
            {
            case GestureType.PanGesture:
                ManagePanGesture(state, callBackMethod);
                break;

            case GestureType.PinchGesture:
                ManagePinchGesture(state, callBackMethod);
                break;

            case GestureType.RotateGesture:
                ManageRotateGesture(state, callBackMethod);
                break;

            case GestureType.SwipeGesture:
                ManageSwipeGesture(state, callBackMethod);
                break;

            case GestureType.TapGesture:
                ManageTapGesture(state, callBackMethod);
                break;
            }
        }
Exemple #3
0
 public virtual void UnsubscribeToGestureEvent(GestureType gestureType, OnGestureRecognized callbackMethod)
 {
     ManageGestureEvents(gestureType, false, callbackMethod);
 }