public List <TComponent> WithTexts(String text)
        {
            List <WinComponent> childs = new WinceComponentsFinder().ListChilds(handle);

            return((from e in childs
                    where isKind(e) && text == e.Text
                    orderby e.Top, e.Left
                    select componentFactory(e.Handle)).ToList());
        }
Пример #2
0
        public int Compare(WinceComponent x, WinceComponent y)
        {
            var r = WinceComponentsFinder.IntCompare(x.Location.Y, y.Location.Y);

            if (r == 0)
            {
                return(WinceComponentsFinder.IntCompare(x.Location.X, y.Location.X));
            }
            return(r);
        }
Пример #3
0
        WinceComponent Tree(IntPtr handle)
        {
            var cmp = new ComponentComparer();

            var elems = WinceComponentsFinder.RecursiveFindWindow <WinceComponent>(handle,
                                                                                   FromWinComponent,
                                                                                   (p, c) =>
            {
                AddSorted(p.Children, c, cmp);
                c.Parent = p;
                return(p);
            });

            return(elems);
        }