ToplevelEventArgs.cs 828 B

12345678910111213141516171819202122232425262728
  1. using System;
  2. namespace Terminal.Gui {
  3. /// <summary>
  4. /// Args for events that relate to a specific <see cref="Toplevel"/>.
  5. /// </summary>
  6. public class ToplevelEventArgs : EventArgs{
  7. /// <summary>
  8. /// Creates a new instance of the <see cref="ToplevelClosingEventArgs"/> class.
  9. /// </summary>
  10. /// <param name="toplevel"></param>
  11. public ToplevelEventArgs (Toplevel toplevel)
  12. {
  13. Toplevel = toplevel;
  14. }
  15. /// <summary>
  16. /// Gets the <see cref="Toplevel"/> that the event is about.
  17. /// </summary>
  18. /// <remarks>This is usually but may not always be the same as the sender
  19. /// in <see cref="EventHandler"/>. For example if the reported event
  20. /// is about a different <see cref="Toplevel"/> or the event is
  21. /// raised by a separate class.
  22. /// </remarks>
  23. public Toplevel Toplevel { get; }
  24. }
  25. }