Changeset 3226 for trunk/sources/HeuristicLab.Core/3.3
- Timestamp:
- 03/28/10 04:11:23 (14 years ago)
- Location:
- trunk/sources/HeuristicLab.Core/3.3
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Core/3.3/Engine.cs
r3017 r3226 75 75 public bool Running { 76 76 get { return running; } 77 private set { 78 if (running != value) { 79 running = value; 80 OnRunningChanged(); 81 } 82 } 77 83 } 78 84 … … 126 132 127 133 public void Prepare(IOperation initialOperation) { 128 Canceled = false;129 running = false;130 134 ExecutionTime = new TimeSpan(); 131 135 executionStack.Clear(); … … 138 142 /// of class <see cref="ThreadPool"/>.</remarks> 139 143 public void Start() { 140 running = true;144 Running = true; 141 145 Canceled = false; 142 146 ThreadPool.QueueUserWorkItem(new WaitCallback(Run), null); … … 146 150 /// of class <see cref="ThreadPool"/>.</remarks> 147 151 public void Step() { 148 running = true;152 Running = true; 149 153 Canceled = false; 150 154 ThreadPool.QueueUserWorkItem(new WaitCallback(RunStep), null); … … 167 171 } 168 172 ExecutionTime += DateTime.Now - start; 169 running = false;170 173 OnStopped(); 171 174 } … … 176 179 ProcessNextOperator(); 177 180 ExecutionTime += DateTime.Now - start; 178 running = false;179 181 OnStopped(); 180 182 } … … 197 199 } 198 200 /// <summary> 201 /// Occurs when the running flag changed. 202 /// </summary> 203 public event EventHandler RunningChanged; 204 /// <summary> 205 /// Fires a new <c>RunningChanged</c> event. 206 /// </summary> 207 protected virtual void OnRunningChanged() { 208 if (RunningChanged != null) 209 RunningChanged(this, EventArgs.Empty); 210 } 211 /// <summary> 199 212 /// Occurs when the execution is prepared for a new run. 200 213 /// </summary> … … 228 241 if (Stopped != null) 229 242 Stopped(this, EventArgs.Empty); 243 Canceled = false; 244 Running = false; 230 245 } 231 246 protected virtual void OnCanceledChanged() { } -
trunk/sources/HeuristicLab.Core/3.3/Interfaces/IEngine.cs
r2916 r3226 66 66 event EventHandler ExecutionTimeChanged; 67 67 /// <summary> 68 /// Occurs when the running flag was changed. 69 /// </summary> 70 event EventHandler RunningChanged; 71 /// <summary> 68 72 /// Occurs when the engine is prepared for a new run. 69 73 /// </summary>
Note: See TracChangeset
for help on using the changeset viewer.