Exemplo n.º 1
0
 public void AddListener(Object owner, ComponentListenerDelegate d)
 {
     lock (Owners) {
         List <ComponentListenerDelegate> group = null;
         if (owner != null)
         {
             Owners.TryGetValue(owner, out group);
         }
         if (group == null)
         {
             group = new List <ComponentListenerDelegate>();
             Owners.TryAdd(owner, group);
         }
         group.Add(d);
     }
 }
Exemplo n.º 2
0
 public void RemoveListener(Object owner, ComponentListenerDelegate d)
 {
     lock (Owners) {
         List <ComponentListenerDelegate> group = null;
         if (owner != null)
         {
             Owners.TryGetValue(owner, out group);
             if (group != null)
             {
                 group.Remove(d);
                 if (group.Count == 0)
                 {
                     Owners.TryRemove(owner, out group);
                 }
             }
         }
     }
 }
Exemplo n.º 3
0
 public void AddListener(Object owner, ComponentListenerDelegate d)
 {
     ComponentListeners.AddListener(owner, d);
 }
Exemplo n.º 4
0
 public void RemoveListener(Object owner, ComponentListenerDelegate d)
 {
     ManagerListeners.RemoveListener(owner, d);
 }