示例#1
0
 /// <summary>
 /// Determines whether this instance can prevent the specified gesture.
 /// </summary>
 /// <param name="gesture">The gesture.</param>
 /// <returns>
 ///   <c>true</c> if this instance can prevent the specified gesture; otherwise, <c>false</c>.
 /// </returns>
 public virtual bool CanPreventGesture(Gesture gesture)
 {
     if (Delegate == null)
     {
         if (gesture.CanBePreventedByGesture(this))
         {
             if (shouldRecognizeWith.Contains(gesture.GetInstanceID()))
             {
                 return(false);
             }
             else
             {
                 return(true);
             }
         }
         else
         {
             return(false);
         }
     }
     else
     {
         return(!Delegate.ShouldRecognizeSimultaneously(this, gesture));
     }
 }
示例#2
0
 /// <summary>
 /// Determines whether this instance can prevent the specified gesture.
 /// </summary>
 /// <param name="gesture"> The gesture. </param>
 /// <returns> <c>true</c> if this instance can prevent the specified gesture; <c>false</c> otherwise. </returns>
 public virtual bool CanPreventGesture(Gesture gesture)
 {
     if (Delegate == null)
     {
         if (gesture.CanBePreventedByGesture(this))
         {
             return(!IsFriendly(gesture));
         }
         return(false);
     }
     return(!Delegate.ShouldRecognizeSimultaneously(this, gesture));
 }
示例#3
0
 /// <summary>
 /// Determines whether this instance can prevent the specified gesture.
 /// </summary>
 /// <param name="gesture"> The gesture. </param>
 /// <returns> <c>true</c> if this instance can prevent the specified gesture; <c>false</c> otherwise. </returns>
 public virtual bool CanPreventGesture(Gesture gesture)
 {
     if (Delegate == null)
     {
         if (gesture.CanBePreventedByGesture(this)) return !IsFriendly(gesture);
         return false;
     }
     return !Delegate.ShouldRecognizeSimultaneously(this, gesture);
 }
示例#4
0
 /// <summary>
 /// Determines whether this instance can prevent the specified gesture.
 /// </summary>
 /// <param name="gesture">The gesture.</param>
 /// <returns>
 ///   <c>true</c> if this instance can prevent the specified gesture; otherwise, <c>false</c>.
 /// </returns>
 public virtual bool CanPreventGesture(Gesture gesture)
 {
     if (Delegate == null)
     {
         if (gesture.CanBePreventedByGesture(this))
         {
             if (shouldRecognizeWith.Contains(gesture.GetInstanceID()))
             {
                 return false;
             } else
             {
                 return true;
             }
         } else
         {
             return false;
         }
     } else
     {
         return !Delegate.ShouldRecognizeSimultaneously(this, gesture);
     }
 }