Exemple #1
0
        public TreeNode BuildTreeUI()
        {
            TreeNode rootNode = new TreeNode();

            foreach (PropertyDescriptor item in TypeDescriptor.GetProperties(this))
            {
                if (item.IsBrowsable)
                {
                    switch (item.Name)
                    {
                    case "Format":
                    {
                        var topNode = Format.BuildTreeUI("Format", rootNode);
                        topNode.Expand();
                    }
                    break;

                    case "Details":
                    {
                        var topNode = Details.BuildTreeUI("Details", rootNode);
                        topNode.Expand();
                    }
                    break;

                    case "License":
                    {
                        var topNode = License.BuildTreeUI("License", rootNode);
                        topNode.Expand();
                    }
                    break;

                    case "Version":
                    {
                        var topNode = Version.BuildTreeUI("Version", rootNode);
                        topNode.Expand();
                    }
                    break;

                    case "SpecialPaths":
                    {
                        var topNode = SpecialPaths.BuildTreeUI("SpecialPaths", rootNode);
                        topNode.Expand();
                    }
                    break;

                    case "Dependencies":
                    {
                        var topNode = Dependencies.BuildTreeUI("Dependencies", rootNode);
                        topNode.Expand();
                    }
                    break;

                    case "Control":
                    {
                        var topNode = Control.BuildTreeUI("Control", rootNode);
                        topNode.Expand();
                    }
                    break;
                    }
                }
            }

            return(rootNode);
        }