public void Redo()
 {
     lock (parentBoard.ParentControl)
     {
         UndoRedoBatch action = RedoList[RedoList.Count - 1];
         action.UndoRedo(parentBoard);
         action.SwitchActions();
         RedoList.RemoveAt(RedoList.Count - 1);
         UndoList.Add(action);
         parentBoard.ParentControl.UndoListChanged();
         parentBoard.ParentControl.RedoListChanged();
     }
 }
        public void AddUndoBatch(List <UndoRedoAction> actions)
        {
            if (actions.Count == 0)
            {
                return;
            }
            UndoRedoBatch batch = new UndoRedoBatch()
            {
                Actions = actions
            };

            UndoList.Add(batch);
            RedoList.Clear();
            parentBoard.ParentControl.UndoListChanged();
            parentBoard.ParentControl.RedoListChanged();
        }
示例#3
0
 public void AddUndoBatch(List<UndoRedoAction> actions)
 {
     if (actions.Count == 0)
         return;
     UndoRedoBatch batch = new UndoRedoBatch() { Actions = actions };
     UndoList.Add(batch);
     RedoList.Clear();
     parentBoard.ParentControl.UndoListChanged();
     parentBoard.ParentControl.RedoListChanged();
 }