本文整理匯總了C#中TouchScript.Gestures.Gesture.CanBePreventedByGesture方法的典型用法代碼示例。如果您正苦於以下問題:C# Gesture.CanBePreventedByGesture方法的具體用法?C# Gesture.CanBePreventedByGesture怎麽用?C# Gesture.CanBePreventedByGesture使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類TouchScript.Gestures.Gesture
的用法示例。
在下文中一共展示了Gesture.CanBePreventedByGesture方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: CanPreventGesture
/// <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);
}
示例2: CanPreventGesture
/// <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);
}
}