Free cookie consent management tool by TermsFeed Policy Generator

source: trunk/tools/Templates/HeuristicLab.VS2010Wizards/ProblemWizardForm.cs @ 4188

Last change on this file since 4188 was 4188, checked in by abeham, 14 years ago

#567

  • Started adding problem wizard
File size: 2.0 KB
Line 
1using System;
2using System.Collections.Generic;
3using System.ComponentModel;
4using System.Data;
5using System.Drawing;
6using System.Linq;
7using System.Text;
8using System.Windows.Forms;
9
10namespace HeuristicLab.VS2010Wizards {
11  public partial class ProblemWizardForm : Form {
12    public string ProblemName {
13      get;
14      private set;
15    }
16    public string ProblemDescription {
17      get;
18      private set;
19    }
20    public bool IsMultiObjective {
21      get;
22      private set;
23    }
24    public string ParameterProperties {
25      get;
26      private set;
27    }
28    public string Properties {
29      get;
30      private set;
31    }
32    public string ParameterInitializers {
33      get;
34      private set;
35    }
36
37    public ProblemWizardForm() {
38      InitializeComponent();
39    }
40
41    private void finishButton_Click(object sender, System.EventArgs e) {
42      SetProperties();
43      DialogResult = System.Windows.Forms.DialogResult.OK;
44      Close();
45    }
46
47    private void cancelButton_Click(object sender, System.EventArgs e) {
48      DialogResult = System.Windows.Forms.DialogResult.Cancel;
49      Close();
50    }
51
52    private void SetProperties() {
53      ProblemName = problemNameTextBox.Text;
54      ProblemDescription = problemDescriptionTextBox.Text;
55      IsMultiObjective = isMultiObjectiveCheckBox.Checked;
56      ParameterProperties = parametersControl.GetParameterProperties("private");
57      Properties = parametersControl.GetProperties("public");
58      ParameterInitializers = parametersControl.GetInitializers();
59    }
60
61    private void nextButton_Click(object sender, EventArgs e) {
62      page1Panel.Visible = false;
63      page2Panel.Visible = true;
64      nextButton.Enabled = false;
65      previousButton.Enabled = true;
66    }
67
68    private void previousButton_Click(object sender, EventArgs e) {
69      page2Panel.Visible = false;
70      page1Panel.Visible = true;
71      previousButton.Enabled = false;
72      nextButton.Enabled = true;
73    }
74  }
75}
Note: See TracBrowser for help on using the repository browser.