- Timestamp:
- 07/03/14 11:38:40 (10 years ago)
- Location:
- trunk/sources/HeuristicLab.Clients.Hive.JobManager/3.3
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Clients.Hive.JobManager/3.3/MenuItems/CreateHiveJobMenuItem.cs
r10170 r11079 48 48 Type contentType = content.GetType(); 49 49 ToolStripItem.Enabled = ItemTask.IsTypeSupported(contentType); 50 } else { 51 ToolStripItem.Enabled = false; 50 return; 52 51 } 53 52 } 53 ToolStripItem.Enabled = false; 54 54 } 55 55 -
trunk/sources/HeuristicLab.Clients.Hive.JobManager/3.3/MenuItems/RunInHiveMenuItem.cs
r10170 r11079 50 50 Type contentType = content.GetType(); 51 51 ToolStripItem.Enabled = ItemTask.IsTypeSupported(contentType); 52 } else { 53 ToolStripItem.Enabled = false; 52 return; 54 53 } 55 54 } 55 ToolStripItem.Enabled = false; 56 56 } 57 57 -
trunk/sources/HeuristicLab.Clients.Hive.JobManager/3.3/Views/RefreshableHiveJobView.cs
r10150 r11079 468 468 private void jobsTreeView_DragEnter(object sender, DragEventArgs e) { 469 469 e.Effect = DragDropEffects.None; 470 var obj = e.Data.GetData(Constants.DragDropDataFormat) as IDeepCloneable; 470 var obj = (IDeepCloneable)e.Data.GetData(Constants.DragDropDataFormat); 471 471 472 Type objType = obj.GetType(); 472 473 var hiveTaskFound = ItemTask.IsTypeSupported(objType); 474 if (hiveTaskFound) { 473 if (ItemTask.IsTypeSupported(objType)) { 475 474 if (Content.Id != Guid.Empty) e.Effect = DragDropEffects.None; 476 475 else if ((e.KeyState & 32) == 32) e.Effect = DragDropEffects.Link; // ALT key … … 481 480 private void jobsTreeView_DragDrop(object sender, DragEventArgs e) { 482 481 if (e.Effect != DragDropEffects.None) { 483 var obj = e.Data.GetData(Constants.DragDropDataFormat) as IItem;482 var obj = (IItem)e.Data.GetData(Constants.DragDropDataFormat); 484 483 485 484 IItem newObj = null; 486 485 if (e.Effect.HasFlag(DragDropEffects.Copy)) { 487 newObj = obj.Clone(new Cloner()) as IItem;486 newObj = (IItem)obj.Clone(); 488 487 } else { 489 488 newObj = obj; … … 495 494 } 496 495 if (newObj is IExecutable) { 497 IExecutable exec = newObj as IExecutable;496 IExecutable exec = (IExecutable)newObj; 498 497 if (exec.ExecutionState != ExecutionState.Prepared) { 499 498 exec.Prepare();
Note: See TracChangeset
for help on using the changeset viewer.