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

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