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()); } }
public UndoActionEventArgs(UndoAction action, UndoActionEvent actionEvent) { Action = action; Event = actionEvent; }