internal void SetMainHierarchy(ConfigurationUIHierarchy hierarchy) { treeView.Nodes.Clear(); solutionNode = new SolutionConfigurationNode(); solutionTreeNode = treeNodeFactory.Create(solutionNode); treeView.Nodes.Add(solutionTreeNode); // the hierarchy of configuration nodes will not include the solution node // the app and solution nodes will be related by the tree nodes poiting to them, // and the hierarchy will be overriden to point to the app node. // The stand alone tool does something similar - see Microsoft.Practices.EnterpriseLibrary.Configuration.Console.OnHierarchyAdded mainConfigurationHierarchy = hierarchy; solutionTreeNode.Nodes.Add(treeNodeFactory.Create(hierarchy.RootNode)); solutionTreeNode.Expand(); ServiceHelper.GetUIHierarchyService(serviceProvider).SelectedHierarchy = hierarchy; IErrorLogService errorService = ServiceHelper.GetErrorService(serviceProvider); List <Task> tasks = GetTasksFromErrorService(errorService); adapter.DoTasksChanged(tasks); }
/// <devdoc> /// Creates a ConfigurationTreeNode using the TreeNodeFactory of the current ConfigurationTreeView. /// </devdoc> protected ConfigurationTreeNode CreateChildNode(ConfigurationNode node) { ConfigurationTreeNode treeNode = childNodeFactory.Create(node); return(treeNode); }