protected virtual void ManageTapGesture(bool register, OnGestureRecognized callBackMethod) { if (register) { OnTapGesture += callBackMethod; } else { OnTapGesture -= callBackMethod; } }
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; } }
public virtual void UnsubscribeToGestureEvent(GestureType gestureType, OnGestureRecognized callbackMethod) { ManageGestureEvents(gestureType, false, callbackMethod); }