// For each undo action, push onto the redo stack and pop off the undo stack public void Undo(Spreadsheet sheet) { UndoRedoCollection undo = Undos.Pop(); Redos.Push(undo.Exec(sheet)); }
// Pop off redo, push action to undo public void Redo(Spreadsheet sheet) { UndoRedoCollection redo = Redos.Pop(); Undos.Push(redo.Exec(sheet)); }
public void PerformRedo(Spreadsheet sheet) // Perform Redo command { UndoRedoCollection redo = _redos.Pop(); _undos.Push(redo.Exec(sheet)); }