Add TextChangedEventArgs (correctly this time)

This commit is contained in:
tznind
2023-03-12 19:20:14 +00:00
parent 4b5fbfb89c
commit 53597b7cec
16 changed files with 57 additions and 39 deletions

View File

@@ -681,8 +681,8 @@ namespace Terminal.Gui.ViewTests {
[TextFieldTestsAutoInitShutdown]
public void TextChanged_Event ()
{
_textField.TextChanged += (e) => {
Assert.Equal ("TAB to jump between text fields.", e);
_textField.TextChanged += (s,e) => {
Assert.Equal ("TAB to jump between text fields.", e.OldValue);
};
_textField.Text = "changed";
@@ -1138,7 +1138,7 @@ namespace Terminal.Gui.ViewTests {
var tf = new TextField () { Width = 10, Text = "-1" };
tf.TextChanging += (s,e) => newText = e.NewText.ToString ();
tf.TextChanged += (e) => oldText = e.ToString ();
tf.TextChanged += (s, e) => oldText = e.OldValue.ToString ();
Application.Top.Add (tf);
Application.Begin (Application.Top);