当前位置: 首页>>代码示例>>C#>>正文


C# Microsoft.Contains方法代码示例

本文整理汇总了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;
        }
开发者ID:pyq881120,项目名称:WindowsProtocolTestSuites,代码行数:34,代码来源:Adapter.cs

示例2: MouseInside

 public bool MouseInside(Microsoft.Xna.Framework.Rectangle rect)
 {
     return rect.Contains(currentMouseState.X, currentMouseState.Y);
 }
开发者ID:hvp,项目名称:Gemgine,代码行数:4,代码来源:Input.cs

示例3: MouseEntered

 public bool MouseEntered(Microsoft.Xna.Framework.Rectangle rect)
 {
     return !rect.Contains(previousMouseState.X, previousMouseState.Y)
         && rect.Contains(currentMouseState.X, currentMouseState.Y);
 }
开发者ID:hvp,项目名称:Gemgine,代码行数:5,代码来源:Input.cs

示例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;
        }
开发者ID:johankson,项目名称:io2gamelib,代码行数:22,代码来源:InputManager.cs


注:本文中的Microsoft.Contains方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。