TitleEventArgs.cs 902 B

1234567891011121314151617181920212223242526272829303132333435
  1. using System;
  2. using System.Text;
  3. namespace Terminal.Gui {
  4. /// <summary>
  5. /// Event arguments for Title change events.
  6. /// </summary>
  7. public class TitleEventArgs : EventArgs {
  8. /// <summary>
  9. /// The new Window Title.
  10. /// </summary>
  11. public string NewTitle { get; set; }
  12. /// <summary>
  13. /// The old Window Title.
  14. /// </summary>
  15. public string OldTitle { get; set; }
  16. /// <summary>
  17. /// Flag which allows canceling the Title change.
  18. /// </summary>
  19. public bool Cancel { get; set; }
  20. /// <summary>
  21. /// Initializes a new instance of <see cref="TitleEventArgs"/>
  22. /// </summary>
  23. /// <param name="oldTitle">The <see cref="View.Title"/> that is/has been replaced.</param>
  24. /// <param name="newTitle">The new <see cref="View.Title"/> to be replaced.</param>
  25. public TitleEventArgs (string oldTitle, string newTitle)
  26. {
  27. OldTitle = oldTitle;
  28. NewTitle = newTitle;
  29. }
  30. }
  31. }