TitleEventArgs.cs 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. using NStack;
  2. using System;
  3. namespace Terminal.Gui {
  4. public partial class TileView {
  5. public partial class Tile {
  6. /// <summary>
  7. /// An <see cref="EventArgs"/> which allows passing a cancelable new <see cref="Title"/> value event.
  8. /// </summary>
  9. public class TitleEventArgs : EventArgs {
  10. /// <summary>
  11. /// The new Window Title.
  12. /// </summary>
  13. public ustring NewTitle { get; set; }
  14. /// <summary>
  15. /// The old Window Title.
  16. /// </summary>
  17. public ustring OldTitle { get; set; }
  18. /// <summary>
  19. /// Flag which allows cancelling the Title change.
  20. /// </summary>
  21. public bool Cancel { get; set; }
  22. /// <summary>
  23. /// Initializes a new instance of <see cref="TitleEventArgs"/>
  24. /// </summary>
  25. /// <param name="oldTitle">The <see cref="Title"/> that is/has been replaced.</param>
  26. /// <param name="newTitle">The new <see cref="Title"/> to be replaced.</param>
  27. public TitleEventArgs (ustring oldTitle, ustring newTitle)
  28. {
  29. OldTitle = oldTitle;
  30. NewTitle = newTitle;
  31. }
  32. }
  33. }
  34. }
  35. }