本文整理汇总了C#中Microsoft.Contains方法的典型用法代码示例。如果您正苦于以下问题:C# Microsoft.Contains方法的具体用法?C# Microsoft.Contains怎么用?C# Microsoft.Contains使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Microsoft
的用法示例。
在下文中一共展示了Microsoft.Contains方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CheckPreviousVersion
/// <summary>
/// Check previous version.
/// </summary>
/// <param name="fid">The file identifier.</param>
/// <param name="previousVersion">The previous version.</param>
/// <param name="isSucceed">Indicate whether the checking is successful or not.</param>
public void CheckPreviousVersion(int fid, Microsoft.Modeling.Set<int> previousVersion, out bool isSucceed)
{
string streamString = Site.Properties["SmbTestCasePreviousVersion"] as string;
if (string.IsNullOrEmpty(streamString))
{
isSucceed = false;
return;
}
int startIndex = (int)uint.MinValue;
while (streamString.IndexOf(Semicolon, startIndex) >= uint.MinValue)
{
int endIndex = streamString.IndexOf(Semicolon, startIndex);
string gmtToken = streamString.Substring(startIndex, endIndex - startIndex);
int gmtIndex = Int32.Parse(gmtToken.Substring(0, gmtToken.IndexOf(Comma)));
string gmtString = gmtToken.Substring(gmtToken.IndexOf(Comma) + 1);
if (previousVersion.Contains(gmtIndex))
{
this.gmtTokens.Add(gmtIndex, gmtString);
}
startIndex = endIndex + 1;
}
isSucceed = true;
}
示例2: MouseInside
public bool MouseInside(Microsoft.Xna.Framework.Rectangle rect)
{
return rect.Contains(currentMouseState.X, currentMouseState.Y);
}
示例3: MouseEntered
public bool MouseEntered(Microsoft.Xna.Framework.Rectangle rect)
{
return !rect.Contains(previousMouseState.X, previousMouseState.Y)
&& rect.Contains(currentMouseState.X, currentMouseState.Y);
}
示例4: TouchWithin
/// <summary>
/// Determines if there is a touch (Moved or Pressed) within
/// the given rectangle.
/// </summary>
/// <param name="rectangle"></param>
/// <returns></returns>
/// <remarks>
/// Returns the momentary result. Does not keep track of last frame.
/// </remarks>
public bool TouchWithin(Microsoft.Xna.Framework.Rectangle rectangle)
{
foreach (var location in CurrentTouchCollection)
{
if (location.State == TouchLocationState.Pressed || location.State == TouchLocationState.Moved)
{
if (rectangle.Contains(location.Position.ToPoint()))
return true;
}
}
return false;
}