public int IndexOf(GroupViewItem item) { int count = this.Count; for (int i = 0; i < count; i++) { if (this[i] == item) { return i; } } return -1; }
public void Remove(GroupViewItem value) { this._items.Remove(value); }
public void AddRange(GroupViewItem[] items) { foreach (GroupViewItem item in items) { this.Add(item); } }
public bool Contains(GroupViewItem item) { return (this.IndexOf(item) != -1); }
public void Add(GroupViewItem value) { this._items.Add(value); this._owner.OnItemAdded(value); }
internal void OnItemRemoved(GroupViewItem item) { if (this._groupListView != null) { int index = -1; int num2 = 0; foreach (GroupViewListViewItem item2 in this._groupListView.Items) { if (item2.GroupViewItem == item) { index = num2; break; } num2++; } if (index != -1) { this._groupListView.Items.RemoveAt(index); } } }
internal void OnItemAdded(GroupViewItem item) { if (this._groupListView != null) { int index = this._items.IndexOf(item); GroupViewListViewItem item2 = new GroupViewListViewItem(item); this._groupListView.Items.Insert(index, item2); } }
private void OnGroupViewItemDrag(object sender, ItemDragEventArgs e) { this._dragItem = null; if (this._allowDrag) { GroupViewItem groupViewItem = ((GroupViewListViewItem) e.Item).GroupViewItem; DataObject dragDropDataObject = groupViewItem.GetDragDropDataObject(); if (dragDropDataObject != null) { this._dragItem = groupViewItem; if (this._dragCursor != IntPtr.Zero) { Interop.DestroyCursor(this._dragCursor); this._dragCursor = IntPtr.Zero; } this._lastDragEffect = DragDropEffects.None; base.DoDragDrop(dragDropDataObject, DragDropEffects.Move | DragDropEffects.Copy); } } }
public GroupViewItemEventArgs(GroupViewItem item) { this._item = item; }