StringPropertyEventArgs.cs 716 B

123456789101112131415161718192021
  1. #nullable enable
  2. using System.ComponentModel;
  3. namespace Terminal.Gui.Text;
  4. /// <summary>Event args for <see langword="string"/> type property events</summary>
  5. public class StringPropertyEventArgs : CancelEventArgs
  6. {
  7. /// <summary>Creates a new instance of the <see cref="StringPropertyEventArgs"/> class.</summary>
  8. public StringPropertyEventArgs (in string? currentString, ref string? newString)
  9. {
  10. CurrentString = currentString;
  11. NewString = newString;
  12. }
  13. /// <summary>Gets the current <see cref="String"/>.</summary>
  14. public string? CurrentString { get; }
  15. /// <summary>Gets or sets the new <see cref="String"/>.</summary>
  16. public string? NewString { get; set; }
  17. }