コード例 #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
ファイル: 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);
         }
     }
 }
コード例 #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
ファイル: CachedUIItems.cs プロジェクト: timotei/White
        public virtual UIItemCollection GetAll(Predicate <AutomationElement> predicate, IUIItemFactory factory, IActionListener actionListener)
        {
            List <AutomationElement> foundElements = list.FindAll(predicate);

            return(new UIItemCollection(foundElements, factory, actionListener));
        }
コード例 #5
0
ファイル: CachedUIItems.cs プロジェクト: timotei/White
        private UIItemCollection GetAll(SearchCriteria searchCriteria, IActionListener actionListener, IUIItemFactory factory)
        {
            List <AutomationElement> automationElements = searchCriteria.Filter(list);

            return(new UIItemCollection(automationElements.ToArray(), factory, actionListener));
        }
コード例 #6
0
ファイル: CachedUIItems.cs プロジェクト: timotei/White
 public virtual T Get <T>(SearchCriteria searchCriteria, IActionListener actionListener, IUIItemFactory factory) where T : UIItem
 {
     return((T)Get(searchCriteria.AndControlType(typeof(T), WindowsFramework.None), actionListener, factory));
 }