Changeset 8692


Ignore:
Timestamp:
09/25/12 10:15:59 (9 years ago)
Author:
ascheibe
Message:

#1882 fixed collecting runs in the OptimizerHiveTaskView

Location:
trunk/sources
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Clients.Hive.JobManager/3.3/Views/RefreshableHiveJobView.cs

    r8691 r8692  
    534534        RunCollection runs = new RunCollection();
    535535
    536         foreach (HiveTask subTask in job.HiveTasks) {
    537           GetAllRunsFromHiveTask(runs, subTask);
     536        foreach (HiveTask hiveTask in job.HiveTasks) {
     537          TaskUtil.GetAllRunsFromHiveTask(runs, hiveTask);
    538538        }
    539539        return runs;
    540540      } else {
    541541        return null;
    542       }
    543     }
    544 
    545     private void GetAllRunsFromHiveTask(RunCollection runs, HiveTask task) {
    546       foreach (HiveTask subTask in task.ChildHiveTasks) {
    547         GetAllRunsFromHiveTask(runs, subTask);
    548       }
    549 
    550       if (task.ChildHiveTasks.Count == 0) {
    551         if (task is OptimizerHiveTask) {
    552           OptimizerHiveTask ohTask = task as OptimizerHiveTask;
    553           runs.AddRange(ohTask.ItemTask.Item.Runs);
    554         }
    555542      }
    556543    }
  • trunk/sources/HeuristicLab.Clients.Hive.Views/3.3/HiveTasks/OptimizerHiveTaskView.cs

    r8186 r8692  
    2525using HeuristicLab.MainForm;
    2626using HeuristicLab.MainForm.WindowsForms;
     27using HeuristicLab.Optimization;
    2728using HeuristicLab.PluginInfrastructure;
    2829
     
    5354    protected override void Job_ItemChanged(object sender, EventArgs e) {
    5455      if (Content != null && Content.Task != null && Content.ItemTask.Item != null) {
    55         runCollectionViewHost.Content = Content.ItemTask.Item.Runs;
     56        RunCollection runs = new RunCollection();
     57        TaskUtil.GetAllRunsFromHiveTask(runs, Content);
     58        runCollectionViewHost.Content = runs;
    5659      } else {
    5760        runCollectionViewHost.Content = null;
  • trunk/sources/HeuristicLab.Clients.Hive/3.3/HeuristicLab.Clients.Hive-3.3.csproj

    r8600 r8692  
    130130    <Compile Include="StateLogList.cs" />
    131131    <Compile Include="StateLogListList.cs" />
     132    <Compile Include="Util\TaskUtil.cs" />
    132133    <None Include="app.config">
    133134      <SubType>Designer</SubType>
     
    249250  </PropertyGroup>
    250251  <PropertyGroup>
    251    <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">set Path=%25Path%25;$(ProjectDir);$(SolutionDir)
     252    <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">set Path=%25Path%25;$(ProjectDir);$(SolutionDir)
    252253set ProjectDir=$(ProjectDir)
    253254set SolutionDir=$(SolutionDir)
    254255set Outdir=$(Outdir)
    255256call PreBuildEvent.cmd</PreBuildEvent>
    256 <PreBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
     257    <PreBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
    257258export ProjectDir=$(ProjectDir)
    258259export SolutionDir=$(SolutionDir)
Note: See TracChangeset for help on using the changeset viewer.