1 | using System;
|
---|
2 | using System.Collections.Generic;
|
---|
3 | using System.ComponentModel;
|
---|
4 | using System.Data;
|
---|
5 | using System.Drawing;
|
---|
6 | using System.Linq;
|
---|
7 | using System.Text;
|
---|
8 | using System.Windows.Forms;
|
---|
9 |
|
---|
10 | namespace 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 | }
|
---|