public override void RemoveEventListener(string eventType, Core.Events.EventHandler handler, Core.Events.EventPhase phases) { base.RemoveEventListener(eventType, handler, phases); // if no one's listening to us for this event any more, let's // remove our underlying event listener from the dataGroup. if (eventType == RendererExistenceEvent.RENDERER_ADD && null != DataGroup) { if (!HasEventListener(RendererExistenceEvent.RENDERER_ADD)) { DataGroup.RemoveEventListener(RendererExistenceEvent.RENDERER_ADD, DispatchEvent); } } if (eventType == RendererExistenceEvent.RENDERER_REMOVE && null != DataGroup) { if (!HasEventListener(RendererExistenceEvent.RENDERER_REMOVE)) { DataGroup.RemoveEventListener(RendererExistenceEvent.RENDERER_REMOVE, DispatchEvent); } } }
public override void AddEventListener(string eventType, Core.Events.EventHandler handler, Core.Events.EventPhase phases, int priority) { base.AddEventListener(eventType, handler, phases, priority); if (eventType == RendererExistenceEvent.RENDERER_ADD && null != DataGroup) { DataGroup.AddEventListener(RendererExistenceEvent.RENDERER_ADD, DispatchEvent); } if (eventType == RendererExistenceEvent.RENDERER_REMOVE && null != DataGroup) { DataGroup.AddEventListener(RendererExistenceEvent.RENDERER_REMOVE, DispatchEvent); } }