Free cookie consent management tool by TermsFeed Policy Generator

source: branches/DataAnalysisService/HeuristicLab.ExperimentGeneration.DataAnalysis.ExperimentWizard/3.3/ResultPage.cs @ 9275

Last change on this file since 9275 was 7944, checked in by spimming, 12 years ago

#1807:

  • new wizard page to choose what to do with generated experiments
  • exclude some experiments from generation for faster debug cycles
File size: 1.7 KB
Line 
1
2using HeuristicLab.Clients.Hive;
3using HeuristicLab.Clients.Hive.JobManager.Views;
4using HeuristicLab.MainForm;
5using HeuristicLab.Optimization.Views;
6namespace HeuristicLab.ExperimentGeneration.DataAnalysis.ExperimentWizard {
7  public partial class ResultPage : HeuristicLab.ExperimentGeneration.DataAnalysis.Wizard.WizardPage {
8    private DataAnalysisWizardContext context;
9    public DataAnalysisWizardContext Context {
10      get { return context; }
11    }
12
13    public ResultPage(DataAnalysisWizardContext context) {
14      InitializeComponent();
15      this.context = context;
16    }
17
18    private void ResultPage_SetActive(object sender, System.ComponentModel.CancelEventArgs e) {
19      SetWizardButton(Wizard.WizardButtons.Back);
20      SetWizardButton(Wizard.WizardButtons.Commit);
21      SetCommitButtonText("Finish");
22    }
23
24    private void ResultPage_WizardCommit(object sender, System.ComponentModel.CancelEventArgs e) {
25      if (rbHL.Checked) {
26        // Open generated experiment in HL
27        IContentView view = MainFormManager.MainForm.ShowContent(this.Context.Experiment, new ExperimentView().GetType());
28      } else if (rbHive.Checked) {
29        // Create and start Hive job
30        var job = new RefreshableJob();
31        job.IsAllowedPrivileged = true;
32        job.Job.Name = "Data Analysis Service Job";
33        job.HiveTasks.Add(new OptimizerHiveTask(this.Context.Experiment));
34        IContentView view = MainFormManager.MainForm.ShowContent(job, new HiveJobManagerView().GetType());
35      }
36    }
37
38    private void ResultPage_WizardBack(object sender, Wizard.WizardPageEventArgs e) {
39      e.NewPage = "SelectAnalysisPage";
40    }
41  }
42}
Note: See TracBrowser for help on using the repository browser.