Changeset 11083 for stable/HeuristicLab.Clients.Hive.JobManager
- Timestamp:
- 07/03/14 16:36:10 (10 years ago)
- Location:
- stable
- Files:
-
- 4 edited
- 2 copied
Legend:
- Unmodified
- Added
- Removed
-
stable
- Property svn:mergeinfo changed
/trunk/sources merged: 10130,10150,10154,10170,11079
- Property svn:mergeinfo changed
-
stable/HeuristicLab.Clients.Hive.JobManager/3.3/HeuristicLab.Clients.Hive.JobManager-3.3.csproj
r8718 r11083 98 98 <Compile Include="ExtensionMethods\TreeNodeExtensions.cs" /> 99 99 <Compile Include="ListViewItemDateComparer.cs" /> 100 <Compile Include="MenuItems\CreateHiveJobMenuItem.cs" /> 101 <Compile Include="MenuItems\RunInHiveMenuItem.cs" /> 100 102 <Compile Include="Plugin.cs" /> 101 103 <Compile Include="Views\HiveJobManagerView.cs"> -
stable/HeuristicLab.Clients.Hive.JobManager/3.3/MenuItems/CreateHiveJobMenuItem.cs
r10150 r11083 22 22 using System; 23 23 using System.Collections.Generic; 24 using HeuristicLab.Clients.Hive;25 24 using HeuristicLab.Core; 26 25 using HeuristicLab.MainForm; 27 26 using HeuristicLab.Optimization; 27 using HeuristicLab.Optimizer; 28 28 29 namespace HeuristicLab. Optimizer.MenuItems{29 namespace HeuristicLab.Clients.Hive.JobManager { 30 30 public class CreateHiveJobMenuItem : HeuristicLab.MainForm.WindowsForms.MenuItem, IOptimizerUserInterfaceItemProvider { 31 31 public override string Name { … … 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 … … 74 74 HiveTask task = hiveTask.CreateHiveTask(); 75 75 RefreshableJob rJob = new RefreshableJob(); 76 rJob.Job.Name = content. ItemName;76 rJob.Job.Name = content.ToString(); 77 77 rJob.HiveTasks.Add(task); 78 78 task.ItemTask.ComputeInParallel = content is Experiment || content is BatchRun; -
stable/HeuristicLab.Clients.Hive.JobManager/3.3/MenuItems/JobManagerMenuItem.cs
r9456 r11083 22 22 using System.Collections.Generic; 23 23 using System.Windows.Forms; 24 using HeuristicLab.Clients.Hive;25 24 using HeuristicLab.MainForm; 25 using HeuristicLab.Optimizer; 26 26 27 namespace HeuristicLab. Optimizer.MenuItems{27 namespace HeuristicLab.Clients.Hive.JobManager { 28 28 public class JobManagerMenuItem : HeuristicLab.MainForm.WindowsForms.MenuItem, IOptimizerUserInterfaceItemProvider { 29 29 public override string Name { -
stable/HeuristicLab.Clients.Hive.JobManager/3.3/MenuItems/RunInHiveMenuItem.cs
r10150 r11083 23 23 using System.Collections.Generic; 24 24 using System.Threading; 25 using HeuristicLab.Clients.Hive;26 25 using HeuristicLab.Core; 27 26 using HeuristicLab.MainForm; 28 27 using HeuristicLab.Optimization; 28 using HeuristicLab.Optimizer; 29 29 using HeuristicLab.PluginInfrastructure; 30 30 31 namespace HeuristicLab. Optimizer.MenuItems{31 namespace HeuristicLab.Clients.Hive.JobManager { 32 32 public class RunInHiveMenuItem : HeuristicLab.MainForm.WindowsForms.MenuItem, IOptimizerUserInterfaceItemProvider { 33 33 public override string Name { … … 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 … … 78 78 HiveTask task = hiveTask.CreateHiveTask(); 79 79 RefreshableJob rJob = new RefreshableJob(); 80 rJob.Job.Name = content. ItemName;80 rJob.Job.Name = content.ToString(); 81 81 rJob.HiveTasks.Add(task); 82 82 task.ItemTask.ComputeInParallel = content is Experiment || content is BatchRun; -
stable/HeuristicLab.Clients.Hive.JobManager/3.3/Views/RefreshableHiveJobView.cs
r9933 r11083 468 468 private void jobsTreeView_DragEnter(object sender, DragEventArgs e) { 469 469 e.Effect = DragDropEffects.None; 470 var obj = e.Data.GetData(Constants.DragDropDataFormat); 471 if (obj is IOptimizer) { 470 var obj = (IDeepCloneable)e.Data.GetData(Constants.DragDropDataFormat); 471 472 Type objType = obj.GetType(); 473 if (ItemTask.IsTypeSupported(objType)) { 472 474 if (Content.Id != Guid.Empty) e.Effect = DragDropEffects.None; 473 475 else if ((e.KeyState & 32) == 32) e.Effect = DragDropEffects.Link; // ALT key … … 478 480 private void jobsTreeView_DragDrop(object sender, DragEventArgs e) { 479 481 if (e.Effect != DragDropEffects.None) { 480 var obj = e.Data.GetData(Constants.DragDropDataFormat); 481 482 var optimizer = obj as IOptimizer; 483 if (optimizer != null) { 484 IOptimizer newOptimizer = null; 485 if (e.Effect.HasFlag(DragDropEffects.Copy)) { 486 newOptimizer = (IOptimizer)optimizer.Clone(); 487 newOptimizer.Runs.Clear(); 488 } else { 489 newOptimizer = optimizer; 482 var obj = (IItem)e.Data.GetData(Constants.DragDropDataFormat); 483 484 IItem newObj = null; 485 if (e.Effect.HasFlag(DragDropEffects.Copy)) { 486 newObj = (IItem)obj.Clone(); 487 } else { 488 newObj = obj; 489 } 490 491 //IOptimizer and IExecutables need some special care 492 if (newObj is IOptimizer) { 493 ((IOptimizer)newObj).Runs.Clear(); 494 } 495 if (newObj is IExecutable) { 496 IExecutable exec = (IExecutable)newObj; 497 if (exec.ExecutionState != ExecutionState.Prepared) { 498 exec.Prepare(); 490 499 } 491 if (newOptimizer.ExecutionState != ExecutionState.Prepared) { 492 newOptimizer.Prepare(); 493 } 494 495 Content.HiveTasks.Add(new OptimizerHiveTask(newOptimizer)); 496 } 500 } 501 502 ItemTask hiveTask = ItemTask.GetItemTaskForItem(newObj); 503 Content.HiveTasks.Add(hiveTask.CreateHiveTask()); 497 504 } 498 505 }
Note: See TracChangeset
for help on using the changeset viewer.