12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- 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;
- }
- }
- }
|