private void UndoLogRemove(object item, int index) { if (UndoLog != null) { UndoLog.AddUndoAction(new UndoListRemove(this, item, index)); } }
public void SetParameter(int index, object value) { object oldValue = GetParameter(index); SetParameterSilent(index, value); if (UndoLog != null) { UndoLog.AddUndoAction(new UndoScriptChange(this, index, oldValue, value)); } }
private void UndoLogAdd(object item, int index) { if (UndoLog != null) { // also set UndoLog property on added item, if it needs a reference to the undo logger IMutableField mutableValue = item as IMutableField; if (mutableValue != null) { mutableValue.UndoLog = UndoLog; } UndoLog.AddUndoAction(new UndoListAdd(this, item, index)); } }