ToggleEventArgs.cs 689 B

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