public TransactedToolUndoCommitHistoryMemento(DocumentWorkspace docWorkspace, TChanges changes, HistoryMemento innerCommitHM) : base(docWorkspace, innerCommitHM.Name, innerCommitHM.Image) { Validate.Begin().IsNotNull <TChanges>(changes, "changes").IsNotNull <HistoryMemento>(innerCommitHM, "innerCommitHM").Check(); if (innerCommitHM is TransactedToolHistoryMementoBase <TTool, TChanges> ) { ExceptionUtil.ThrowArgumentException("inner HistoryMemento cannot derive from TransactedToolHistoryMementoBase", "innerCommitHM"); } this.changes = changes; this.innerCommitHM = innerCommitHM; }
public void PushNewAction(HistoryMemento newHA) { actions.Add(newHA); }
public TransactedToolUndoDrawHistoryMemento(DocumentWorkspace docWorkspace, string name, ImageResource image, HistoryMemento beforeDrawingUndoMemento) : base(docWorkspace, name, image) { Validate.IsNotNull <HistoryMemento>(beforeDrawingUndoMemento, "beforeDrawingUndoMemento"); this.beforeDrawingUndoMemento = beforeDrawingUndoMemento; }
public void AddMemento(HistoryMemento newHA) { this.mementos.Add(newHA); }
public ExecutingHistoryMementoEventArgs(PaintDotNet.HistoryMementos.HistoryMemento historyMemento, bool mayAlterSuspendToolProperty, bool suspendTool) { this.historyMemento = historyMemento; this.mayAlterSuspendToolProperty = mayAlterSuspendToolProperty; this.suspendTool = suspendTool; }