TitleEventArgs.cs 829 B

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