public virtual void EventOccurred(IEventData data, EventType type) { if (type.Equals(EventType.RENDER_TEXT)) { TextRenderInfo textRenderInfo = (TextRenderInfo)data; foreach (TextRenderInfo glyphRenderInfo in textRenderInfo.GetCharacterRenderInfos()) { delegate_.EventOccurred(glyphRenderInfo, type); } } else { delegate_.EventOccurred(data, type); } }
public virtual void EventOccurred(IEventData data, EventType type) { for (int i = 0; i < delegates.Count; i++) { IEventListener delegate_ = delegates[i]; bool filtersPassed = delegate_.GetSupportedEvents() == null || delegate_.GetSupportedEvents().Contains(type ); foreach (IEventFilter filter in filters[i]) { if (!filter.Accept(data, type)) { filtersPassed = false; break; } } if (filtersPassed) { delegate_.EventOccurred(data, type); } } }