//Add an undo command to the undo stack public void AddUndo(UndoRedoCollection undos) { //add the undo(s) to the undo stack undoStack.Push(undos); //clear from the redo stack redoStack.Clear(); }
//Perform the redo! public void Redo(Spreadsheet sheet) { UndoRedoCollection commands = redoStack.Pop(); //add the redo back onto the undo stack undoStack.Push(commands.Restore(sheet)); }
public void AddUndo(UndoRedoCollection item) { this.Undos.Push(item); // Let the event in Form knows when to enable or disable the button handler = new PropertyChangedEventArgs("Undo Available"); this.CellPropertyChanged(item, handler); }
// Pop off redo, push action to undo public void Redo(Spreadsheet sheet) { UndoRedoCollection redo = Redos.Pop(); Undos.Push(redo.Exec(sheet)); }
// 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)); }
// pushes action on the undos stack, clear the redo stack public void AddUndo(UndoRedoCollection undo) { Undos.Push(undo); Redos.Clear(); }
public void addUndo(UndoRedoCollection undo) { //push undo onto stack _undos.Push(undo); //reset redo stack because they can't redo at this point in time _redos.Clear(); }
public void PerformRedo(Spreadsheet sheet) // Perform Redo command { UndoRedoCollection redo = _redos.Pop(); _undos.Push(redo.Exec(sheet)); }
public void AddUndo(UndoRedoCollection undo) // Add Undo comands (can move to workbook class later) { _undos.Push(undo); _redos.Clear(); }
public void addCollection(UndoRedoCollection input) { collect.Add(input); }
//pushing to the undo stack public void UndoPush(UndoRedoCollection toAdd) { Undos.Push(toAdd); }
// ops redo action and does it public void Redo(Spreadsheet sheet) { UndoRedoCollection action = mRedos.Pop(); mUndos.Push(action.Restore(sheet)); }
// add undo action to undo stack public void addUndo(UndoRedoCollection undos) { mUndos.Push(undos); mRedos.Clear(); }
/// <summary> /// Execute the redo right here, /// </summary> /// <param name="sheet"></param> public void Redo(Spreadsheet sheet) { UndoRedoCollection commands = redoStack.Pop(); undoStack.Push(commands.Restore(sheet)); }
/// <summary> /// The undo stack is inserted in with the new undo to operate on /// </summary> /// <param name="undos"></param> public void AddUndo(UndoRedoCollection undos) { undoStack.Push(undos); redoStack.Clear(); }