/// <summary> /// Creates a createTestHistoryUndoEvent for undo entity. /// </summary> /// <param name="testObject">Entity from undo stack.</param> private void createTestHistoryUndoEvent(TestChangeEvent entity) { // If client event handler defined... if (OnTestHistoryUndoEvent != null) { OnTestHistoryUndoEvent(entity); } }
public void Redo() { if (m_redoStack.Count > 0) { TestChangeEvent changeEvent = m_redoStack.Pop(); createTestHistoryRedoEvent(changeEvent); m_undoStack.Push(changeEvent); } }
public void Undo() { TestChangeEvent changeEvent = null; if (m_undoStack.Count > 0) { changeEvent = m_undoStack.Pop(); Debug.WriteLine("Undo event popped: " + changeEvent.ToString()); createTestHistoryUndoEvent(changeEvent); m_redoStack.Push(changeEvent); } }
public void RecordEvent(TestChangeEvent changeEvent) { Debug.WriteLine("Event recorded: " + changeEvent.ToString()); m_undoStack.Push(changeEvent); }