- Timestamp:
- 04/11/10 03:59:22 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Optimization.Views/3.3/BatchRunView.cs
r3274 r3299 235 235 } 236 236 } 237 private void algorithmPanel_DragEnterOver(object sender, DragEventArgs e) { 238 e.Effect = DragDropEffects.None; 239 Type type = e.Data.GetData("Type") as Type; 240 if ((type != null) && (typeof(IAlgorithm).IsAssignableFrom(type))) { 241 if ((e.KeyState & 8) == 8) e.Effect = DragDropEffects.Copy; // CTRL key 242 else if ((e.KeyState & 4) == 4) e.Effect = DragDropEffects.Move; // SHIFT key 243 else if ((e.AllowedEffect & DragDropEffects.Link) == DragDropEffects.Link) e.Effect = DragDropEffects.Link; 244 else if ((e.AllowedEffect & DragDropEffects.Copy) == DragDropEffects.Copy) e.Effect = DragDropEffects.Copy; 245 else if ((e.AllowedEffect & DragDropEffects.Move) == DragDropEffects.Move) e.Effect = DragDropEffects.Move; 246 } 247 } 248 private void algorithmPanel_DragDrop(object sender, DragEventArgs e) { 249 if (e.Effect != DragDropEffects.None) { 250 IAlgorithm algorithm = e.Data.GetData("Value") as IAlgorithm; 251 if ((e.Effect & DragDropEffects.Copy) == DragDropEffects.Copy) algorithm = (IAlgorithm)algorithm.Clone(); 252 Content.Algorithm = algorithm; 253 } 254 } 237 255 #endregion 238 256
Note: See TracChangeset
for help on using the changeset viewer.