internal TreeNode FindNode(string[] path, int pos) { if (pos == path.Length) { return(this._owner); } string str = TreeView.UnEscape(path[pos]); for (int i = 0; i < this.Count; i++) { TreeNode node = this[i]; if (node.Value == str) { return(node.ChildNodes.FindNode(path, pos + 1)); } } return(null); }
internal MenuItem FindItem(string[] path, int pos) { if (pos == path.Length) { return(this._owner); } string str = TreeView.UnEscape(path[pos]); for (int i = 0; i < this.Count; i++) { MenuItem item = this._list[i]; if (item.Value == str) { return(item.ChildItems.FindItem(path, pos + 1)); } } return(null); }
internal MenuItem FindItem(string[] path, int pos) { if (pos == path.Length) { return(_owner); } string pathPart = TreeView.UnEscape(path[pos]); for (int i = 0; i < Count; i++) { MenuItem node = _list[i]; if (node.Value == pathPart) { return(node.ChildItems.FindItem(path, pos + 1)); } } return(null); }