UMD.HCIL.Piccolo.PNode.FirePropertyChangedEvent C# (CSharp) Method

FirePropertyChangedEvent() protected method

Raise the given property change event.
protected FirePropertyChangedEvent ( object propertyKey, int propertyCode, Object oldValue, Object newValue ) : void
propertyKey object The key associated with the property that changed.
propertyCode int The code that identifies the property that changed.
oldValue Object The old value of the property.
newValue Object The new value of the property.
return void
		protected virtual void FirePropertyChangedEvent(object propertyKey, int propertyCode, Object oldValue, Object newValue) {
			PPropertyEventArgs e = null;

			// Fire the event to handlers registered for this particular property change event.
			PPropertyEventHandler h = GetPropertyHandlers(propertyKey);
			if (h != null) {
				e = new PPropertyEventArgs(oldValue, newValue);
				h(this, e);
			}

			if (parent != null && (propertyCode & propertyChangeParentMask) != 0) {
				if (e == null) e = new PPropertyEventArgs(oldValue, newValue);
				parent.FireChildPropertyChangedEvent(e, propertyKey, propertyCode);
			}
		}