Changeset 2728 for trunk/sources/HeuristicLab.GP.Algorithms
- Timestamp:
- 02/01/10 08:52:32 (15 years ago)
- Location:
- trunk/sources/HeuristicLab.GP.Algorithms/3.2
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.GP.Algorithms/3.2/OffSpringSelectionGpEditor.Designer.cs
r2341 r2728 46 46 /// </summary> 47 47 private void InitializeComponent() { 48 this.components = new System.ComponentModel.Container(); 48 49 this.executeButton = new System.Windows.Forms.Button(); 49 50 this.tabControl = new System.Windows.Forms.TabControl(); … … 72 73 this.resetButton = new System.Windows.Forms.Button(); 73 74 this.cloneEngineButton = new System.Windows.Forms.Button(); 75 this.functionLibraryInjectorViewButton = new System.Windows.Forms.Button(); 76 this.functionLibraryInjectorSetButton = new System.Windows.Forms.Button(); 77 this.functionLibraryInjectorTextBox = new System.Windows.Forms.TextBox(); 78 this.label1 = new System.Windows.Forms.Label(); 79 this.comparisonFactorTextBox = new System.Windows.Forms.TextBox(); 80 this.label2 = new System.Windows.Forms.Label(); 81 this.successRatioLimitTextBox = new System.Windows.Forms.TextBox(); 82 this.label3 = new System.Windows.Forms.Label(); 83 this.errorProvider = new System.Windows.Forms.ErrorProvider(this.components); 74 84 this.tabControl.SuspendLayout(); 75 85 this.parametersTabPage.SuspendLayout(); 76 86 this.scopesTabPage.SuspendLayout(); 87 ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit(); 77 88 this.SuspendLayout(); 78 89 // … … 103 114 // parametersTabPage 104 115 // 116 this.parametersTabPage.Controls.Add(this.successRatioLimitTextBox); 117 this.parametersTabPage.Controls.Add(this.label3); 118 this.parametersTabPage.Controls.Add(this.comparisonFactorTextBox); 119 this.parametersTabPage.Controls.Add(this.label2); 120 this.parametersTabPage.Controls.Add(this.functionLibraryInjectorViewButton); 121 this.parametersTabPage.Controls.Add(this.functionLibraryInjectorSetButton); 122 this.parametersTabPage.Controls.Add(this.functionLibraryInjectorTextBox); 123 this.parametersTabPage.Controls.Add(this.label1); 105 124 this.parametersTabPage.Controls.Add(this.selectionPressureTextBox); 106 125 this.parametersTabPage.Controls.Add(this.selectionPressureLabel); … … 132 151 // 133 152 this.selectionPressureTextBox.Anchor = System.Windows.Forms.AnchorStyles.None; 134 this.selectionPressureTextBox.Location = new System.Drawing.Point(218, 130);153 this.selectionPressureTextBox.Location = new System.Drawing.Point(218, 234); 135 154 this.selectionPressureTextBox.Name = "selectionPressureTextBox"; 136 155 this.selectionPressureTextBox.Size = new System.Drawing.Size(186, 20); 137 156 this.selectionPressureTextBox.TabIndex = 17; 157 this.selectionPressureTextBox.TextChanged += new System.EventHandler(this.selectionPressureTextBox_TextChanged); 138 158 // 139 159 // selectionPressureLabel … … 141 161 this.selectionPressureLabel.Anchor = System.Windows.Forms.AnchorStyles.None; 142 162 this.selectionPressureLabel.AutoSize = true; 143 this.selectionPressureLabel.Location = new System.Drawing.Point(65, 133);163 this.selectionPressureLabel.Location = new System.Drawing.Point(65, 237); 144 164 this.selectionPressureLabel.Name = "selectionPressureLabel"; 145 165 this.selectionPressureLabel.Size = new System.Drawing.Size(145, 13); … … 150 170 // 151 171 this.viewProblemInitializationButton.Anchor = System.Windows.Forms.AnchorStyles.None; 152 this.viewProblemInitializationButton.Location = new System.Drawing.Point(410, 2 41);172 this.viewProblemInitializationButton.Location = new System.Drawing.Point(410, 281); 153 173 this.viewProblemInitializationButton.Name = "viewProblemInitializationButton"; 154 174 this.viewProblemInitializationButton.Size = new System.Drawing.Size(53, 20); … … 161 181 // 162 182 this.setProblemInitializationButton.Anchor = System.Windows.Forms.AnchorStyles.None; 163 this.setProblemInitializationButton.Location = new System.Drawing.Point(469, 2 41);183 this.setProblemInitializationButton.Location = new System.Drawing.Point(469, 281); 164 184 this.setProblemInitializationButton.Name = "setProblemInitializationButton"; 165 185 this.setProblemInitializationButton.Size = new System.Drawing.Size(43, 20); … … 172 192 // 173 193 this.problemInitializationTextBox.Anchor = System.Windows.Forms.AnchorStyles.None; 174 this.problemInitializationTextBox.Location = new System.Drawing.Point(218, 2 41);194 this.problemInitializationTextBox.Location = new System.Drawing.Point(218, 281); 175 195 this.problemInitializationTextBox.Name = "problemInitializationTextBox"; 176 196 this.problemInitializationTextBox.ReadOnly = true; … … 192 212 // 193 213 this.elitesTextBox.Anchor = System.Windows.Forms.AnchorStyles.None; 194 this.elitesTextBox.Location = new System.Drawing.Point(218, 1 82);214 this.elitesTextBox.Location = new System.Drawing.Point(218, 104); 195 215 this.elitesTextBox.Name = "elitesTextBox"; 196 216 this.elitesTextBox.Size = new System.Drawing.Size(186, 20); 197 217 this.elitesTextBox.TabIndex = 11; 218 this.elitesTextBox.TextChanged += new System.EventHandler(this.elitesTextBox_TextChanged); 198 219 // 199 220 // problemInitializationLabel … … 201 222 this.problemInitializationLabel.Anchor = System.Windows.Forms.AnchorStyles.None; 202 223 this.problemInitializationLabel.AutoSize = true; 203 this.problemInitializationLabel.Location = new System.Drawing.Point(65, 2 44);224 this.problemInitializationLabel.Location = new System.Drawing.Point(65, 284); 204 225 this.problemInitializationLabel.Name = "problemInitializationLabel"; 205 226 this.problemInitializationLabel.Size = new System.Drawing.Size(105, 13); … … 211 232 this.elitesLabel.Anchor = System.Windows.Forms.AnchorStyles.None; 212 233 this.elitesLabel.AutoSize = true; 213 this.elitesLabel.Location = new System.Drawing.Point(66, 1 85);234 this.elitesLabel.Location = new System.Drawing.Point(66, 107); 214 235 this.elitesLabel.Name = "elitesLabel"; 215 236 this.elitesLabel.Size = new System.Drawing.Size(35, 13); … … 220 241 // 221 242 this.mutationRateTextBox.Anchor = System.Windows.Forms.AnchorStyles.None; 222 this.mutationRateTextBox.Location = new System.Drawing.Point(218, 1 56);243 this.mutationRateTextBox.Location = new System.Drawing.Point(218, 130); 223 244 this.mutationRateTextBox.Name = "mutationRateTextBox"; 224 245 this.mutationRateTextBox.Size = new System.Drawing.Size(186, 20); 225 246 this.mutationRateTextBox.TabIndex = 9; 247 this.mutationRateTextBox.TextChanged += new System.EventHandler(this.mutationRateTextBox_TextChanged); 226 248 // 227 249 // mutationRateLabel … … 229 251 this.mutationRateLabel.Anchor = System.Windows.Forms.AnchorStyles.None; 230 252 this.mutationRateLabel.AutoSize = true; 231 this.mutationRateLabel.Location = new System.Drawing.Point(66, 1 59);253 this.mutationRateLabel.Location = new System.Drawing.Point(66, 133); 232 254 this.mutationRateLabel.Name = "mutationRateLabel"; 233 255 this.mutationRateLabel.Size = new System.Drawing.Size(77, 13); … … 238 260 // 239 261 this.maximumEvaluatedSolutionsTextBox.Anchor = System.Windows.Forms.AnchorStyles.None; 240 this.maximumEvaluatedSolutionsTextBox.Location = new System.Drawing.Point(218, 104);262 this.maximumEvaluatedSolutionsTextBox.Location = new System.Drawing.Point(218, 208); 241 263 this.maximumEvaluatedSolutionsTextBox.Name = "maximumEvaluatedSolutionsTextBox"; 242 264 this.maximumEvaluatedSolutionsTextBox.Size = new System.Drawing.Size(186, 20); 243 265 this.maximumEvaluatedSolutionsTextBox.TabIndex = 7; 266 this.maximumEvaluatedSolutionsTextBox.TextChanged += new System.EventHandler(this.maximumEvaluatedSolutionsTextBox_TextChanged); 244 267 // 245 268 // maxEvaluatedSolutionsLabel … … 247 270 this.maxEvaluatedSolutionsLabel.Anchor = System.Windows.Forms.AnchorStyles.None; 248 271 this.maxEvaluatedSolutionsLabel.AutoSize = true; 249 this.maxEvaluatedSolutionsLabel.Location = new System.Drawing.Point(65, 107);272 this.maxEvaluatedSolutionsLabel.Location = new System.Drawing.Point(65, 211); 250 273 this.maxEvaluatedSolutionsLabel.Name = "maxEvaluatedSolutionsLabel"; 251 274 this.maxEvaluatedSolutionsLabel.Size = new System.Drawing.Size(130, 13); … … 260 283 this.randomSeedTextBox.Size = new System.Drawing.Size(186, 20); 261 284 this.randomSeedTextBox.TabIndex = 3; 285 this.randomSeedTextBox.TextChanged += new System.EventHandler(this.randomSeedTextBox_TextChanged); 262 286 // 263 287 // populationSizeTextBox … … 268 292 this.populationSizeTextBox.Size = new System.Drawing.Size(186, 20); 269 293 this.populationSizeTextBox.TabIndex = 5; 294 this.populationSizeTextBox.TextChanged += new System.EventHandler(this.populationSizeTextBox_TextChanged); 270 295 // 271 296 // setRandomSeedRandomlyLabel … … 353 378 this.cloneEngineButton.UseVisualStyleBackColor = true; 354 379 this.cloneEngineButton.Click += new System.EventHandler(this.cloneEngineButton_Click); 380 // 381 // functionLibraryInjectorViewButton 382 // 383 this.functionLibraryInjectorViewButton.Anchor = System.Windows.Forms.AnchorStyles.None; 384 this.functionLibraryInjectorViewButton.Location = new System.Drawing.Point(410, 307); 385 this.functionLibraryInjectorViewButton.Name = "functionLibraryInjectorViewButton"; 386 this.functionLibraryInjectorViewButton.Size = new System.Drawing.Size(53, 20); 387 this.functionLibraryInjectorViewButton.TabIndex = 20; 388 this.functionLibraryInjectorViewButton.Text = "View..."; 389 this.functionLibraryInjectorViewButton.UseVisualStyleBackColor = true; 390 this.functionLibraryInjectorViewButton.Click += new System.EventHandler(this.functionLibraryInjectorViewButton_Click); 391 // 392 // functionLibraryInjectorSetButton 393 // 394 this.functionLibraryInjectorSetButton.Anchor = System.Windows.Forms.AnchorStyles.None; 395 this.functionLibraryInjectorSetButton.Location = new System.Drawing.Point(469, 307); 396 this.functionLibraryInjectorSetButton.Name = "functionLibraryInjectorSetButton"; 397 this.functionLibraryInjectorSetButton.Size = new System.Drawing.Size(43, 20); 398 this.functionLibraryInjectorSetButton.TabIndex = 21; 399 this.functionLibraryInjectorSetButton.Text = "Set..."; 400 this.functionLibraryInjectorSetButton.UseVisualStyleBackColor = true; 401 this.functionLibraryInjectorSetButton.Click += new System.EventHandler(this.functionLibraryInjectorSetButton_Click); 402 // 403 // functionLibraryInjectorTextBox 404 // 405 this.functionLibraryInjectorTextBox.Anchor = System.Windows.Forms.AnchorStyles.None; 406 this.functionLibraryInjectorTextBox.Location = new System.Drawing.Point(218, 307); 407 this.functionLibraryInjectorTextBox.Name = "functionLibraryInjectorTextBox"; 408 this.functionLibraryInjectorTextBox.ReadOnly = true; 409 this.functionLibraryInjectorTextBox.Size = new System.Drawing.Size(186, 20); 410 this.functionLibraryInjectorTextBox.TabIndex = 19; 411 // 412 // label1 413 // 414 this.label1.Anchor = System.Windows.Forms.AnchorStyles.None; 415 this.label1.AutoSize = true; 416 this.label1.Location = new System.Drawing.Point(65, 310); 417 this.label1.Name = "label1"; 418 this.label1.Size = new System.Drawing.Size(81, 13); 419 this.label1.TabIndex = 18; 420 this.label1.Text = "&Function library:"; 421 // 422 // comparisonFactorTextBox 423 // 424 this.comparisonFactorTextBox.Anchor = System.Windows.Forms.AnchorStyles.None; 425 this.comparisonFactorTextBox.Location = new System.Drawing.Point(218, 156); 426 this.comparisonFactorTextBox.Name = "comparisonFactorTextBox"; 427 this.comparisonFactorTextBox.Size = new System.Drawing.Size(186, 20); 428 this.comparisonFactorTextBox.TabIndex = 23; 429 this.comparisonFactorTextBox.TextChanged += new System.EventHandler(this.comparisonFactorTextBox_TextChanged); 430 // 431 // label2 432 // 433 this.label2.Anchor = System.Windows.Forms.AnchorStyles.None; 434 this.label2.AutoSize = true; 435 this.label2.Location = new System.Drawing.Point(66, 159); 436 this.label2.Name = "label2"; 437 this.label2.Size = new System.Drawing.Size(95, 13); 438 this.label2.TabIndex = 22; 439 this.label2.Text = "Comparison factor:"; 440 // 441 // successRatioLimitTextBox 442 // 443 this.successRatioLimitTextBox.Anchor = System.Windows.Forms.AnchorStyles.None; 444 this.successRatioLimitTextBox.Location = new System.Drawing.Point(218, 182); 445 this.successRatioLimitTextBox.Name = "successRatioLimitTextBox"; 446 this.successRatioLimitTextBox.Size = new System.Drawing.Size(186, 20); 447 this.successRatioLimitTextBox.TabIndex = 25; 448 this.successRatioLimitTextBox.TextChanged += new System.EventHandler(this.successRatioLimitTextBox_TextChanged); 449 // 450 // label3 451 // 452 this.label3.Anchor = System.Windows.Forms.AnchorStyles.None; 453 this.label3.AutoSize = true; 454 this.label3.Location = new System.Drawing.Point(66, 185); 455 this.label3.Name = "label3"; 456 this.label3.Size = new System.Drawing.Size(94, 13); 457 this.label3.TabIndex = 24; 458 this.label3.Text = "Success ratio limit:"; 459 // 460 // errorProvider 461 // 462 this.errorProvider.ContainerControl = this; 355 463 // 356 464 // OffspringSelectionGpEditor … … 369 477 this.parametersTabPage.PerformLayout(); 370 478 this.scopesTabPage.ResumeLayout(false); 479 ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit(); 371 480 this.ResumeLayout(false); 372 481 … … 380 489 private System.Windows.Forms.Button abortButton; 381 490 private System.Windows.Forms.Button resetButton; 382 private System.Windows.Forms.TextBox mutationRateTextBox;383 private System.Windows.Forms.Label mutationRateLabel;384 private System.Windows.Forms.TextBox populationSizeTextBox;385 private System.Windows.Forms.Label populationSizeLabel;386 491 private System.Windows.Forms.TabPage scopesTabPage; 387 private System.Windows.Forms.TextBox maximumEvaluatedSolutionsTextBox;388 private System.Windows.Forms.Label maxEvaluatedSolutionsLabel;389 private System.Windows.Forms.TextBox elitesTextBox;390 private System.Windows.Forms.Label elitesLabel;391 private System.Windows.Forms.TextBox randomSeedTextBox;392 private System.Windows.Forms.Label setRandomSeedRandomlyLabel;393 private System.Windows.Forms.Label randomSeedLabel;394 private System.Windows.Forms.CheckBox setRandomSeedRandomlyCheckBox;395 private System.Windows.Forms.Label problemInitializationLabel;396 492 private System.Windows.Forms.Button cloneEngineButton; 397 private System.Windows.Forms.TextBox problemInitializationTextBox;398 private System.Windows.Forms.Button setProblemInitializationButton;399 493 private HeuristicLab.Core.ScopeView scopeView; 400 private System.Windows.Forms.Button viewProblemInitializationButton; 401 private System.Windows.Forms.TextBox selectionPressureTextBox; 402 private System.Windows.Forms.Label selectionPressureLabel; 494 protected System.Windows.Forms.Button functionLibraryInjectorViewButton; 495 protected System.Windows.Forms.Button functionLibraryInjectorSetButton; 496 protected System.Windows.Forms.TextBox functionLibraryInjectorTextBox; 497 protected System.Windows.Forms.Label label1; 498 protected System.Windows.Forms.TextBox comparisonFactorTextBox; 499 protected System.Windows.Forms.Label label2; 500 protected System.Windows.Forms.TextBox mutationRateTextBox; 501 protected System.Windows.Forms.Label mutationRateLabel; 502 protected System.Windows.Forms.TextBox populationSizeTextBox; 503 protected System.Windows.Forms.Label populationSizeLabel; 504 protected System.Windows.Forms.TextBox maximumEvaluatedSolutionsTextBox; 505 protected System.Windows.Forms.Label maxEvaluatedSolutionsLabel; 506 protected System.Windows.Forms.TextBox elitesTextBox; 507 protected System.Windows.Forms.Label elitesLabel; 508 protected System.Windows.Forms.TextBox randomSeedTextBox; 509 protected System.Windows.Forms.Label setRandomSeedRandomlyLabel; 510 protected System.Windows.Forms.Label randomSeedLabel; 511 protected System.Windows.Forms.CheckBox setRandomSeedRandomlyCheckBox; 512 protected System.Windows.Forms.Label problemInitializationLabel; 513 protected System.Windows.Forms.TextBox problemInitializationTextBox; 514 protected System.Windows.Forms.Button setProblemInitializationButton; 515 protected System.Windows.Forms.Button viewProblemInitializationButton; 516 protected System.Windows.Forms.TextBox selectionPressureTextBox; 517 protected System.Windows.Forms.Label selectionPressureLabel; 518 protected System.Windows.Forms.TextBox successRatioLimitTextBox; 519 protected System.Windows.Forms.Label label3; 520 private System.Windows.Forms.ErrorProvider errorProvider; 403 521 } 404 522 } -
trunk/sources/HeuristicLab.GP.Algorithms/3.2/OffSpringSelectionGpEditor.cs
r2591 r2728 64 64 } else { 65 65 tabControl.Enabled = true; 66 problemInitializationTextBox.Text = OffspringSelectionGP.ProblemInjector.GetType().Name; 66 problemInitializationTextBox.Text = OffspringSelectionGP.ProblemInjector.Name; 67 functionLibraryInjectorTextBox.Text = OffspringSelectionGP.FunctionLibraryInjector.Name; 67 68 } 68 69 } … … 76 77 mutationRateTextBox.DataBindings.Add("Text", OffspringSelectionGP, "MutationRate"); 77 78 elitesTextBox.DataBindings.Add("Text", OffspringSelectionGP, "Elites"); 79 comparisonFactorTextBox.DataBindings.Add("Text", OffspringSelectionGP, "ComparisonFactor"); 80 successRatioLimitTextBox.DataBindings.Add("Text", OffspringSelectionGP, "SuccessRatioLimit"); 78 81 } 79 82 … … 81 84 private void viewProblemInjectorButton_Click(object sender, EventArgs e) { 82 85 IView view = OffspringSelectionGP.ProblemInjector.CreateView(); 83 if (view != null)86 if (view != null) 84 87 ControlManager.Manager.ShowControl(view); 85 88 } … … 89 92 if (chooseOperatorDialog.ShowDialog(this) == DialogResult.OK) { 90 93 OffspringSelectionGP.ProblemInjector = chooseOperatorDialog.Operator; 91 problemInitializationTextBox.Text = OffspringSelectionGP.ProblemInjector.GetType().Name; 92 } 93 } 94 problemInitializationTextBox.Text = OffspringSelectionGP.ProblemInjector.Name; 95 } 96 } 97 98 private void functionLibraryInjectorViewButton_Click(object sender, EventArgs e) { 99 IView view = OffspringSelectionGP.FunctionLibraryInjector.CreateView(); 100 if (view != null) 101 ControlManager.Manager.ShowControl(view); 102 } 103 104 private void functionLibraryInjectorSetButton_Click(object sender, EventArgs e) { 105 if (chooseOperatorDialog == null) chooseOperatorDialog = new ChooseOperatorDialog(); 106 if (chooseOperatorDialog.ShowDialog(this) == DialogResult.OK) { 107 OffspringSelectionGP.FunctionLibraryInjector = chooseOperatorDialog.Operator; 108 functionLibraryInjectorTextBox.Text = OffspringSelectionGP.FunctionLibraryInjector.Name; 109 } 110 } 111 94 112 private void executeButton_Click(object sender, EventArgs e) { 95 113 executeButton.Enabled = false; … … 120 138 } 121 139 private void Engine_Finished(object sender, EventArgs e) { 122 if (InvokeRequired)140 if (InvokeRequired) 123 141 Invoke((EventHandler)Engine_Finished, sender, e); 124 142 else { … … 135 153 randomSeedLabel.Enabled = !setRandomSeedRandomlyCheckBox.Checked; 136 154 } 155 156 private void randomSeedTextBox_TextChanged(object sender, EventArgs e) { 157 int randomSeed; 158 if (int.TryParse(randomSeedTextBox.Text, out randomSeed)) { 159 //OffspringSelectionGP.RandomSeed = randomSeed; 160 errorProvider.SetError(randomSeedTextBox, string.Empty); 161 } else { 162 errorProvider.SetError(randomSeedTextBox, "Invalid value."); 163 } 164 } 165 166 private void populationSizeTextBox_TextChanged(object sender, EventArgs e) { 167 int popSize; 168 if (int.TryParse(populationSizeTextBox.Text, out popSize) && popSize > 1) { 169 //OffspringSelectionGP.PopulationSize = popSize; 170 errorProvider.SetError(populationSizeTextBox, string.Empty); 171 } else { 172 errorProvider.SetError(populationSizeTextBox, "Population size must be a positive integer > 0."); 173 } 174 } 175 176 private void elitesTextBox_TextChanged(object sender, EventArgs e) { 177 int elites; 178 if (int.TryParse(elitesTextBox.Text, out elites) && elites >= 0 && elites < OffspringSelectionGP.PopulationSize) { 179 //OffspringSelectionGP.Elites = elites; 180 errorProvider.SetError(elitesTextBox, string.Empty); 181 } else { 182 errorProvider.SetError(elitesTextBox, "Invalid value for number of elites. Allowed range [0.." + OffspringSelectionGP.PopulationSize + "[."); 183 } 184 } 185 186 private void mutationRateTextBox_TextChanged(object sender, EventArgs e) { 187 double mutationRate; 188 if (double.TryParse(mutationRateTextBox.Text, out mutationRate) && mutationRate >= 0.0 && mutationRate <= 1.0) { 189 //OffspringSelectionGP.MutationRate = mutationRate; 190 errorProvider.SetError(mutationRateTextBox, string.Empty); 191 } else { 192 errorProvider.SetError(mutationRateTextBox, "Invalid value for mutation rate. Allowed range = [0..1]."); 193 } 194 } 195 196 private void comparisonFactorTextBox_TextChanged(object sender, EventArgs e) { 197 double comparisonFactor; 198 if (double.TryParse(comparisonFactorTextBox.Text, out comparisonFactor) && comparisonFactor >= 0.0 && comparisonFactor <= 1.0) { 199 //OffspringSelectionGP.ComparisonFactor = comparisonFactor; 200 errorProvider.SetError(comparisonFactorTextBox, string.Empty); 201 } else { 202 errorProvider.SetError(comparisonFactorTextBox, "Invalid value for comparison factor. Allowed range = [0..1]."); 203 } 204 } 205 206 private void successRatioLimitTextBox_TextChanged(object sender, EventArgs e) { 207 double successRatioLimit; 208 if (double.TryParse(successRatioLimitTextBox.Text, out successRatioLimit) && successRatioLimit >= 0.0 && successRatioLimit <= 1.0) { 209 //OffspringSelectionGP.SuccessRatioLimit = successRatioLimit; 210 errorProvider.SetError(successRatioLimitTextBox, string.Empty); 211 } else { 212 errorProvider.SetError(successRatioLimitTextBox, "Invalid value for success ratio limit. Allowed range = [0..1]."); 213 } 214 } 215 216 private void maximumEvaluatedSolutionsTextBox_TextChanged(object sender, EventArgs e) { 217 int maxEvaluatedSolutions; 218 if (int.TryParse(maximumEvaluatedSolutionsTextBox.Text, out maxEvaluatedSolutions) && maxEvaluatedSolutions > 0) { 219 //OffspringSelectionGP.MaxEvaluatedSolutions = maxEvaluatedSolutions; 220 errorProvider.SetError(maximumEvaluatedSolutionsTextBox, string.Empty); 221 } else { 222 errorProvider.SetError(maximumEvaluatedSolutionsTextBox, "Max. evaluated solutions must be a positive integer > 0."); 223 } 224 } 225 226 private void selectionPressureTextBox_TextChanged(object sender, EventArgs e) { 227 double maxSelPres; 228 if (double.TryParse(selectionPressureTextBox.Text, out maxSelPres) && maxSelPres > 1.0) { 229 //OffspringSelectionGP.SelectionPressureLimit = maxSelPres; 230 errorProvider.SetError(selectionPressureTextBox, string.Empty); 231 } else { 232 errorProvider.SetError(selectionPressureTextBox, "Selection pressure limit must be > 1.0."); 233 } 234 } 137 235 } 138 236 } -
trunk/sources/HeuristicLab.GP.Algorithms/3.2/OffSpringSelectionGpEditor.resx
r2341 r2728 118 118 <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> 119 119 </resheader> 120 <metadata name="errorProvider.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> 121 <value>17, 17</value> 122 </metadata> 120 123 </root>
Note: See TracChangeset
for help on using the changeset viewer.