Changeset 11368
- Timestamp:
- 09/15/14 17:19:36 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/StatisticalTesting/HeuristicLab.Analysis.Statistics/3.3/SampleSizeInfluenceView.cs
r10017 r11368 25 25 using System.Windows.Forms; 26 26 using System.Windows.Forms.DataVisualization.Charting; 27 using HeuristicLab.Collections; 27 28 using HeuristicLab.Common; 28 29 using HeuristicLab.Core; … … 93 94 94 95 protected virtual void RegisterRunEvents(IEnumerable<IRun> runs) { 95 foreach (IRun run in runs) 96 run.Changed += new EventHandler(run_Changed); 97 } 96 foreach (IRun run in runs) { 97 RegisterRunParametersEvents(run); 98 RegisterRunResultsEvents(run); 99 } 100 } 101 98 102 protected virtual void DeregisterRunEvents(IEnumerable<IRun> runs) { 99 foreach (IRun run in runs) 100 run.Changed -= new EventHandler(run_Changed); 103 foreach (IRun run in runs) { 104 DeregisterRunParametersEvents(run); 105 DeregisterRunResultsEvents(run); 106 } 107 } 108 109 private void RegisterRunParametersEvents(IRun run) { 110 IObservableDictionary<string, IItem> dict = run.Parameters; 111 dict.ItemsAdded += run_Changed; 112 dict.ItemsRemoved += run_Changed; 113 dict.ItemsReplaced += run_Changed; 114 dict.CollectionReset += run_Changed; 115 } 116 117 private void RegisterRunResultsEvents(IRun run) { 118 IObservableDictionary<string, IItem> dict = run.Results; 119 dict.ItemsAdded += run_Changed; 120 dict.ItemsRemoved += run_Changed; 121 dict.ItemsReplaced += run_Changed; 122 dict.CollectionReset += run_Changed; 123 } 124 125 private void DeregisterRunParametersEvents(IRun run) { 126 IObservableDictionary<string, IItem> dict = run.Parameters; 127 dict.ItemsAdded -= run_Changed; 128 dict.ItemsRemoved -= run_Changed; 129 dict.ItemsReplaced -= run_Changed; 130 dict.CollectionReset -= run_Changed; 131 } 132 133 private void DeregisterRunResultsEvents(IRun run) { 134 IObservableDictionary<string, IItem> dict = run.Results; 135 dict.ItemsAdded -= run_Changed; 136 dict.ItemsRemoved -= run_Changed; 137 dict.ItemsReplaced -= run_Changed; 138 dict.CollectionReset -= run_Changed; 101 139 } 102 140
Note: See TracChangeset
for help on using the changeset viewer.