29 string OldName = _Name;
30 OnBeforeNameChanged(OldName, value);
31 BeforeNameChange(OldName, value);
33 AfterNameChange(OldName, value);
34 OnAfterNameChanged(OldName, value);
51 private void OnAfterNameChanged(
string OldName,String NewName)
53 if (AfterNameChanged != null)
59 private void OnBeforeNameChanged(
string OldName, String NewName)
61 if (BeforeNameChanged != null)
63 BeforeNameChanged(
this,
new NameChangeEventArgs(OldName, NewName));
82 if (PropertyChanged != null)
84 PropertyChanged(
this,
new PropertyChangedEventArgs(propertyName));
93 if (PropertyChanging != null)
95 PropertyChanging(
this,
new PropertyChangingEventArgs(propertyName));
Abstract base class for named items. Implements the name property and the necessary events...
PropertyChangingEventHandler PropertyChanging
virtual void OnPropertyChanging(string propertyName)
EventHandler< NameChangeEventArgs > BeforeNameChanged
Event is fired before the value of the property Name is changed.
virtual void OnPropertyChanged(string propertyName)
EventHandler< NameChangeEventArgs > AfterNameChanged
Event is fired after the value of the property Name has changed.
Interface for items which can be added the the NamedItemList.
PropertyChangedEventHandler PropertyChanged
virtual void AfterNameChange(string OldName, string NewName)
virtual void BeforeNameChange(string OldName, string NewName)
EventArgs for name change events.