internal void AddToListView(DataTreeListView listView) { this.isInListView = true; if (base.Index < 0 && listView != null) { int num; if (this.Parent == null) { num = listView.Items.Count; } else { int num2 = this.Parent.ChildrenItems.IndexOf(this); if (num2 == 0) { num = this.Parent.Index + 1; } else if (this.Parent.ChildrenItems[num2 - 1].Index > 0) { num = this.Parent.ChildrenItems[num2 - 1].GetNextSiblingListViewIndex(); } else { num = -1; } } if (num >= 0) { listView.Items.Insert(num, this); } } this.BindToChildDataSources(); this.RecreateChildItems(); listView.RestoreItemStates(this); }