Exemplo n.º 1
0
 public void Redo(DataGridView dataGridView, DataTable dataTable)
 {
     for (int thingIdx = 0; thingIdx < ThingsList.Count; thingIdx++)
     {
         IUndoRedo thing = ThingsList[thingIdx];
         thing.Redo(dataGridView, dataTable);
     }
 }
Exemplo n.º 2
0
 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!");
     }
 }
Exemplo n.º 3
0
        public void Redo()
        {
            if (!CanRedo())
            {
                return;
            }
            IUndoRedo action = redoStack.Pop();

            action.Redo();
            undoStack.Push(action);
            NotifyPropertyChanged("UndoDescription");
            NotifyPropertyChanged("RedoDescription");
            UndoOrRedoCalled?.Invoke(this, new EventArgs());
        }
Exemplo n.º 4
0
        /// <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);
        }
Exemplo n.º 5
0
        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");
            }
        }
Exemplo n.º 6
0
    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);
            }
        }
    }