示例#1
0
 /// <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);
     }
 }
示例#2
0
        public void Redo()
        {
            if (m_redoStack.Count > 0)
            {
                TestChangeEvent changeEvent = m_redoStack.Pop();

                createTestHistoryRedoEvent(changeEvent);

                m_undoStack.Push(changeEvent);
            }
        }
示例#3
0
        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);
            }
        }
示例#4
0
        public void RecordEvent(TestChangeEvent changeEvent)
        {
            Debug.WriteLine("Event recorded:  " + changeEvent.ToString());

            m_undoStack.Push(changeEvent);
        }