public void AddAt(int index, MyTreeNode child) { this.items.Insert(index, child); child.SetParent(this.parent); child.Tree = this.tree; for (int i = index + 1; i < this.items.Count; i++) { if (this.marked) { ((IStateManager)child).TrackViewState(); this.SetDirty(); } } }
internal void Add(MyTreeNode child, bool updateParent) { int num = this.items.Add(child); if ((this.parent == null) || updateParent) { child.SetParent(this.parent); child.Tree = this.tree; if (this.marked) { ((IStateManager)child).TrackViewState(); this.SetDirty(); } } }