2
0

ToplevelClosingEventArgs.cs 719 B

1234567891011121314151617181920212223242526
  1. using System;
  2. namespace Terminal.Gui {
  3. /// <summary>
  4. /// <see cref="EventArgs"/> implementation for the <see cref="Toplevel.Closing"/> event.
  5. /// </summary>
  6. public class ToplevelClosingEventArgs : EventArgs {
  7. /// <summary>
  8. /// The toplevel requesting stop.
  9. /// </summary>
  10. public View RequestingTop { get; }
  11. /// <summary>
  12. /// Provides an event cancellation option.
  13. /// </summary>
  14. public bool Cancel { get; set; }
  15. /// <summary>
  16. /// Initializes the event arguments with the requesting toplevel.
  17. /// </summary>
  18. /// <param name="requestingTop">The <see cref="RequestingTop"/>.</param>
  19. public ToplevelClosingEventArgs (Toplevel requestingTop)
  20. {
  21. RequestingTop = requestingTop;
  22. }
  23. }
  24. }