- Timestamp:
- 04/20/10 03:55:36 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionView.cs
r3423 r3432 175 175 } 176 176 protected virtual void itemsListView_ItemDrag(object sender, ItemDragEventArgs e) { 177 ListViewItem listViewItem = (ListViewItem)e.Item; 178 IRun item = (IRun)listViewItem.Tag; 179 DataObject data = new DataObject(); 180 data.SetData("Type", item.GetType()); 181 data.SetData("Value", item); 182 if (Content.IsReadOnly || ReadOnly) { 183 DoDragDrop(data, DragDropEffects.Copy | DragDropEffects.Link); 184 } else { 185 DragDropEffects result = DoDragDrop(data, DragDropEffects.Copy | DragDropEffects.Link | DragDropEffects.Move); 186 if ((result & DragDropEffects.Move) == DragDropEffects.Move) 187 Content.Remove(item); 177 if (!Locked) { 178 ListViewItem listViewItem = (ListViewItem)e.Item; 179 IRun item = (IRun)listViewItem.Tag; 180 DataObject data = new DataObject(); 181 data.SetData("Type", item.GetType()); 182 data.SetData("Value", item); 183 if (Content.IsReadOnly || ReadOnly) { 184 DoDragDrop(data, DragDropEffects.Copy | DragDropEffects.Link); 185 } else { 186 DragDropEffects result = DoDragDrop(data, DragDropEffects.Copy | DragDropEffects.Link | DragDropEffects.Move); 187 if ((result & DragDropEffects.Move) == DragDropEffects.Move) 188 Content.Remove(item); 189 } 188 190 } 189 191 }
Note: See TracChangeset
for help on using the changeset viewer.