ToggleEventArgs.cs 791 B

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