Free cookie consent management tool by TermsFeed Policy Generator

Changeset 87 for trunk/sources


Ignore:
Timestamp:
03/21/08 14:33:08 (16 years ago)
Author:
abeham
Message:

Changed ES strategy switch from button to radiobutton as per request #76

Location:
trunk/sources/HeuristicLab.ES
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.ES/ESEditor.Designer.cs

    r86 r87  
    5252      this.targetSuccessRateTextBox = new System.Windows.Forms.TextBox();
    5353      this.targetSuccessRateLabel = new System.Windows.Forms.Label();
    54       this.plusNotationButton = new System.Windows.Forms.Button();
    55       this.plusNotationLabel = new System.Windows.Forms.Label();
    5654      this.setEvaluationButton = new System.Windows.Forms.Button();
    5755      this.setMutationButton = new System.Windows.Forms.Button();
     
    9391      this.setRecombinationButton = new System.Windows.Forms.Button();
    9492      this.viewRecombinationButton = new System.Windows.Forms.Button();
     93      this.parentSelectionGroupBox = new System.Windows.Forms.GroupBox();
     94      this.plusRadioButton = new System.Windows.Forms.RadioButton();
     95      this.commaRadioButton = new System.Windows.Forms.RadioButton();
    9596      this.tabControl.SuspendLayout();
    9697      this.parametersTabPage.SuspendLayout();
    9798      this.scopesTabPage.SuspendLayout();
     99      this.parentSelectionGroupBox.SuspendLayout();
    98100      this.SuspendLayout();
    99101      //
     
    124126      // parametersTabPage
    125127      //
     128      this.parametersTabPage.Controls.Add(this.parentSelectionGroupBox);
    126129      this.parametersTabPage.Controls.Add(this.setRecombinationButton);
    127130      this.parametersTabPage.Controls.Add(this.viewRecombinationButton);
     
    133136      this.parametersTabPage.Controls.Add(this.targetSuccessRateTextBox);
    134137      this.parametersTabPage.Controls.Add(this.targetSuccessRateLabel);
    135       this.parametersTabPage.Controls.Add(this.plusNotationButton);
    136       this.parametersTabPage.Controls.Add(this.plusNotationLabel);
    137138      this.parametersTabPage.Controls.Add(this.setEvaluationButton);
    138139      this.parametersTabPage.Controls.Add(this.setMutationButton);
     
    203204      this.targetSuccessRateLabel.Text = "Target Success Rate:";
    204205      //
    205       // plusNotationButton
    206       //
    207       this.plusNotationButton.Anchor = System.Windows.Forms.AnchorStyles.None;
    208       this.plusNotationButton.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
    209       this.plusNotationButton.Location = new System.Drawing.Point(218, 239);
    210       this.plusNotationButton.Name = "plusNotationButton";
    211       this.plusNotationButton.Size = new System.Drawing.Size(78, 24);
    212       this.plusNotationButton.TabIndex = 18;
    213       this.plusNotationButton.Text = "Plus";
    214       this.plusNotationButton.UseVisualStyleBackColor = true;
    215       this.plusNotationButton.Click += new System.EventHandler(this.plusNotationButton_Click);
    216       //
    217       // plusNotationLabel
    218       //
    219       this.plusNotationLabel.Anchor = System.Windows.Forms.AnchorStyles.None;
    220       this.plusNotationLabel.AutoSize = true;
    221       this.plusNotationLabel.Location = new System.Drawing.Point(65, 245);
    222       this.plusNotationLabel.Name = "plusNotationLabel";
    223       this.plusNotationLabel.Size = new System.Drawing.Size(113, 13);
    224       this.plusNotationLabel.TabIndex = 17;
    225       this.plusNotationLabel.Text = "Plus/Comma Notation:";
    226       //
    227206      // setEvaluationButton
    228207      //
     
    612591      this.viewRecombinationButton.UseVisualStyleBackColor = true;
    613592      this.viewRecombinationButton.Click += new System.EventHandler(this.viewRecombinationButton_Click);
     593      //
     594      // parentSelectionGroupBox
     595      //
     596      this.parentSelectionGroupBox.Anchor = System.Windows.Forms.AnchorStyles.None;
     597      this.parentSelectionGroupBox.Controls.Add(this.commaRadioButton);
     598      this.parentSelectionGroupBox.Controls.Add(this.plusRadioButton);
     599      this.parentSelectionGroupBox.Location = new System.Drawing.Point(218, 239);
     600      this.parentSelectionGroupBox.Name = "parentSelectionGroupBox";
     601      this.parentSelectionGroupBox.Size = new System.Drawing.Size(186, 38);
     602      this.parentSelectionGroupBox.TabIndex = 39;
     603      this.parentSelectionGroupBox.TabStop = false;
     604      this.parentSelectionGroupBox.Text = "Parent Selection";
     605      //
     606      // plusRadioButton
     607      //
     608      this.plusRadioButton.AutoSize = true;
     609      this.plusRadioButton.Checked = true;
     610      this.plusRadioButton.Location = new System.Drawing.Point(6, 15);
     611      this.plusRadioButton.Name = "plusRadioButton";
     612      this.plusRadioButton.Size = new System.Drawing.Size(45, 17);
     613      this.plusRadioButton.TabIndex = 0;
     614      this.plusRadioButton.TabStop = true;
     615      this.plusRadioButton.Text = "Plus";
     616      this.plusRadioButton.UseVisualStyleBackColor = true;
     617      this.plusRadioButton.CheckedChanged += new System.EventHandler(this.plusRadioButton_CheckedChanged);
     618      //
     619      // commaRadioButton
     620      //
     621      this.commaRadioButton.AutoSize = true;
     622      this.commaRadioButton.Location = new System.Drawing.Point(57, 15);
     623      this.commaRadioButton.Name = "commaRadioButton";
     624      this.commaRadioButton.Size = new System.Drawing.Size(60, 17);
     625      this.commaRadioButton.TabIndex = 1;
     626      this.commaRadioButton.Text = "Comma";
     627      this.commaRadioButton.UseVisualStyleBackColor = true;
     628      this.commaRadioButton.CheckedChanged += new System.EventHandler(this.commaRadioButton_CheckedChanged);
    614629      //
    615630      // ESEditor
     
    628643      this.parametersTabPage.PerformLayout();
    629644      this.scopesTabPage.ResumeLayout(false);
     645      this.parentSelectionGroupBox.ResumeLayout(false);
     646      this.parentSelectionGroupBox.PerformLayout();
    630647      this.ResumeLayout(false);
    631648
     
    670687    private System.Windows.Forms.Button viewSolutionGenerationButton;
    671688    private System.Windows.Forms.Button viewProblemInitializationButton;
    672     private System.Windows.Forms.Button plusNotationButton;
    673     private System.Windows.Forms.Label plusNotationLabel;
    674689    private System.Windows.Forms.TextBox targetSuccessRateTextBox;
    675690    private System.Windows.Forms.Label targetSuccessRateLabel;
     
    681696    private System.Windows.Forms.TextBox rhoTextBox;
    682697    private System.Windows.Forms.Label rhoLabel;
     698    private System.Windows.Forms.GroupBox parentSelectionGroupBox;
     699    private System.Windows.Forms.RadioButton commaRadioButton;
     700    private System.Windows.Forms.RadioButton plusRadioButton;
    683701  }
    684702}
  • trunk/sources/HeuristicLab.ES/ESEditor.cs

    r86 r87  
    9797
    9898    #region Button Events
    99     private void plusNotationButton_Click(object sender, EventArgs e) {
    100       if (plusNotationButton.Text.Equals("Plus")) {
    101         plusNotationButton.Text = "Comma";
    102       } else {
    103         plusNotationButton.Text = "Plus";
    104       }
    105       ES.PlusNotation = !ES.PlusNotation;
    106     }
    10799    private void viewProblemInitializationButton_Click(object sender, EventArgs e) {
    108100      IView view = ES.ProblemInjector.CreateView();
     
    211203    }
    212204    #endregion
     205
     206    #region RadioButton Events
     207    private void plusRadioButton_CheckedChanged(object sender, EventArgs e) {
     208      if (plusRadioButton.Checked) ES.PlusNotation = true;
     209    }
     210
     211    private void commaRadioButton_CheckedChanged(object sender, EventArgs e) {
     212      if (commaRadioButton.Checked) ES.PlusNotation = false;
     213    }
     214    #endregion
    213215  }
    214216}
Note: See TracChangeset for help on using the changeset viewer.