Changeset 8535 for branches/ParameterConfigurationEncoding/HeuristicLab.Encodings.ParameterConfigurationEncoding/3.3/ValueConfigurations/RangeValueConfiguration.cs
- Timestamp:
- 08/29/12 09:22:21 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/ParameterConfigurationEncoding/HeuristicLab.Encodings.ParameterConfigurationEncoding/3.3/ValueConfigurations/RangeValueConfiguration.cs
r8517 r8535 46 46 [StorableConstructor] 47 47 protected RangeValueConfiguration(bool deserializing) : base(deserializing) { } 48 public RangeValueConfiguration() {49 50 }51 48 protected RangeValueConfiguration(RangeValueConfiguration original, Cloner cloner) 52 49 : base(original, cloner) { … … 54 51 RegisterRangeConstraintEvents(); 55 52 } 53 public RangeValueConfiguration() : base() { } 56 54 public RangeValueConfiguration(IItem value, Type valueDataType) 57 55 : base(value, valueDataType) { … … 68 66 } 69 67 } 70 public override IDeepCloneable Clone(Cloner cloner) {71 return new RangeValueConfiguration(this, cloner);72 }73 68 [StorableHook(HookType.AfterDeserialization)] 74 69 private void AfterDeserialization() { 75 70 RegisterRangeConstraintEvents(); 76 71 } 72 public override IDeepCloneable Clone(Cloner cloner) { 73 return new RangeValueConfiguration(this, cloner); 74 } 77 75 #endregion 78 76 79 77 private void RegisterRangeConstraintEvents() { 80 if (this.RangeConstraint != null) this.RangeConstraint.ToStringChanged += new EventHandler(RangeConstraint_ToStringChanged); 78 if (this.RangeConstraint != null) { 79 this.RangeConstraint.ToStringChanged += new EventHandler(RangeConstraint_ToStringChanged); 80 this.RangeConstraint.LowerBoundChanged += new EventHandler(RangeConstraintParametersChanged); 81 this.RangeConstraint.UpperBoundChanged += new EventHandler(RangeConstraintParametersChanged); 82 this.RangeConstraint.StepSizeChanged += new EventHandler(RangeConstraintParametersChanged); 83 } 81 84 } 85 82 86 private void DeregisterRangeConstraintEvents() { 83 if (this.RangeConstraint != null) this.RangeConstraint.ToStringChanged -= new EventHandler(RangeConstraint_ToStringChanged); 87 if (this.RangeConstraint != null) { 88 this.RangeConstraint.ToStringChanged -= new EventHandler(RangeConstraint_ToStringChanged); 89 this.RangeConstraint.LowerBoundChanged -= new EventHandler(RangeConstraintParametersChanged); 90 this.RangeConstraint.UpperBoundChanged -= new EventHandler(RangeConstraintParametersChanged); 91 this.RangeConstraint.StepSizeChanged -= new EventHandler(RangeConstraintParametersChanged); 92 } 84 93 } 85 94 … … 119 128 OnToStringChanged(); 120 129 } 130 private void RangeConstraintParametersChanged(object sender, EventArgs e) { 131 OnCombinationsCountChanged(); 132 } 121 133 #endregion 122 134 }
Note: See TracChangeset
for help on using the changeset viewer.