public void Redo(DataGridView dataGridView, DataTable dataTable) { for (int thingIdx = 0; thingIdx < ThingsList.Count; thingIdx++) { IUndoRedo thing = ThingsList[thingIdx]; thing.Redo(dataGridView, dataTable); } }
public void Redo() { if (this.oUndoRedoHandler is IUndoRedo) { IUndoRedo iur = (IUndoRedo)this.oUndoRedoHandler; iur.Redo(this.o, this.ura, this.oData); } else { throw new InterfaceNotImplementedException("IUndoRedo in " + this.oUndoRedoHandler.GetType().ToString() + " not implemented!"); } }
public void Redo() { if (!CanRedo()) { return; } IUndoRedo action = redoStack.Pop(); action.Redo(); undoStack.Push(action); NotifyPropertyChanged("UndoDescription"); NotifyPropertyChanged("RedoDescription"); UndoOrRedoCalled?.Invoke(this, new EventArgs()); }
/// <summary> /// Redo the last undone action, if any. /// </summary> public bool Redo() { if (_redoStack.Count == 0) { return(false); } IUndoRedo action = _redoStack.Pop(); action.Redo(); _undoStack.Push(action); return(true); }
public void Redo() { if (RedoList.Count > 0) { IUndoRedo item = RedoList.First(); RedoList.RemoveFirst(); LinkedList <IUndoRedo> cpyRedo = new LinkedList <IUndoRedo>(RedoList.ToList()); item.Redo(); RedoList = new LinkedList <IUndoRedo>(cpyRedo); RaisePropertyChanged("RedoDescription"); RaisePropertyChanged("UndoDescription"); } }
public void Redo() { if (CanRedo()) { try { m_CsvForm.BeforeChangeCellValue(); IUndoRedo iur = m_RedoStack.Pop(); iur.Redo(m_CsvForm.GetDataGridView(), m_CsvForm.GetDataTable()); m_UndoStack.Push(iur); DoSomething(this, new DoSomethingEventArgs(DoEventType.Redo, iur.GetDoType())); m_CsvForm.AfterChangeCellValue(); MainForm.Instance.UpdateCellEdit(); } catch (System.Exception ex) { DebugUtility.ShowExceptionMessageBox("重做失败", ex); } } }