コード例 #1
0
        private void PhysicalAppend(DriverCompositeWidget parent, Widget child)
        {
            if (parent == null)
            {
                return;
            }

            if (child.DriverObject == null)
            {
                //no driver object to append, but it might be a composite container so apply recursivly
                CompositeWidget cw = child as CompositeWidget;
                if (cw != null)
                {
                    foreach (Widget wi in cw.Children)
                    {
                        PhysicalAppend(parent, wi);
                    }
                }
            }
            else
            {
                DriverWidget ch = child.DriverObject as DriverWidget;
                if (ch != null)
                {
                    parent.Append(ch);
                }
            }
        }