Changeset 2932 for trunk/sources/HeuristicLab.Parameters
- Timestamp:
- 03/05/10 03:07:12 (15 years ago)
- Location:
- trunk/sources/HeuristicLab.Parameters/3.3
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified trunk/sources/HeuristicLab.Parameters/3.3/LookupParameter.cs ¶
r2852 r2932 156 156 if (ActualNameChanged != null) 157 157 ActualNameChanged(this, EventArgs.Empty); 158 On Changed();158 OnToStringChanged(); 159 159 } 160 160 -
TabularUnified trunk/sources/HeuristicLab.Parameters/3.3/OptionalConstrainedValueParameter.cs ¶
r2924 r2932 50 50 if (value != this.value) { 51 51 if ((value != null) && !validValues.Contains(value)) throw new ArgumentException("Invalid value."); 52 if (this.value != null) this.value.ToStringChanged -= new EventHandler(Value_ToStringChanged); 52 53 this.value = value; 54 if (this.value != null) this.value.ToStringChanged += new EventHandler(Value_ToStringChanged); 53 55 OnValueChanged(); 54 56 } 55 57 } 56 58 } 59 57 60 IItem IValueParameter.Value { 58 61 get { return Value; } … … 121 124 if (ValueChanged != null) 122 125 ValueChanged(this, EventArgs.Empty); 123 On Changed();126 OnToStringChanged(); 124 127 } 125 128 … … 129 132 validValues.ItemsRemoved += new CollectionItemsChangedEventHandler<T>(ValidValues_ItemsRemoved); 130 133 validValues.CollectionReset += new CollectionItemsChangedEventHandler<T>(ValidValues_CollectionReset); 131 validValues.Changed += new ChangedEventHandler(ValidValues_Changed);132 134 } 133 135 } … … 138 140 validValues.ItemsRemoved -= new CollectionItemsChangedEventHandler<T>(ValidValues_ItemsRemoved); 139 141 validValues.CollectionReset -= new CollectionItemsChangedEventHandler<T>(ValidValues_CollectionReset); 140 validValues.Changed -= new ChangedEventHandler(ValidValues_Changed);141 142 } 142 143 } … … 149 150 if ((Value != null) && !validValues.Contains(Value)) Value = null; 150 151 } 151 protected virtual void Val idValues_Changed(object sender, ChangedEventArgs e) {152 On Changed(e);152 protected virtual void Value_ToStringChanged(object sender, EventArgs e) { 153 OnToStringChanged(); 153 154 } 154 155 } -
TabularUnified trunk/sources/HeuristicLab.Parameters/3.3/OptionalValueParameter.cs ¶
r2924 r2932 37 37 set { 38 38 if (value != this.value) { 39 if (this.value != null) this.value. Changed -= new ChangedEventHandler(Value_Changed);39 if (this.value != null) this.value.ToStringChanged -= new EventHandler(Value_ToStringChanged); 40 40 this.value = value; 41 if (this.value != null) this.value. Changed += new ChangedEventHandler(Value_Changed);41 if (this.value != null) this.value.ToStringChanged += new EventHandler(Value_ToStringChanged); 42 42 OnValueChanged(); 43 43 } … … 96 96 if (ValueChanged != null) 97 97 ValueChanged(this, EventArgs.Empty); 98 On Changed();98 OnToStringChanged(); 99 99 } 100 private void Value_ Changed(object sender, ChangedEventArgs e) {101 On Changed(e);100 private void Value_ToStringChanged(object sender, EventArgs e) { 101 OnToStringChanged(); 102 102 } 103 103 } -
TabularUnified trunk/sources/HeuristicLab.Parameters/3.3/ValueLookupParameter.cs ¶
r2852 r2932 37 37 set { 38 38 if (value != this.value) { 39 if (this.value != null) this.value. Changed -= new ChangedEventHandler(Value_Changed);39 if (this.value != null) this.value.ToStringChanged -= new EventHandler(Value_ToStringChanged); 40 40 this.value = value; 41 if (this.value != null) this.value. Changed += new ChangedEventHandler(Value_Changed);41 if (this.value != null) this.value.ToStringChanged += new EventHandler(Value_ToStringChanged); 42 42 OnValueChanged(); 43 43 } … … 89 89 if (ValueChanged != null) 90 90 ValueChanged(this, EventArgs.Empty); 91 On Changed();91 OnToStringChanged(); 92 92 } 93 private void Value_ Changed(object sender, ChangedEventArgs e) {94 On Changed(e);93 private void Value_ToStringChanged(object sender, EventArgs e) { 94 OnToStringChanged(); 95 95 } 96 96 }
Note: See TracChangeset
for help on using the changeset viewer.