コード例 #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);
     }
 }
コード例 #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!");
     }
 }
コード例 #3
0
ファイル: UndoManager.cs プロジェクト: LazyBone152/XV2-Tools
        public void Redo()
        {
            if (!CanRedo())
            {
                return;
            }
            IUndoRedo action = redoStack.Pop();

            action.Redo();
            undoStack.Push(action);
            NotifyPropertyChanged("UndoDescription");
            NotifyPropertyChanged("RedoDescription");
            UndoOrRedoCalled?.Invoke(this, new EventArgs());
        }
コード例 #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);
        }
コード例 #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");
            }
        }
コード例 #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);
            }
        }
    }