Exemple #1
0
 public int IndexOf(GroupViewItem item)
 {
     int count = this.Count;
     for (int i = 0; i < count; i++)
     {
         if (this[i] == item)
         {
             return i;
         }
     }
     return -1;
 }
Exemple #2
0
 public void Remove(GroupViewItem value)
 {
     this._items.Remove(value);
 }
Exemple #3
0
 public void AddRange(GroupViewItem[] items)
 {
     foreach (GroupViewItem item in items)
     {
         this.Add(item);
     }
 }
Exemple #4
0
 public bool Contains(GroupViewItem item)
 {
     return (this.IndexOf(item) != -1);
 }
Exemple #5
0
 public void Add(GroupViewItem value)
 {
     this._items.Add(value);
     this._owner.OnItemAdded(value);
 }
Exemple #6
0
 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);
         }
     }
 }
Exemple #7
0
 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);
     }
 }
Exemple #8
0
 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;
 }