- Timestamp:
- 04/20/10 03:55:36 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Core.Views/3.3/ItemCollectionView.cs
r3423 r3432 199 199 } 200 200 protected virtual void itemsListView_ItemDrag(object sender, ItemDragEventArgs e) { 201 ListViewItem listViewItem = (ListViewItem)e.Item; 202 T item = (T)listViewItem.Tag; 203 DataObject data = new DataObject(); 204 data.SetData("Type", item.GetType()); 205 data.SetData("Value", item); 206 if (Content.IsReadOnly || ReadOnly) { 207 DoDragDrop(data, DragDropEffects.Copy | DragDropEffects.Link); 208 } else { 209 DragDropEffects result = DoDragDrop(data, DragDropEffects.Copy | DragDropEffects.Link | DragDropEffects.Move); 210 if ((result & DragDropEffects.Move) == DragDropEffects.Move) 211 Content.Remove(item); 201 if (!Locked) { 202 ListViewItem listViewItem = (ListViewItem)e.Item; 203 T item = (T)listViewItem.Tag; 204 DataObject data = new DataObject(); 205 data.SetData("Type", item.GetType()); 206 data.SetData("Value", item); 207 if (Content.IsReadOnly || ReadOnly) { 208 DoDragDrop(data, DragDropEffects.Copy | DragDropEffects.Link); 209 } else { 210 DragDropEffects result = DoDragDrop(data, DragDropEffects.Copy | DragDropEffects.Link | DragDropEffects.Move); 211 if ((result & DragDropEffects.Move) == DragDropEffects.Move) 212 Content.Remove(item); 213 } 212 214 } 213 215 }
Note: See TracChangeset
for help on using the changeset viewer.