Changeset 16692 for branches/2521_ProblemRefactoring/HeuristicLab.Tests/HeuristicLab.Scripting-3.3/Script Sources
- Timestamp:
- 03/18/19 17:24:30 (6 years ago)
- Location:
- branches/2521_ProblemRefactoring
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2521_ProblemRefactoring
- Property svn:ignore
-
old new 24 24 protoc.exe 25 25 obj 26 .vs
-
- Property svn:mergeinfo changed
- Property svn:ignore
-
branches/2521_ProblemRefactoring/HeuristicLab.Tests
- Property svn:mergeinfo changed
-
branches/2521_ProblemRefactoring/HeuristicLab.Tests/HeuristicLab.Scripting-3.3/Script Sources/GUIAutomationScriptSource.cs
r11789 r16692 1 using System; 2 using System.Linq; 3 using System.Threading; 1 using System.Linq; 4 2 using System.Windows.Forms; 5 3 6 4 using HeuristicLab.Algorithms.GeneticAlgorithm; 7 using HeuristicLab.Core;8 5 using HeuristicLab.MainForm; 9 6 using HeuristicLab.MainForm.WindowsForms; … … 13 10 14 11 public class GUIAutomationScript : HeuristicLab.Scripting.CSharpScriptBase { 15 readonly ManualResetEvent mutex = new ManualResetEvent(false);16 17 12 public override void Main() { 18 13 var ga = new GeneticAlgorithm { … … 27 22 ga.PopulationSize.Value *= 2; 28 23 } 29 30 experiment.ExecutionStateChanged += OnExecutionStateChanged;31 24 experiment.Start(); 32 mutex.WaitOne();33 25 34 26 vars.experiment = experiment; … … 39 31 bubbleChart.Controls.OfType<ComboBox>().Single(x => x.Name == "xAxisComboBox").SelectedItem = "PopulationSize"; 40 32 } 41 42 private void OnExecutionStateChanged(object sender, EventArgs e) {43 if (((IExecutable)sender).ExecutionState == ExecutionState.Stopped)44 mutex.Set();45 }46 33 }
Note: See TracChangeset
for help on using the changeset viewer.