Esempio n. 1
0
        void AddEntry(ClientAction e)
        {
            bool found = false;

            for (int i = 0; i < m_entries.Count; ++i)
            {
                Entry entry = m_entries[i];

                if (entry.ClientID == e.ClientID && entry.Action == e.Action)
                {
                    m_entries[i].ChangeCreationTime(e.CreationTime);
                    found = true;
                    break;
                }
            }


            if (found)
            {
                ActionRemoved?.Invoke(e.ClientID, e.Action);
            }
            else
            {
                m_entries.Add(new Entry(e.ClientID, e.Action, e.CreationTime));
            }

            ActionAdded.Invoke(e);
        }
Esempio n. 2
0
 public void removeSubAction(ShowPropSubAction subAction)
 {
     sequencer.removeAction(subAction);
     subAction._setShowProp(null);
     if (ActionRemoved != null)
     {
         ActionRemoved.Invoke(this, subAction);
     }
 }
Esempio n. 3
0
 public void removeAction(TimelineAction action)
 {
     action._setTimeline(null);
     sequencer.removeAction(action);
     if (ActionRemoved != null)
     {
         ActionRemoved.Invoke(this, new TimelineActionEventArgs(action, 0));
     }
 }
Esempio n. 4
0
        void RemoveAction(TickTimerCancelToken token)
        {
            HashSet <TickTimerCancelToken> actions;

            if (_delays.TryGetValue(token.Timeout, out actions))
            {
                if (actions.Remove(token))
                {
                    if (actions.Count == 0)
                    {
                        _delays.Remove(token.Timeout);
                    }
                    ActionRemoved?.Invoke();
                }
            }
        }
Esempio n. 5
0
 public void When(ActionRemoved e)
 {
     Actions[e.Action].EnsureCleanRemoval();
     Actions.Remove(e.Action);
 }
Esempio n. 6
0
        public void DeleteAction(int algorithmNumber, int actionNumber)
        {
            algorithms[algorithmNumber].actions.RemoveAt(actionNumber);

            ActionRemoved?.Invoke(this, new RemoveActionEventArgs());
        }