Changeset 5796 for branches/DataAnalysis Refactoring/HeuristicLab.Parameters.Views/3.3/ValueLookupParameterView.cs
- Timestamp:
- 03/22/11 16:45:46 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/DataAnalysis Refactoring/HeuristicLab.Parameters.Views/3.3/ValueLookupParameterView.cs
r5445 r5796 162 162 protected virtual void valueGroupBox_DragEnterOver(object sender, DragEventArgs e) { 163 163 e.Effect = DragDropEffects.None; 164 Type type = e.Data.GetData("Type") as Type; 165 if (!ReadOnly && (type != null) && (Content.DataType.IsAssignableFrom(type))) { 164 if (!ReadOnly && (e.Data.GetData("HeuristicLab") != null) && Content.DataType.IsAssignableFrom(e.Data.GetData("HeuristicLab").GetType())) { 166 165 if ((e.KeyState & 32) == 32) e.Effect = DragDropEffects.Link; // ALT key 167 166 else if ((e.KeyState & 4) == 4) e.Effect = DragDropEffects.Move; // SHIFT key 168 else if ( (e.AllowedEffect & DragDropEffects.Copy) == DragDropEffects.Copy) e.Effect = DragDropEffects.Copy;169 else if ( (e.AllowedEffect & DragDropEffects.Move) == DragDropEffects.Move) e.Effect = DragDropEffects.Move;170 else if ( (e.AllowedEffect & DragDropEffects.Link) == DragDropEffects.Link) e.Effect = DragDropEffects.Link;167 else if (e.AllowedEffect.HasFlag(DragDropEffects.Copy)) e.Effect = DragDropEffects.Copy; 168 else if (e.AllowedEffect.HasFlag(DragDropEffects.Move)) e.Effect = DragDropEffects.Move; 169 else if (e.AllowedEffect.HasFlag(DragDropEffects.Link)) e.Effect = DragDropEffects.Link; 171 170 } 172 171 } 173 172 protected virtual void valueGroupBox_DragDrop(object sender, DragEventArgs e) { 174 173 if (e.Effect != DragDropEffects.None) { 175 T value = e.Data.GetData(" Value") as T;176 if ( (e.Effect & DragDropEffects.Copy) == DragDropEffects.Copy) value = (T)value.Clone();174 T value = e.Data.GetData("HeuristicLab") as T; 175 if (e.Effect.HasFlag(DragDropEffects.Copy)) value = (T)value.Clone(); 177 176 Content.Value = value; 178 177 }
Note: See TracChangeset
for help on using the changeset viewer.