using System; namespace PaintDotNet.Measurement { public class ExecutingHistoryMementoEventArgs : EventArgs { private HistoryMemento historyMemento; private bool mayAlterSuspendToolProperty; private bool suspendTool; public HistoryMemento HistoryMemento { get { return this.historyMemento; } } public bool MayAlterSuspendTool { get { return this.mayAlterSuspendToolProperty; } } public bool SuspendTool { get { return this.suspendTool; } set { if (!this.mayAlterSuspendToolProperty) { throw new InvalidOperationException("May not alter the SuspendTool property when MayAlterSuspendToolProperty is false"); } this.suspendTool = value; } } public ExecutingHistoryMementoEventArgs(HistoryMemento historyMemento, bool mayAlterSuspendToolProperty, bool suspendTool) { this.historyMemento = historyMemento; this.mayAlterSuspendToolProperty = mayAlterSuspendToolProperty; this.suspendTool = suspendTool; } } }