/// <summary> /// Expands scope node in the scope tree /// </summary> private void ExpandScopeNode(ScopeNode node) { if (node != null) { if (!node.Populated) { node.Nodes.Clear(); StartProgress("Loading..."); string text = node.Text; node.Text += " expanding..."; scopeTree.Update(); scopeTree.BeginUpdate(); switch (node.NodeType) { /*case NodeType.Servers: * LoadServers(node); * break; * case NodeType.Server: * LoadServerComponents(node); * break;*/ case NodeType.Components: LoadInstalledComponents(node); break; } node.Text = text; node.Populated = true; node.Expand(); scopeTree.EndUpdate(); FinishProgress(); } } }
/// <summary> /// Adds predefined nodes /// </summary> private void AddDefaultNodes() { scopeTree.Nodes.Clear(); ScopeNode componentsNode = AddScopeNode(null, "Components", Properties.Resources.Folder32, Properties.Resources.Folder16, new ComponentsControl(), NodeType.Components, null); AddScopeNode(null, "Application Settings", Properties.Resources.Tool32, Properties.Resources.Tool16, new SettingsControl(), NodeType.Settings, null); componentsNode.Expand(); ExpandScopeNode(componentsNode); scopeTree.SelectedNode = componentsNode; }