public void AddAction(DzBoardAction docAct)
 {
     if (boardModule.EnableUndoHistoryRecording)
     {
         undoList.AddLast(docAct);
         EnsureCapacity();
     }
 }
 public void ReverseLastUndoAction()
 {
     if (reverseUndoAction.Count > 0)
     {
         boardModule.EnableUndoHistoryRecording = false;
         DzBoardAction docAction = reverseUndoAction.Pop();
         boardModule.EnableUndoHistoryRecording = true;
         docAction.InvokeRedo(boardModule);
         undoList.AddLast(docAction);
     }
 }
        public void UndoLastAction()
        {
            DzBoardAction docAction = PopUndoCommand();

            if (docAction != null)
            {
                boardModule.EnableUndoHistoryRecording = false;
                docAction.InvokeUndo(boardModule);
                boardModule.EnableUndoHistoryRecording = true;
                reverseUndoAction.Push(docAction);
            }
        }
 public DzBoardAction PopUndoCommand()
 {
     if (undoList.Count > 0)
     {
         DzBoardAction lastCmd = undoList.Last.Value;
         undoList.RemoveLast();
         return(lastCmd);
     }
     else
     {
         return(null);
     }
 }
 public void AddAction(DzBoardAction docAct)
 {
     if (boardModule.EnableUndoHistoryRecording)
     {
         undoList.AddLast(docAct);
         EnsureCapacity();
     }
 }