Exemplo n.º 1
0
        public static IEnumerable <System.Windows.Forms.Control> GetControls(System.Windows.Forms.Form _container)
        {
            List <System.Windows.Forms.Control> cl = new List <System.Windows.Forms.Control>();

            if (_container.HasChildren)
            {
                foreach (System.Windows.Forms.Control c in _container.Controls)
                {
                    cl.AddRange(ControlWrapper.GetControls(c));
                }
            }
            return(cl);
        }
Exemplo n.º 2
0
        public static IEnumerable <FakeControl> GetFakeControls(System.Windows.Forms.Form _container)
        {
            List <FakeControl>    cl          = new List <FakeControl>();
            IFakeControlContainer fccontainer = _container as IFakeControlContainer;

            if (fccontainer != null)
            {
                foreach (FakeControl c in fccontainer.Controls)
                {
                    cl.AddRange(ControlWrapper.GetFakeControls(c));
                }
            }
            else
            {
                if (_container.HasChildren)
                {
                    foreach (System.Windows.Forms.Control c in _container.Controls)
                    {
                        cl.AddRange(ControlWrapper.GetFakeControls(c));
                    }
                }
            }
            return(cl);
        }