Changeset 11345 for trunk/sources/HeuristicLab.Optimization
- Timestamp:
- 09/05/14 10:38:42 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Optimization/3.3/RunCollection.cs
r11344 r11345 237 237 IObservableDictionary<string, IItem> dict = run.Parameters; 238 238 dict.ItemsAdded += RunOnParameterChanged; 239 dict.ItemsRemoved += RunOnParameter Changed;239 dict.ItemsRemoved += RunOnParameterRemoved; 240 240 dict.ItemsReplaced += RunOnParameterChanged; 241 241 dict.CollectionReset += RunOnParameterChanged; … … 245 245 IObservableDictionary<string, IItem> dict = run.Results; 246 246 dict.ItemsAdded += RunOnResultChanged; 247 dict.ItemsRemoved += RunOnResult Changed;247 dict.ItemsRemoved += RunOnResultRemoved; 248 248 dict.ItemsReplaced += RunOnResultChanged; 249 249 dict.CollectionReset += RunOnResultChanged; … … 253 253 IObservableDictionary<string, IItem> dict = run.Parameters; 254 254 dict.ItemsAdded -= RunOnParameterChanged; 255 dict.ItemsRemoved -= RunOnParameter Changed;255 dict.ItemsRemoved -= RunOnParameterRemoved; 256 256 dict.ItemsReplaced -= RunOnParameterChanged; 257 257 dict.CollectionReset -= RunOnParameterChanged; … … 261 261 IObservableDictionary<string, IItem> dict = run.Results; 262 262 dict.ItemsAdded -= RunOnResultChanged; 263 dict.ItemsRemoved -= RunOnResult Changed;263 dict.ItemsRemoved -= RunOnResultRemoved; 264 264 dict.ItemsReplaced -= RunOnResultChanged; 265 265 dict.CollectionReset -= RunOnResultChanged; … … 280 280 } 281 281 282 private void RunOnParameterRemoved(object sender, CollectionItemsChangedEventArgs<KeyValuePair<string, IItem>> e) { 283 bool columnsChanged = false; 284 foreach (var param in e.Items) 285 columnsChanged |= RemoveParameterName(param.Key); 286 if (columnsChanged) columnNameCache = null; 287 OnReset(); 288 if (columnsChanged) { 289 OnColumnsChanged(); 290 OnColumnNamesChanged(); 291 } 292 } 293 282 294 private void RunOnResultChanged(object sender, CollectionItemsChangedEventArgs<KeyValuePair<string, IItem>> e) { 283 295 bool columnsChanged = false; … … 285 297 columnsChanged |= AddResult(result.Key, result.Value); 286 298 foreach (var result in e.OldItems) 299 columnsChanged |= RemoveResultName(result.Key); 300 if (columnsChanged) columnNameCache = null; 301 OnReset(); 302 if (columnsChanged) { 303 OnColumnsChanged(); 304 OnColumnNamesChanged(); 305 } 306 } 307 308 private void RunOnResultRemoved(object sender, CollectionItemsChangedEventArgs<KeyValuePair<string, IItem>> e) { 309 bool columnsChanged = false; 310 foreach (var result in e.Items) 287 311 columnsChanged |= RemoveResultName(result.Key); 288 312 if (columnsChanged) columnNameCache = null;
Note: See TracChangeset
for help on using the changeset viewer.