- Timestamp:
- 03/18/11 01:38:23 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Optimization.Views/3.3/BatchRunView.cs
r5445 r5744 253 253 private void optimizerTabPage_DragEnterOver(object sender, DragEventArgs e) { 254 254 e.Effect = DragDropEffects.None; 255 if (ReadOnly) 256 return; 257 Type type = e.Data.GetData("Type") as Type; 258 if ((type != null) && (typeof(IOptimizer).IsAssignableFrom(type))) { 255 if (!ReadOnly && (e.Data.GetData("HeuristicLab") is IOptimizer)) { 259 256 if ((e.KeyState & 32) == 32) e.Effect = DragDropEffects.Link; // ALT key 260 257 else if ((e.KeyState & 4) == 4) e.Effect = DragDropEffects.Move; // SHIFT key 261 else if ( (e.AllowedEffect & DragDropEffects.Copy) == DragDropEffects.Copy) e.Effect = DragDropEffects.Copy;262 else if ( (e.AllowedEffect & DragDropEffects.Move) == DragDropEffects.Move) e.Effect = DragDropEffects.Move;263 else if ( (e.AllowedEffect & DragDropEffects.Link) == DragDropEffects.Link) e.Effect = DragDropEffects.Link;258 else if (e.AllowedEffect.HasFlag(DragDropEffects.Copy)) e.Effect = DragDropEffects.Copy; 259 else if (e.AllowedEffect.HasFlag(DragDropEffects.Move)) e.Effect = DragDropEffects.Move; 260 else if (e.AllowedEffect.HasFlag(DragDropEffects.Link)) e.Effect = DragDropEffects.Link; 264 261 } 265 262 } 266 263 private void optimizerTabPage_DragDrop(object sender, DragEventArgs e) { 267 264 if (e.Effect != DragDropEffects.None) { 268 IOptimizer optimizer = e.Data.GetData(" Value") as IOptimizer;269 if ( (e.Effect & DragDropEffects.Copy) == DragDropEffects.Copy) optimizer = (IOptimizer)optimizer.Clone();265 IOptimizer optimizer = e.Data.GetData("HeuristicLab") as IOptimizer; 266 if (e.Effect.HasFlag(DragDropEffects.Copy)) optimizer = (IOptimizer)optimizer.Clone(); 270 267 Content.Optimizer = optimizer; 271 268 }
Note: See TracChangeset
for help on using the changeset viewer.