示例#1
0
 public void AddAllContentText(ScreenContent ScreenContent)
 {
     // loop for each item within the content array.
     foreach (var contentItem in ScreenContent.ContentItems())
     {
         if (contentItem is ContentText)
         {
             ContentItemBase item = null;
             var             rc   = this.TryGetValue(contentItem.RowCol, out item);
             if (rc == false)
             {
                 this.Add(contentItem.RowCol, contentItem);
             }
         }
     }
 }
示例#2
0
        public static ContentItemBase GetContentItem(this ScreenContent Content, IScreenLoc loc)
        {
            ContentItemBase foundItem = null;

            foreach (var contentItem in Content.ContentItems())
            {
                var itemLoc = contentItem.RowCol as IScreenLoc;
                var range   = new ScreenLocRange(
                    itemLoc, contentItem.GetItemLength(Content), Content.ScreenDim);
                if (range.Contains(loc))
                {
                    foundItem = contentItem;
                    break;
                }
            }
            return(foundItem);
        }