Пример #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;
 }
Пример #2
0
 public void Remove(GroupViewItem value)
 {
     this._items.Remove(value);
 }
Пример #3
0
 public void AddRange(GroupViewItem[] items)
 {
     foreach (GroupViewItem item in items)
     {
         this.Add(item);
     }
 }
Пример #4
0
 public bool Contains(GroupViewItem item)
 {
     return (this.IndexOf(item) != -1);
 }
Пример #5
0
 public void Add(GroupViewItem value)
 {
     this._items.Add(value);
     this._owner.OnItemAdded(value);
 }
Пример #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);
         }
     }
 }
Пример #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);
     }
 }
Пример #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);
         }
     }
 }
Пример #9
0
 public GroupViewItemEventArgs(GroupViewItem item)
 {
     this._item = item;
 }