[7944] | 1 |
|
---|
| 2 | using HeuristicLab.Clients.Hive;
|
---|
| 3 | using HeuristicLab.Clients.Hive.JobManager.Views;
|
---|
| 4 | using HeuristicLab.MainForm;
|
---|
| 5 | using HeuristicLab.Optimization.Views;
|
---|
| 6 | namespace 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 | }
|
---|