Example #1
0
        public TreeNode BuildLaunchTreeUI()
        {
            TreeNode rootNode = new TreeNode();

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

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

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

                    //case "Environment":
                    //    {
                    //        var topNode = Environment.BuildTreeUI("Environment", rootNode);
                    //        topNode.Expand();
                    //    }
                    //    break;
                    //case "QtKeysCleanup":
                    //    {
                    //        var topNode = QtKeysCleanup.BuildTreeUI("QtKeysCleanup", rootNode);
                    //        topNode.Expand();
                    //    }
                    //    break;
                    case "FileWriteN":
                    {
                        TreeNode topNode = new TreeNode("FileWriteN");
                        foreach (var fileWriteSection in FileWriteN)
                        {
                            fileWriteSection.BuildTreeUI(fileWriteSection.SectionName, topNode);
                        }
                        rootNode.Nodes.Add(topNode);
                        topNode.Expand();
                    }
                    break;

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

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

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

            return(rootNode);
        }