Changeset 8190
- Timestamp:
- 07/03/12 13:07:00 (12 years ago)
- Location:
- trunk/sources
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Optimization.Views/3.3/AlgorithmView.Designer.cs
r7967 r8190 59 59 // 60 60 this.startButton.Location = new System.Drawing.Point(0, 458); 61 this.toolTip.SetToolTip(this.startButton, "Start/Resume Experiment");61 this.toolTip.SetToolTip(this.startButton, "Start/Resume Algorithm"); 62 62 // 63 63 // executionTimeTextBox … … 72 72 // 73 73 this.pauseButton.Location = new System.Drawing.Point(30, 458); 74 this.toolTip.SetToolTip(this.pauseButton, "Pause Experiment");74 this.toolTip.SetToolTip(this.pauseButton, "Pause Algorithm"); 75 75 // 76 76 // stopButton 77 77 // 78 78 this.stopButton.Location = new System.Drawing.Point(60, 458); 79 this.toolTip.SetToolTip(this.stopButton, "Stop Experiment");79 this.toolTip.SetToolTip(this.stopButton, "Stop Algorithm"); 80 80 // 81 81 // resetButton 82 82 // 83 83 this.resetButton.Location = new System.Drawing.Point(90, 458); 84 this.toolTip.SetToolTip(this.resetButton, "Reset Experiment");84 this.toolTip.SetToolTip(this.resetButton, "Reset Algorithm"); 85 85 // 86 86 // nameTextBox -
trunk/sources/HeuristicLab.Optimization.Views/3.3/BatchRunView.Designer.cs
r7967 r8190 55 55 // 56 56 this.startButton.Location = new System.Drawing.Point(0, 459); 57 this.toolTip.SetToolTip(this.startButton, "Start/Resume Experiment");57 this.toolTip.SetToolTip(this.startButton, "Start/Resume Batchrun"); 58 58 // 59 59 // executionTimeTextBox … … 68 68 // 69 69 this.pauseButton.Location = new System.Drawing.Point(30, 459); 70 this.toolTip.SetToolTip(this.pauseButton, "Pause Experiment");70 this.toolTip.SetToolTip(this.pauseButton, "Pause Batchrun"); 71 71 // 72 72 // stopButton 73 73 // 74 74 this.stopButton.Location = new System.Drawing.Point(60, 459); 75 this.toolTip.SetToolTip(this.stopButton, "Stop Experiment");75 this.toolTip.SetToolTip(this.stopButton, "Stop Batchrun"); 76 76 // 77 77 // resetButton 78 78 // 79 79 this.resetButton.Location = new System.Drawing.Point(90, 458); 80 this.toolTip.SetToolTip(this.resetButton, "Reset Experiment");80 this.toolTip.SetToolTip(this.resetButton, "Reset Batchrun"); 81 81 // 82 82 // nameTextBox -
trunk/sources/HeuristicLab.Optimization.Views/3.3/IOptimizerView.Designer.cs
r7967 r8190 73 73 this.startButton.Size = new System.Drawing.Size(24, 24); 74 74 this.startButton.TabIndex = 10; 75 this.toolTip.SetToolTip(this.startButton, "Start/Resume Experiment");75 this.toolTip.SetToolTip(this.startButton, "Start/Resume Optimizer"); 76 76 this.startButton.UseVisualStyleBackColor = true; 77 77 this.startButton.Click += new System.EventHandler(this.startButton_Click); … … 104 104 this.pauseButton.Size = new System.Drawing.Size(24, 24); 105 105 this.pauseButton.TabIndex = 11; 106 this.toolTip.SetToolTip(this.pauseButton, "Pause Experiment");106 this.toolTip.SetToolTip(this.pauseButton, "Pause Optimizer"); 107 107 this.pauseButton.UseVisualStyleBackColor = true; 108 108 this.pauseButton.Click += new System.EventHandler(this.pauseButton_Click); … … 116 116 this.stopButton.Size = new System.Drawing.Size(24, 24); 117 117 this.stopButton.TabIndex = 12; 118 this.toolTip.SetToolTip(this.stopButton, "Stop Experiment");118 this.toolTip.SetToolTip(this.stopButton, "Stop Optimizer"); 119 119 this.stopButton.UseVisualStyleBackColor = true; 120 120 this.stopButton.Click += new System.EventHandler(this.stopButton_Click); … … 128 128 this.resetButton.Size = new System.Drawing.Size(24, 24); 129 129 this.resetButton.TabIndex = 13; 130 this.toolTip.SetToolTip(this.resetButton, "Reset Experiment");130 this.toolTip.SetToolTip(this.resetButton, "Reset Optimizer"); 131 131 this.resetButton.UseVisualStyleBackColor = true; 132 132 this.resetButton.Click += new System.EventHandler(this.resetButton_Click); -
trunk/sources/HeuristicLab.Optimization/3.3/BatchRun.cs
r8189 r8190 153 153 } 154 154 155 private bool batchRunPrepared = false; 155 156 private bool batchRunStarted = false; 156 157 private bool batchRunPaused = false; … … 206 207 batchRunPaused = original.batchRunPaused; 207 208 batchRunStopped = original.batchRunStopped; 209 batchRunPrepared = original.batchRunPrepared; 208 210 Initialize(); 209 211 } … … 228 230 repetitionsCounter = 0; 229 231 if (clearRuns) runs.Clear(); 230 Optimizer.Prepare(clearRuns);232 batchRunPrepared = true; 231 233 batchRunStarted = false; 232 234 batchRunPaused = false; 233 235 batchRunStopped = false; 236 Optimizer.Prepare(clearRuns); 234 237 } else { 235 238 ExecutionState = ExecutionState.Stopped; … … 241 244 if (Optimizer == null) return; 242 245 246 batchRunPrepared = false; 243 247 batchRunStarted = true; 244 248 batchRunPaused = false; … … 253 257 if (Optimizer.ExecutionState != ExecutionState.Started) return; 254 258 259 batchRunPrepared = false; 255 260 batchRunStarted = false; 256 261 batchRunPaused = true; … … 262 267 throw new InvalidOperationException(string.Format("Stop not allowed in execution state \"{0}\".", ExecutionState)); 263 268 if (Optimizer == null) return; 264 if (Optimizer.ExecutionState != ExecutionState.Started && Optimizer.ExecutionState != ExecutionState.Paused) return; 269 if (Optimizer.ExecutionState != ExecutionState.Started && Optimizer.ExecutionState != ExecutionState.Paused) { 270 OnStopped(); 271 return; 272 } 273 274 batchRunPrepared = false; 265 275 batchRunStarted = false; 266 276 batchRunPaused = false; … … 292 302 public event EventHandler Prepared; 293 303 private void OnPrepared() { 304 batchRunPrepared = false; 294 305 ExecutionState = ExecutionState.Prepared; 295 306 EventHandler handler = Prepared; … … 298 309 public event EventHandler Started; 299 310 private void OnStarted() { 311 //TODO add coment 300 312 ExecutionState = ExecutionState.Started; 301 313 EventHandler handler = Started; … … 304 316 public event EventHandler Paused; 305 317 private void OnPaused() { 318 batchRunPaused = false; 306 319 ExecutionState = ExecutionState.Paused; 307 320 EventHandler handler = Paused; … … 310 323 public event EventHandler Stopped; 311 324 private void OnStopped() { 325 //reset flags because it cannot be done if the optimizer gets prepared 326 batchRunStopped = false; 312 327 ExecutionState = ExecutionState.Stopped; 313 328 EventHandler handler = Stopped; … … 354 369 } 355 370 private void Optimizer_Prepared(object sender, EventArgs e) { 356 if ( ExecutionState == ExecutionState.Stopped || !batchRunStarted) {371 if (batchRunPrepared || (ExecutionState == ExecutionState.Stopped)) { 357 372 ExecutionTime = TimeSpan.Zero; 358 373 runsExecutionTime = TimeSpan.Zero; 374 repetitionsCounter = 0; 359 375 OnPrepared(); 360 376 }
Note: See TracChangeset
for help on using the changeset viewer.