public void RegisterCallback(EventEnum nEventID, PgEventHandler handler) { List <PgEventHandler> events; if (!mhtEvent.TryGetValue(nEventID, out events)) { events = new List <PgEventHandler>(); mhtEvent.Add(nEventID, events); } events.Add(handler); }
public void UnRegisterCallback(EventEnum nEventID, PgEventHandler handler) { List <PgEventHandler> events; if (!mhtEvent.TryGetValue(nEventID, out events)) { return; } if (events.Contains(handler)) { events.Remove(handler); } }