예제 #1
0
 public WidgetCollection FindByName(params string[] names)
 {
     return(WidgetCollection.From(names.Select(n =>
                                               IncludeChildren()
                                               .FirstOrDefault(w => w.Name() == n))
                                  .Where(w => w != null)));
 }
예제 #2
0
 public WidgetCollection Children(Func <Widget, bool> predicate)
 {
     return(WidgetCollection.From(Children().Where(predicate)));
 }
예제 #3
0
        public WidgetCollection Children()
        {
            var i = Item as UIItemContainer;

            return(WidgetCollection.From(i == null ? Enumerable.Empty <IUIItem>() : i.Items));
        }
예제 #4
0
 public WidgetCollection Windows()
 {
     return(WidgetCollection.From(Desktop.Instance.Windows()));
 }
예제 #5
0
 public WidgetCollection Filter(Func <Widget, bool> predicate)
 {
     return(WidgetCollection.From(Widgets.Where(predicate)));
 }
예제 #6
0
 public WidgetCollection Children()
 {
     return(WidgetCollection.From(Widgets.SelectMany(w => w.Children().Widgets)));
 }
예제 #7
0
 public WidgetCollection IncludeChildren()
 {
     return(WidgetCollection.From(Widgets.SelectMany(w => w.Children().Widgets).Concat(Widgets).Distinct()));
 }