Example #1
0
 public void RemoveAction(object tag, Event actObject)
 {
     Actions.ActionElement element = (Actions.ActionElement)actions.Get(actObject);
     if (element != null)
     {
         if (element.actions != null)
         {
             int limit = element.actions.Count;
             for (int i = 0; i < limit; i++)
             {
                 ActionEvent a = (ActionEvent)element.actions[i];
                 if (a.GetTag() == tag && a.GetOriginal() == actObject)
                 {
                     RemoveAction(i, element);
                 }
             }
         }
     }
 }
Example #2
0
 public ActionEvent GetAction(object tag, Event actObject)
 {
     Actions.ActionElement element = (Actions.ActionElement)actions.Get(actObject);
     if (element != null)
     {
         if (element.actions != null)
         {
             int limit = element.actions.Count;
             for (int i = 0; i < limit; i++)
             {
                 ActionEvent a = (ActionEvent)element.actions[i];
                 if (a.GetTag() == tag)
                 {
                     return(a);
                 }
             }
         }
     }
     return(null);
 }