public virtual void EventDispatcher_TextRender(EventData eventData) { TextEventData e = eventData as TextEventData; if (e.ID.Equals(this.ID)) //use the ID to send event to a particular controller based on controller ID { Set(e.Text, e.Font, e.TextColor, e.BackgroundColor); } }
//add GetHashCode and Equals public override bool Equals(object obj) { TextEventData other = obj as TextEventData; return(base.Equals(obj) && this.text.Equals(other.Text) && this.font.Equals(other.Font) && this.textColor == other.TextColor); }