Changeset 14954 for stable/HeuristicLab.Clients.Hive.JobManager
- Timestamp:
- 05/10/17 15:23:54 (8 years ago)
- Location:
- stable
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
stable
- Property svn:mergeinfo changed
/trunk/sources merged: 14842
- Property svn:mergeinfo changed
-
stable/HeuristicLab.Clients.Hive.JobManager/3.3/MenuItems/CreateHiveJobMenuItem.cs
r14186 r14954 55 55 56 56 public override void Execute() { 57 IContentView activeView = MainFormManager.MainForm.ActiveView as IContentView; 58 var content = activeView.Content as IItem; 57 IContentView activeView = (IContentView)MainFormManager.MainForm.ActiveView; 58 var content = (IItem)activeView.Content; 59 var clonedConent = (IItem)content.Clone(); 59 60 60 61 //IOptimizer and IExecutables need some special care 61 if (c ontent is IOptimizer) {62 ((IOptimizer)c ontent).Runs.Clear();62 if (clonedConent is IOptimizer) { 63 ((IOptimizer)clonedConent).Runs.Clear(); 63 64 } 64 if (c ontent is IExecutable) {65 IExecutable exec = c ontent as IExecutable;65 if (clonedConent is IExecutable) { 66 IExecutable exec = clonedConent as IExecutable; 66 67 if (exec.ExecutionState != ExecutionState.Prepared) { 67 68 exec.Prepare(); … … 71 72 HiveClient.Instance.Refresh(); 72 73 73 ItemTask hiveTask = ItemTask.GetItemTaskForItem(c ontent);74 ItemTask hiveTask = ItemTask.GetItemTaskForItem(clonedConent); 74 75 HiveTask task = hiveTask.CreateHiveTask(); 75 76 RefreshableJob rJob = new RefreshableJob(); 76 rJob.Job.Name = c ontent.ToString();77 rJob.Job.Name = clonedConent.ToString(); 77 78 rJob.HiveTasks.Add(task); 78 task.ItemTask.ComputeInParallel = c ontent is Experiment || content is BatchRun;79 task.ItemTask.ComputeInParallel = clonedConent is Experiment || clonedConent is BatchRun; 79 80 80 81 MainFormManager.MainForm.ShowContent(rJob);
Note: See TracChangeset
for help on using the changeset viewer.