コード例 #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);
        }
コード例 #2
0
 public void addSubAction(ShowPropSubAction subAction)
 {
     subAction._setShowProp(this);
     sequencer.addAction(subAction);
     if (ActionAdded != null)
     {
         ActionAdded.Invoke(this, subAction);
     }
 }
コード例 #3
0
ファイル: Timeline.cs プロジェクト: AnomalousMedical/Medical
 public void addAction(TimelineAction action)
 {
     action._setTimeline(this);
     sequencer.addAction(action);
     if (ActionAdded != null)
     {
         ActionAdded.Invoke(this, new TimelineActionEventArgs(action, sequencer.indexOf(action)));
     }
 }
コード例 #4
0
 public static void AddAction(AutomateAction action)
 {
     actions.Add(action.Name, action);
     ActionAdded?.Invoke();
 }
コード例 #5
0
 protected virtual void OnActionAdded(IHistoryAction <TAction, TSender, TState> historyAction)
 => ActionAdded?.Invoke(this, historyAction);
コード例 #6
0
        public void InsertAction(int algorithmNumber, Action action, int index)
        {
            algorithms[algorithmNumber].actions.Insert(index, action);

            ActionAdded?.Invoke(this, new AddActionEventArgs());
        }
コード例 #7
0
        public void AddAction(int algorithmNumber, Action action)
        {
            algorithms[algorithmNumber].actions.Add(action);

            ActionAdded?.Invoke(this, new AddActionEventArgs());
        }