Changeset 2932 for trunk/sources/HeuristicLab.Optimization
- Timestamp:
- 03/05/10 03:07:12 (15 years ago)
- Location:
- trunk/sources/HeuristicLab.Optimization/3.3
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Optimization/3.3/Algorithm.cs
r2882 r2932 112 112 if (ProblemChanged != null) 113 113 ProblemChanged(this, EventArgs.Empty); 114 OnChanged();115 114 } 116 115 public event EventHandler ExecutionTimeChanged; … … 118 117 if (ExecutionTimeChanged != null) 119 118 ExecutionTimeChanged(this, EventArgs.Empty); 120 OnChanged();121 119 } 122 120 public event EventHandler Prepared; … … 124 122 if (Prepared != null) 125 123 Prepared(this, EventArgs.Empty); 126 OnChanged();127 124 } 128 125 public event EventHandler Started; … … 130 127 if (Started != null) 131 128 Started(this, EventArgs.Empty); 132 OnChanged();133 129 } 134 130 public event EventHandler Stopped; … … 136 132 if (Stopped != null) 137 133 Stopped(this, EventArgs.Empty); 138 OnChanged();139 134 } 140 135 protected virtual void OnCanceledChanged() { } … … 147 142 problem.SolutionCreatorChanged -= new EventHandler(Problem_SolutionCreatorChanged); 148 143 problem.EvaluatorChanged -= new EventHandler(Problem_EvaluatorChanged); 149 problem.Changed -= new ChangedEventHandler(Problem_Changed);150 144 } 151 145 protected virtual void RegisterProblemEvents() { 152 146 problem.SolutionCreatorChanged += new EventHandler(Problem_SolutionCreatorChanged); 153 147 problem.EvaluatorChanged += new EventHandler(Problem_EvaluatorChanged); 154 problem.Changed += new ChangedEventHandler(Problem_Changed);155 148 } 156 149 157 150 protected virtual void Problem_SolutionCreatorChanged(object sender, EventArgs e) { } 158 151 protected virtual void Problem_EvaluatorChanged(object sender, EventArgs e) { } 159 private void Problem_Changed(object sender, ChangedEventArgs e) {160 OnChanged(e);161 }162 152 #endregion 163 153 } -
trunk/sources/HeuristicLab.Optimization/3.3/EngineAlgorithm.cs
r2924 r2932 195 195 if (EngineChanged != null) 196 196 EngineChanged(this, EventArgs.Empty); 197 OnChanged();198 197 } 199 198 … … 202 201 } 203 202 private void RegisterEngineEvents() { 204 Engine.Changed += new ChangedEventHandler(Engine_Changed);205 203 Engine.ExceptionOccurred += new EventHandler<EventArgs<Exception>>(Engine_ExceptionOccurred); 206 204 Engine.ExecutionTimeChanged += new EventHandler(Engine_ExecutionTimeChanged); … … 208 206 } 209 207 private void DeregisterEngineEvents() { 210 Engine.Changed -= new ChangedEventHandler(Engine_Changed);211 208 Engine.ExceptionOccurred -= new EventHandler<EventArgs<Exception>>(Engine_ExceptionOccurred); 212 209 Engine.ExecutionTimeChanged -= new EventHandler(Engine_ExecutionTimeChanged); … … 223 220 OnStopped(); 224 221 } 225 private void Engine_Changed(object sender, ChangedEventArgs e) {226 OnChanged(e);227 }228 222 } 229 223 }
Note: See TracChangeset
for help on using the changeset viewer.