public UIElementCollection GetFormElement(UIElementEntityTypeCollection controlType, bool findInnerElement)
        {
            UIElementCollection collection = new UIElementCollection(this);

            foreach (UIElement formElement in this.Elements)
            {
                if (controlType.Allowable(formElement))
                {
                    collection.Add(formElement);
                }

                if (findInnerElement)
                {
                    //查找InnerElement
                    foreach (UIElement innerElement in formElement.GetInnerElement())
                    {
                        if (controlType.Allowable(innerElement) == false)
                        {
                            continue;
                        }

                        collection.Add(innerElement);
                    }
                }
            }

            return(collection);
        }
        /// <summary>
        /// 获取窗体元素集合
        /// findInnerElement指定是否包括InnerElement
        /// </summary>
        /// <param name="findInnerElement">是否包括InnerElement</param>
        /// <returns></returns>
        public UIElementCollection GetFormElement(bool findInnerElement)
        {
            UIElementEntityTypeCollection enumFormElementControlTypeCollection =
                new UIElementEntityTypeCollection();

            return(GetFormElement(enumFormElementControlTypeCollection, findInnerElement));
        }
 /// <summary>
 /// 包括InnerElement
 /// </summary>
 /// <param name="controlType"></param>
 /// <returns></returns>
 public UIElementCollection GetFormElement(UIElementEntityTypeCollection controlType)
 {
     return(GetFormElement(controlType, true));
 }