Example #1
0
 public void AddAction(UndoAction action)
 {
     if (m_actions.Count - 1 > CurrentActionIndex && CurrentActionIndex >= 0)
     {
         m_actions.RemoveRange(CurrentActionIndex + 1, m_actions.Count - (CurrentActionIndex + 1));
     }
     m_actions.Add(action);
     CurrentActionIndex = m_actions.Count - 1;
     if (ActionOccurred != null)
     {
         ActionOccurred(this, new EventArgs());
     }
 }
Example #2
0
 public UndoActionEventArgs(UndoAction action, UndoActionEvent actionEvent)
 {
     Action = action;
     Event  = actionEvent;
 }