Example #1
0
        void LoopLoadWindowCatalog(Guid Parent_id, TreeNode pNode)
        {
            List <CBaseObject> lstWindowCatalog = Program.Ctx.WindowCatalogMgr.GetList();

            foreach (CBaseObject obj in lstWindowCatalog)
            {
                CWindowCatalog catalog = (CWindowCatalog)obj;
                if (catalog.Parent_id == Parent_id)
                {
                    TreeNode node = new TreeNode();
                    node.Text               = catalog.Name;
                    node.ImageIndex         = 10;
                    node.SelectedImageIndex = 10;
                    TreeNodeTag tag = new TreeNodeTag();
                    tag.NodeType = TreeNodeType.WindowCatalog;
                    tag.Data     = catalog;
                    node.Tag     = tag;

                    pNode.Nodes.Add(node);

                    LoopLoadWindowCatalog(catalog.Id, node);
                }
            }
        }