public static void PublishEvent(WTEvent.Type t, WTEvent e)
 {
     WTLogger.LogEvent(t, e);
     if (handlerDict.ContainsKey(t))
     {
         foreach (EventHandler handle in handlerDict[t])
         {
             handle(e);
         }
     }
 }
 public static void RegisterEventHandler(WTEvent.Type e, EventHandler handler)
 {
     if (!handlerDict.ContainsKey(e))
     {
         List <EventHandler> handlers = new List <EventHandler>();
         handlers.Add(handler);
         handlerDict.Add(e, handlers);
     }
     else
     {
         handlerDict[e].Add(handler);
     }
 }
 public static void LogEvent(WTEvent.Type t, WTEvent e)
 {
     Log(Type.EVENT, "Event: " + t + " Published: \r\n" + e.detail);
 }
Exemple #4
0
 public WTTexture(string service, WTEvent.Type updateEvent) : base(service, 0)
 {
     this.updateEvent = updateEvent;
 }