ToggleEventArgs.cs 644 B

1234567891011121314151617181920
  1. namespace Terminal.Gui;
  2. /// <summary><see cref="EventArgs"/> for the <see cref="CheckBox.Toggled"/> event</summary>
  3. public class ToggleEventArgs : EventArgs
  4. {
  5. /// <summary>Creates a new instance of the <see cref="ToggleEventArgs"/> class.</summary>
  6. /// <param name="oldValue"></param>
  7. /// <param name="newValue"></param>
  8. public ToggleEventArgs (bool? oldValue, bool? newValue)
  9. {
  10. OldValue = oldValue;
  11. NewValue = newValue;
  12. }
  13. /// <summary>The new checked state</summary>
  14. public bool? NewValue { get; }
  15. /// <summary>The previous checked state</summary>
  16. public bool? OldValue { get; }
  17. }