- Timestamp:
- 03/18/11 01:38:23 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Core.Views/3.3/VariableValueView.cs
r5445 r5744 88 88 protected virtual void VariableValueView_DragEnterOver(object sender, DragEventArgs e) { 89 89 e.Effect = DragDropEffects.None; 90 Type type = e.Data.GetData("Type") as Type; 91 if (!ReadOnly && (type != null) && (typeof(IItem).IsAssignableFrom(type))) { 90 if (!ReadOnly && (e.Data.GetData("HeuristicLab") is IItem)) { 92 91 if ((e.KeyState & 32) == 32) e.Effect = DragDropEffects.Link; // ALT key 93 92 else if ((e.KeyState & 4) == 4) e.Effect = DragDropEffects.Move; // SHIFT key 94 else if ( (e.AllowedEffect & DragDropEffects.Copy) == DragDropEffects.Copy) e.Effect = DragDropEffects.Copy;95 else if ( (e.AllowedEffect & DragDropEffects.Move) == DragDropEffects.Move) e.Effect = DragDropEffects.Move;96 else if ( (e.AllowedEffect & DragDropEffects.Link) == DragDropEffects.Link) e.Effect = DragDropEffects.Link;93 else if (e.AllowedEffect.HasFlag(DragDropEffects.Copy)) e.Effect = DragDropEffects.Copy; 94 else if (e.AllowedEffect.HasFlag(DragDropEffects.Move)) e.Effect = DragDropEffects.Move; 95 else if (e.AllowedEffect.HasFlag(DragDropEffects.Link)) e.Effect = DragDropEffects.Link; 97 96 } 98 97 } 99 98 protected virtual void VariableValueView_DragDrop(object sender, DragEventArgs e) { 100 99 if (e.Effect != DragDropEffects.None) { 101 IItem item = e.Data.GetData(" Value") as IItem;102 if ( (e.Effect & DragDropEffects.Copy) == DragDropEffects.Copy) item = (IItem)item.Clone();100 IItem item = e.Data.GetData("HeuristicLab") as IItem; 101 if (e.Effect.HasFlag(DragDropEffects.Copy)) item = (IItem)item.Clone(); 103 102 Content.Value = item; 104 103 }
Note: See TracChangeset
for help on using the changeset viewer.