Changeset 15281 for branches/Async/HeuristicLab.Clients.Hive.JobManager/3.3/MenuItems/CreateHiveJobMenuItem.cs
- Timestamp:
- 07/23/17 11:17:18 (7 years ago)
- Location:
- branches/Async
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/Async
- Property svn:ignore
-
old new 24 24 protoc.exe 25 25 obj 26 .vs
-
- Property svn:mergeinfo changed
- Property svn:ignore
-
branches/Async/HeuristicLab.Clients.Hive.JobManager/3.3/MenuItems/CreateHiveJobMenuItem.cs
r12012 r15281 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 5Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2016 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 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.