public void Add(ProjectTreeNode treeNode) { this._sortedProjectNodes.Add(treeNode.Text, treeNode); int index = this._sortedProjectNodes.IndexOfKey(treeNode.Text); this.Nodes.Insert(index, treeNode); }
private void SaveSettings() { Water.Dictionary Settings = (Water.Dictionary)Water.Environment.Identify("Settings"); if (this._treeNode != null) { if (this._treeNode is TreeNodes.SolutionTreeNode) { TreeNodes.SolutionTreeNode solutionTreeNode = (TreeNodes.SolutionTreeNode) this._treeNode; Settings["Project.Path"] = solutionTreeNode.Path; } else if (this._treeNode is TreeNodes.ProjectTreeNode) { TreeNodes.ProjectTreeNode projectTreeNode = (TreeNodes.ProjectTreeNode) this._treeNode; Settings["Project.Path"] = projectTreeNode.Path; } else { throw new System.Exception("Invalid project node."); } } }