- Timestamp:
- 01/20/10 17:25:08 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Core.Views/3.3/EngineBaseView.cs
r2655 r2662 105 105 startButton.Enabled = !Engine.Finished; 106 106 resetButton.Enabled = true; 107 executionTimeTextBox.Text = Engine.ExecutionTime.ToString();107 UpdateExecutionTimeTextBox(); 108 108 executionTimeTextBox.Enabled = true; 109 109 } … … 126 126 stopButton.Enabled = false; 127 127 resetButton.Enabled = true; 128 executionTimeTextBox.Text = Engine.ExecutionTime.ToString();128 UpdateExecutionTimeTextBox(); 129 129 } 130 130 } … … 139 139 stopButton.Enabled = true; 140 140 resetButton.Enabled = false; 141 executionTimeTextBox.Text = Engine.ExecutionTime.ToString();141 UpdateExecutionTimeTextBox(); 142 142 } 143 143 } … … 151 151 stopButton.Enabled = false; 152 152 resetButton.Enabled = true; 153 executionTimeTextBox.Text = Engine.ExecutionTime.ToString();153 UpdateExecutionTimeTextBox(); 154 154 } 155 155 } 156 156 private void Engine_ExecutionTimeChanged(object sender, EventArgs e) { 157 157 executionTimeCounter++; 158 if ((executionTimeCounter == 100 0) || !Engine.Running) {158 if ((executionTimeCounter == 100) || !Engine.Running) { 159 159 executionTimeCounter = 0; 160 if (InvokeRequired) 161 Invoke(new EventHandler(Engine_ExecutionTimeChanged), sender, e); 162 else 163 executionTimeTextBox.Text = Engine.ExecutionTime.ToString(); 160 UpdateExecutionTimeTextBox(); 164 161 } 165 162 } … … 183 180 } 184 181 #endregion 182 183 #region Helpers 184 private void UpdateExecutionTimeTextBox() { 185 if (InvokeRequired) 186 Invoke(new Action(UpdateExecutionTimeTextBox)); 187 else 188 executionTimeTextBox.Text = Engine.ExecutionTime.ToString(); 189 } 190 #endregion 185 191 } 186 192 }
Note: See TracChangeset
for help on using the changeset viewer.