public void Add(JDataCommandType type, JData beforeData, JData afterData, int index) { JDataCommand command = new JDataCommand(m_newCommandID++, type, beforeData, afterData, index); m_currendCommandID = command.CommandID; m_undoStack.Push(command); m_redoStack.Clear(); }
public JDataCommand(int commandID, JDataCommandType type, JData beforeData, JData afterData, int index) { CommandID = commandID; Type = type; BeforeData = beforeData; AfterData = afterData; ChangedIndex = index; }