コード例 #1
0
ファイル: UIItemList.cs プロジェクト: timotei/White
 public UIItemList(List <AutomationElement> collection, IUIItemFactory factory, IActionListener actionListener)
 {
     foreach (AutomationElement element in collection)
     {
         Add((T)factory.Create(element, actionListener));
     }
 }
コード例 #2
0
        public static T GetParent <T>(this IUIItem thisItem) where T : IUIItem
        {
            var parent = Desktop.Automation.TreeWalkerFactory.GetControlViewWalker().GetParent(thisItem.AutomationElement);
            var uiItem = ItemFactory.Create(parent, thisItem.ActionListener);

            return((T)UIItemProxyFactory.Create(uiItem, uiItem.ActionListener));
        }
コード例 #3
0
ファイル: CachedUIItems.cs プロジェクト: timotei/White
        public virtual IUIItem Get(SearchCriteria searchCriteria, IActionListener actionListener, IUIItemFactory factory)
        {
            List <AutomationElement> automationElements = searchCriteria.Filter(list);

            if (automationElements.Count == 0)
            {
                return(null);
            }
            return(factory.Create(automationElements[0], actionListener));
        }
コード例 #4
0
ファイル: UIItemCollection.cs プロジェクト: sireniaeu/white
 public UIItemCollection(IEnumerable automationElements, IUIItemFactory uiItemFactory, IActionListener actionListener)
 {
     foreach (AutomationElement automationElement in automationElements)
     {
         IUIItem uiItem = uiItemFactory.Create(automationElement, actionListener);
         if (uiItem != null)
         {
             Add(uiItem);
         }
     }
 }