Changeset 5206 for trunk/sources/HeuristicLab.Parameters
- Timestamp:
- 01/04/11 02:09:55 (14 years ago)
- Location:
- trunk/sources/HeuristicLab.Parameters/3.3
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Parameters/3.3/OptionalConstrainedValueParameter.cs
r4722 r5206 54 54 if (value != this.value) { 55 55 if ((value != null) && !validValues.Contains(value)) throw new ArgumentException("Invalid value."); 56 OnValueChanging(); 56 57 DeregisterValueEvents(); 57 58 this.value = value; … … 205 206 } 206 207 208 public event EventHandler ValueChanging; 209 protected virtual void OnValueChanging() { 210 EventHandler handler = ValueChanging; 211 if (handler != null) handler(this, EventArgs.Empty); 212 } 207 213 public event EventHandler ValueChanged; 208 214 protected virtual void OnValueChanged() { -
trunk/sources/HeuristicLab.Parameters/3.3/OptionalValueParameter.cs
r4825 r5206 46 46 set { 47 47 if (value != this.value) { 48 OnValueChanging(); 48 49 DeregisterValueEvents(); 49 50 this.value = value; … … 187 188 ((IValueParameter)this).Value = value; 188 189 } 189 190 191 public event EventHandler ValueChanging; 192 protected virtual void OnValueChanging() { 193 EventHandler handler = ValueChanging; 194 if (handler != null) handler(this, EventArgs.Empty); 195 } 190 196 public event EventHandler ValueChanged; 191 197 protected virtual void OnValueChanged() { -
trunk/sources/HeuristicLab.Parameters/3.3/ValueLookupParameter.cs
r4722 r5206 46 46 set { 47 47 if (value != this.value) { 48 OnValueChanging(); 48 49 DeregisterValueEvents(); 49 50 this.value = value; … … 159 160 } 160 161 162 public event EventHandler ValueChanging; 163 protected virtual void OnValueChanging() { 164 EventHandler handler = ValueChanging; 165 if (handler != null) handler(this, EventArgs.Empty); 166 } 161 167 public event EventHandler ValueChanged; 162 168 protected virtual void OnValueChanged() {
Note: See TracChangeset
for help on using the changeset viewer.