コード例 #1
0
 public virtual UIItemCollection UIItems(ActionListener actionListener)
 {
     if (uiItemCollection != null)
     {
         return(uiItemCollection);
     }
     uiItemCollection = new UIItemCollection();
     foreach (AutomationElement automationElement in list)
     {
         uiItemCollection.Add(dictionaryMappedItemFactory.Create(automationElement, actionListener));
     }
     return(uiItemCollection);
 }
コード例 #2
0
ファイル: PrimaryUIItemFactory.cs プロジェクト: ritro/White
        public virtual UIItemCollection ItemsWithin(Rect bounds, ActionListener actionListener)
        {
            var collection = new UIItemCollection();
            List<AutomationElement> descendants = Finder.Descendants(AutomationSearchCondition.All);
            foreach (AutomationElement automationElement in descendants)
            {
                if (!bounds.Contains(automationElement.Current.BoundingRectangle)) continue;

                var factory = new DictionaryMappedItemFactory();
                collection.Add(factory.Create(automationElement, actionListener));
            }
            return collection;
        }
コード例 #3
0
        public virtual UIItemCollection ItemsWithin(Rect bounds, ActionListener actionListener)
        {
            var collection = new UIItemCollection();
            List <AutomationElement> descendants = finder.Descendants(AutomationSearchCondition.All);

            foreach (AutomationElement automationElement in descendants)
            {
                if (!bounds.Contains(automationElement.Current.BoundingRectangle))
                {
                    continue;
                }

                var factory = new DictionaryMappedItemFactory();
                collection.Add(factory.Create(automationElement, actionListener));
            }
            return(collection);
        }