#nullable enable using System.ComponentModel; namespace Terminal.Gui; /// /// for events that convey changes to a property of type `T`. /// /// Events that use this class can be cancellable. Where applicable, the property should be set to /// to prevent the state change from occurring. /// public class CancelEventArgs : CancelEventArgs { /// Initializes a new instance of the class. /// The current (old) value of the property. /// The value the property will be set to if the event is not cancelled. public CancelEventArgs (T currentValue, T newValue) { CurrentValue = currentValue; NewValue = newValue; } /// The value the property will be set to if the event is not cancelled. public T NewValue { get; set; } /// The current value of the property. public T CurrentValue { get; } }