using HeuristicLab.Clients.Hive; using HeuristicLab.Clients.Hive.JobManager.Views; using HeuristicLab.MainForm; using HeuristicLab.Optimization.Views; namespace HeuristicLab.ExperimentGeneration.DataAnalysis.ExperimentWizard { public partial class ResultPage : HeuristicLab.ExperimentGeneration.DataAnalysis.Wizard.WizardPage { private DataAnalysisWizardContext context; public DataAnalysisWizardContext Context { get { return context; } } public ResultPage(DataAnalysisWizardContext context) { InitializeComponent(); this.context = context; } private void ResultPage_SetActive(object sender, System.ComponentModel.CancelEventArgs e) { SetWizardButton(Wizard.WizardButtons.Back); SetWizardButton(Wizard.WizardButtons.Commit); SetCommitButtonText("Finish"); } private void ResultPage_WizardCommit(object sender, System.ComponentModel.CancelEventArgs e) { if (rbHL.Checked) { // Open generated experiment in HL IContentView view = MainFormManager.MainForm.ShowContent(this.Context.Experiment, new ExperimentView().GetType()); } else if (rbHive.Checked) { // Create and start Hive job var job = new RefreshableJob(); job.IsAllowedPrivileged = true; job.Job.Name = "Data Analysis Service Job"; job.HiveTasks.Add(new OptimizerHiveTask(this.Context.Experiment)); IContentView view = MainFormManager.MainForm.ShowContent(job, new HiveJobManagerView().GetType()); } } private void ResultPage_WizardBack(object sender, Wizard.WizardPageEventArgs e) { e.NewPage = "SelectAnalysisPage"; } } }