public void Undo()
        {
            IUndoRedoCommand command = _undoStack.Pop();

            _redoStack.Push(command);
            command.UnExecute();
            UpdateCommandStatus();
        }
        /// <summary>
        /// Undoes an action
        /// </summary>
        public void Undo()
        {
            IUndoRedoCommand cmd = UndoList.Last();

            cmd.UnExecute();
            UndoList.Remove(cmd);
            RedoList.Add(cmd);
        }
 public void Undo()
 {
     if (undoStack.Any())
     {
         IUndoRedoCommand command = undoStack.Pop();
         redoStack.Push(command);
         command.UnExecute();
     }
 }
Beispiel #4
0
        // Udfører undo hvis det kan lade sig gøre.
        public void Undo()
        {
            if (undoStack.Count() <= 0)
            {
                throw new InvalidOperationException();
            }
            IUndoRedoCommand command = undoStack.Pop();

            redoStack.Push(command);
            command.UnExecute();
        }
Beispiel #5
0
        // Udfører undo hvis det kan lade sig gøre.
        public void Undo()
        {
            if (undoStack.Count() <= 0)
            {
                throw new InvalidOperationException();
            }
            IUndoRedoCommand command = undoStack.First();

            redoStack.AddFirst(command);
            command.UnExecute();

            if (undoStack.Any())
            {
                undoStack.RemoveFirst();
            }
        }