Free cookie consent management tool by TermsFeed Policy Generator

source: trunk/tools/Templates/HeuristicLab.VS2010Wizards/AlgorithmWizardForm.cs @ 4187

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

#567

  • Worked on Algorithm Template
File size: 2.2 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 AlgorithmWizardForm : Form {
12    public string AlgorithmName {
13      get;
14      private set;
15    }
16    public string AlgorithmDescription {
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 AlgorithmWizardForm() {
38      InitializeComponent();
39      AlgorithmName = algorithmNameTextBox.Text;
40      AlgorithmDescription = algorithmDescriptionTextBox.Text;
41      IsMultiObjective = isMultiObjectiveCheckBox.Checked;
42    }
43
44    private void finishButton_Click(object sender, System.EventArgs e) {
45      SetProperties();
46      DialogResult = System.Windows.Forms.DialogResult.OK;
47      Close();
48    }
49
50    private void cancelButton_Click(object sender, System.EventArgs e) {
51      DialogResult = System.Windows.Forms.DialogResult.Cancel;
52      Close();
53    }
54
55    private void SetProperties() {
56      AlgorithmName = algorithmNameTextBox.Text;
57      AlgorithmDescription = algorithmDescriptionTextBox.Text;
58      IsMultiObjective = isMultiObjectiveCheckBox.Checked;
59      ParameterProperties = parametersControl.GetParameterProperties("private");
60      Properties = parametersControl.GetProperties("public");
61      ParameterInitializers = parametersControl.GetInitializers();
62    }
63
64    private void nextButton_Click(object sender, EventArgs e) {
65      page1Panel.Visible = false;
66      page2Panel.Visible = true;
67      nextButton.Enabled = false;
68      previousButton.Enabled = true;
69    }
70
71    private void previousButton_Click(object sender, EventArgs e) {
72      page2Panel.Visible = false;
73      page1Panel.Visible = true;
74      previousButton.Enabled = false;
75      nextButton.Enabled = true;
76    }
77  }
78}
Note: See TracBrowser for help on using the repository browser.