Ejemplo n.º 1
0
 //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();
 }
Ejemplo n.º 2
0
        //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);
 }
Ejemplo n.º 4
0
        // Pop off redo, push action to undo
        public void Redo(Spreadsheet sheet)
        {
            UndoRedoCollection redo = Redos.Pop();

            Undos.Push(redo.Exec(sheet));
        }
Ejemplo n.º 5
0
        // 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));
        }
Ejemplo n.º 6
0
 // 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();
 }
Ejemplo n.º 8
0
        public void PerformRedo(Spreadsheet sheet) // Perform Redo command
        {
            UndoRedoCollection redo = _redos.Pop();

            _undos.Push(redo.Exec(sheet));
        }
Ejemplo n.º 9
0
 public void AddUndo(UndoRedoCollection undo) // Add Undo comands (can move to workbook class later)
 {
     _undos.Push(undo);
     _redos.Clear();
 }
Ejemplo n.º 10
0
 public void addCollection(UndoRedoCollection input) { collect.Add(input); }
Ejemplo n.º 11
0
 //pushing to the undo stack
 public void UndoPush(UndoRedoCollection toAdd)
 {
     Undos.Push(toAdd);
 }
Ejemplo n.º 12
0
        // ops  redo action and does it
        public void Redo(Spreadsheet sheet)
        {
            UndoRedoCollection action = mRedos.Pop();

            mUndos.Push(action.Restore(sheet));
        }
Ejemplo n.º 13
0
 // add undo action to undo stack
 public void addUndo(UndoRedoCollection undos)
 {
     mUndos.Push(undos);
     mRedos.Clear();
 }
Ejemplo n.º 14
0
        /// <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));
        }
Ejemplo n.º 15
0
 /// <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();
 }