Exemplo n.º 1
0
 public void RemoveEventListener(string type, FageEventHandler func)
 {
     if (event_hash.ContainsKey (type)) {
         FageEventHandler handler = event_hash [type] as FageEventHandler;
         handler -= func;
         event_hash [type] = handler;
     }
 }
Exemplo n.º 2
0
 public void RemoveEventListener(string type, FageEventHandler func)
 {
     if (event_hash.ContainsKey(type))
     {
         FageEventHandler handler = event_hash [type] as FageEventHandler;
         handler          -= func;
         event_hash [type] = handler;
     }
 }
Exemplo n.º 3
0
 public void DispatchEvent(FageEvent fevent)
 {
     if ((fevent != null) && event_hash.ContainsKey(fevent.type))
     {
         FageEventHandler handler = event_hash [fevent.type] as FageEventHandler;
         if (handler != null)
         {
             handler(fevent);
         }
     }
 }
Exemplo n.º 4
0
 public void AddEventListener(string type, FageEventHandler func)
 {
     if (event_hash.ContainsKey (type)) {
         FageEventHandler handler = event_hash [type] as FageEventHandler;
         handler += func;
         event_hash [type] = handler;
     } else {
         dummy += func;
         FageEventHandler handler = dummy.Clone() as FageEventHandler;
         dummy -= func;
         event_hash.Add (type, handler);
     }
 }
Exemplo n.º 5
0
 public void AddEventListener(string type, FageEventHandler func)
 {
     if (event_hash.ContainsKey(type))
     {
         FageEventHandler handler = event_hash [type] as FageEventHandler;
         handler          += func;
         event_hash [type] = handler;
     }
     else
     {
         dummy += func;
         FageEventHandler handler = dummy.Clone() as FageEventHandler;
         dummy -= func;
         event_hash.Add(type, handler);
     }
 }