Changeset 9352 for branches/LearningClassifierSystems/HeuristicLab.Problems.ConditionActionClassification
- Timestamp:
- 04/10/13 15:15:13 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/LearningClassifierSystems/HeuristicLab.Problems.ConditionActionClassification/3.3/ConditionActionClassificationProblemData.cs
r9226 r9352 23 23 using System.Collections.Generic; 24 24 using System.Linq; 25 using HeuristicLab.Collections; 25 26 using HeuristicLab.Common; 26 27 using HeuristicLab.Core; … … 109 110 #endregion 110 111 112 [StorableHook(HookType.AfterDeserialization)] 113 private void AfterDeserialization() { 114 RegisterParameterEvents(); 115 } 111 116 [StorableConstructor] 112 117 protected ConditionActionClassificationProblemData(bool deserializing) : base(deserializing) { } 113 118 protected ConditionActionClassificationProblemData(ConditionActionClassificationProblemData original, Cloner cloner) 114 119 : base(original, cloner) { 120 RegisterParameterEvents(); 115 121 } 116 122 … … 144 150 145 151 ((ValueParameter<Dataset>)DatasetParameter).ReactOnValueToStringChangedAndValueItemImageChanged = false; 152 153 RegisterParameterEvents(); 146 154 } 147 155 … … 167 175 168 176 protected IDictionary<int, IInput> fetchInputCache = new Dictionary<int, IInput>(); 177 178 #region events 179 private void RegisterParameterEvents() { 180 ConditionVariablesParameter.ValueChanged += new EventHandler(VariablesChanged); 181 ConditionVariablesParameter.Value.CheckedItemsChanged += new CollectionItemsChangedEventHandler<IndexedItem<StringValue>>(VariablesChanged); 182 ActionVariablesParameter.ValueChanged += new EventHandler(VariablesChanged); 183 ActionVariablesParameter.Value.CheckedItemsChanged += new CollectionItemsChangedEventHandler<IndexedItem<StringValue>>(VariablesChanged); 184 } 185 private void DeregisterParameterEvents() { 186 ActionVariablesParameter.Value.CheckedItemsChanged += new CollectionItemsChangedEventHandler<IndexedItem<StringValue>>(VariablesChanged); 187 ActionVariablesParameter.ValueChanged += new EventHandler(VariablesChanged); 188 ConditionVariablesParameter.Value.CheckedItemsChanged += new CollectionItemsChangedEventHandler<IndexedItem<StringValue>>(VariablesChanged); 189 ConditionVariablesParameter.ValueChanged += new EventHandler(VariablesChanged); 190 } 191 private void Value_CheckedItemsChanged(object sender, CollectionItemsChangedEventArgs<IndexedItem<StringValue>> e) { 192 ActionConditionVariablesChanged(); 193 } 194 private void VariablesChanged(object sender, EventArgs e) { 195 ActionConditionVariablesChanged(); 196 } 197 198 protected abstract void ActionConditionVariablesChanged(); 199 #endregion 169 200 } 170 201 }
Note: See TracChangeset
for help on using the changeset viewer.