StringEventArgs.cs 839 B

1234567891011121314151617181920212223242526
  1. using System.ComponentModel;
  2. namespace Terminal.Gui;
  3. /// <summary>Cancellable event args for string-based property change events.</summary>
  4. public class StringEventArgs : CancelEventArgs
  5. {
  6. /// <summary>
  7. /// Initializes a new instance of <see cref="StringEventArgs"/>
  8. /// </summary>
  9. public StringEventArgs () {}
  10. /// <summary>Initializes a new instance of <see cref="StringEventArgs"/></summary>
  11. /// <param name="oldString">The old string.</param>
  12. /// <param name="newString">The new string.</param>
  13. public StringEventArgs (string oldString, string newString)
  14. {
  15. OldValue = oldString;
  16. NewValue = newString;
  17. }
  18. /// <summary>The new string.</summary>
  19. public string NewValue { get; set; }
  20. /// <summary>The old string.</summary>
  21. public string OldValue { get; set; }
  22. }