- Timestamp:
- 03/18/11 01:38:23 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Core.Views/3.3/VariableView.cs
r5445 r5744 135 135 protected virtual void valuePanel_DragEnterOver(object sender, DragEventArgs e) { 136 136 e.Effect = DragDropEffects.None; 137 Type type = e.Data.GetData("Type") as Type; 138 if (!ReadOnly && (type != null) && (typeof(IItem).IsAssignableFrom(type))) { 137 if (!ReadOnly && (e.Data.GetData("HeuristicLab") is IItem)) { 139 138 if ((e.KeyState & 32) == 32) e.Effect = DragDropEffects.Link; // ALT key 140 139 else if ((e.KeyState & 4) == 4) e.Effect = DragDropEffects.Move; // SHIFT key 141 else if ( (e.AllowedEffect & DragDropEffects.Copy) == DragDropEffects.Copy) e.Effect = DragDropEffects.Copy;142 else if ( (e.AllowedEffect & DragDropEffects.Move) == DragDropEffects.Move) e.Effect = DragDropEffects.Move;143 else if ( (e.AllowedEffect & DragDropEffects.Link) == DragDropEffects.Link) e.Effect = DragDropEffects.Link;140 else if (e.AllowedEffect.HasFlag(DragDropEffects.Copy)) e.Effect = DragDropEffects.Copy; 141 else if (e.AllowedEffect.HasFlag(DragDropEffects.Move)) e.Effect = DragDropEffects.Move; 142 else if (e.AllowedEffect.HasFlag(DragDropEffects.Link)) e.Effect = DragDropEffects.Link; 144 143 } 145 144 } 146 145 protected virtual void valuePanel_DragDrop(object sender, DragEventArgs e) { 147 146 if (e.Effect != DragDropEffects.None) { 148 IItem item = e.Data.GetData(" Value") as IItem;149 if ( (e.Effect & DragDropEffects.Copy) == DragDropEffects.Copy) item = (IItem)item.Clone();147 IItem item = e.Data.GetData("HeuristicLab") as IItem; 148 if (e.Effect.HasFlag(DragDropEffects.Copy)) item = (IItem)item.Clone(); 150 149 Content.Value = item; 151 150 }
Note: See TracChangeset
for help on using the changeset viewer.