Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
05/13/18 20:33:39 (7 years ago)
Author:
jzenisek
Message:

#2839: several fixes

  • rebuilt run in hive
  • adapted numeric selector (added FixedNumericUpDown.cs)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2839_HiveProjectManagement/HeuristicLab.Clients.Hive.JobManager/3.3/MenuItems/RunInHiveMenuItem.cs

    r14185 r15933  
    2828using HeuristicLab.Optimizer;
    2929using HeuristicLab.PluginInfrastructure;
     30using HeuristicLab.Clients.Hive.JobManager.Views;
     31using System.Windows.Forms;
     32using System.Linq;
    3033
    3134namespace HeuristicLab.Clients.Hive.JobManager {
     
    8285      task.ItemTask.ComputeInParallel = content is Experiment || content is BatchRun;
    8386
    84       progress = MainFormManager.GetMainForm<MainForm.WindowsForms.MainForm>().AddOperationProgressToContent(this.content, "Uploading to Hive...");
    85       rJob.Progress = progress;
    86       progress.ProgressStateChanged += progress_ProgressStateChanged;
    8787
    88       HiveClient.StartJob(new Action<Exception>(HandleEx), rJob, new CancellationToken());
     88      var hiveResourceSelectorDialog = new HiveResourceSelectorDialog(rJob.Job.Id, rJob.Job.ProjectId);
     89      if (hiveResourceSelectorDialog.ShowDialog((UserControl)activeView) == DialogResult.OK) {
     90        var selectedProject = hiveResourceSelectorDialog.SelectedProject;
     91        if (selectedProject != null) {
     92          rJob.Job.ProjectId = selectedProject.Id;
     93          rJob.Job.ResourceIds = hiveResourceSelectorDialog.SelectedResources.Select(x => x.Id).ToList();
     94
     95          progress = MainFormManager.GetMainForm<MainForm.WindowsForms.MainForm>().AddOperationProgressToContent(this.content, "Uploading to Hive...");
     96          rJob.Progress = progress;
     97          progress.ProgressStateChanged += progress_ProgressStateChanged;
     98
     99          HiveClient.StartJob(new Action<Exception>(HandleEx), rJob, new CancellationToken());
     100        }
     101      }
    89102    }
    90103
Note: See TracChangeset for help on using the changeset viewer.