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

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

            _undos.Push(redo.Exec(sheet));
        }
示例#9
0
 public void AddUndo(UndoRedoCollection undo) // Add Undo comands (can move to workbook class later)
 {
     _undos.Push(undo);
     _redos.Clear();
 }
示例#10
0
文件: Class1.cs 项目: russvick/CS322
 public void addCollection(UndoRedoCollection input) { collect.Add(input); }
示例#11
0
文件: Class1.cs 项目: russvick/CS322
 //pushing to the undo stack
 public void UndoPush(UndoRedoCollection toAdd)
 {
     Undos.Push(toAdd);
 }
示例#12
0
        // ops  redo action and does it
        public void Redo(Spreadsheet sheet)
        {
            UndoRedoCollection action = mRedos.Pop();

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