diff --git a/Terminal.Gui/Core/Border.cs b/Terminal.Gui/Core/Border.cs index 1fdb7f48e..8f28b6e47 100644 --- a/Terminal.Gui/Core/Border.cs +++ b/Terminal.Gui/Core/Border.cs @@ -131,7 +131,7 @@ namespace Terminal.Gui { } } - void Border_BorderChanged (Border border) + void Border_BorderChanged (object sender, EventArgs e) { Rect frame; if (Border.Child != null && (Border.Child.Width is Dim || Border.Child.Height is Dim)) { @@ -319,7 +319,7 @@ namespace Terminal.Gui { /// /// Invoked when any property of Border changes (except ). /// - public event Action BorderChanged; + public event EventHandler BorderChanged; private BorderStyle borderStyle; private bool drawMarginFrame; @@ -1113,7 +1113,7 @@ namespace Terminal.Gui { /// public virtual void OnBorderChanged () { - BorderChanged?.Invoke (this); + BorderChanged?.Invoke (this, new EventArgs()); } } } \ No newline at end of file diff --git a/Terminal.Gui/Core/CollectionNavigator.cs b/Terminal.Gui/Core/CollectionNavigator.cs index 6637daf20..054fce106 100644 --- a/Terminal.Gui/Core/CollectionNavigator.cs +++ b/Terminal.Gui/Core/CollectionNavigator.cs @@ -47,7 +47,7 @@ namespace Terminal.Gui { /// /// Event arguments for the event. /// - public class KeystrokeNavigatorEventArgs { + public class KeystrokeNavigatorEventArgs : EventArgs{ /// /// he current . /// @@ -66,7 +66,7 @@ namespace Terminal.Gui { /// /// This event is invoked when changes. Useful for debugging. /// - public event Action SearchStringChanged; + public event EventHandler SearchStringChanged; private string _searchString = ""; /// @@ -87,7 +87,7 @@ namespace Terminal.Gui { /// public virtual void OnSearchStringChanged (KeystrokeNavigatorEventArgs e) { - SearchStringChanged?.Invoke (e); + SearchStringChanged?.Invoke (this, e); } /// diff --git a/Terminal.Gui/Core/Window.cs b/Terminal.Gui/Core/Window.cs index 795d360ec..c647a3afd 100644 --- a/Terminal.Gui/Core/Window.cs +++ b/Terminal.Gui/Core/Window.cs @@ -70,7 +70,7 @@ namespace Terminal.Gui { } } - void Border_BorderChanged (Border border) + void Border_BorderChanged (object sender, EventArgs e) { Rect frame; if (contentView != null && (contentView.Width is Dim || contentView.Height is Dim)) { diff --git a/Terminal.Gui/Views/FrameView.cs b/Terminal.Gui/Views/FrameView.cs index 8b1865108..e6a8be99f 100644 --- a/Terminal.Gui/Views/FrameView.cs +++ b/Terminal.Gui/Views/FrameView.cs @@ -97,7 +97,7 @@ namespace Terminal.Gui { } } - void Border_BorderChanged (Border border) + void Border_BorderChanged (object sender, EventArgs e) { Rect frame; if (contentView != null && (contentView.Width is Dim || contentView.Height is Dim)) { diff --git a/Terminal.Gui/Views/PanelView.cs b/Terminal.Gui/Views/PanelView.cs index 2bcef2745..edd35ed20 100644 --- a/Terminal.Gui/Views/PanelView.cs +++ b/Terminal.Gui/Views/PanelView.cs @@ -128,7 +128,7 @@ namespace Terminal.Gui { Child.Initialized -= Child_Initialized; } - private void Border_BorderChanged (Border obj) + private void Border_BorderChanged (object sender, EventArgs e) { AdjustContainer (); } diff --git a/UICatalog/Scenarios/CollectionNavigatorTester.cs b/UICatalog/Scenarios/CollectionNavigatorTester.cs index 102db475b..9846c7fa3 100644 --- a/UICatalog/Scenarios/CollectionNavigatorTester.cs +++ b/UICatalog/Scenarios/CollectionNavigatorTester.cs @@ -142,8 +142,8 @@ namespace UICatalog.Scenarios { _listView.SetSource (_items); - _listView.KeystrokeNavigator.SearchStringChanged += (state) => { - label.Text = $"ListView: {state.SearchString}"; + _listView.KeystrokeNavigator.SearchStringChanged += (s,e) => { + label.Text = $"ListView: {e.SearchString}"; }; } @@ -179,8 +179,8 @@ namespace UICatalog.Scenarios { _treeView.ExpandAll (); _treeView.GoToFirst (); - _treeView.KeystrokeNavigator.SearchStringChanged += (state) => { - label.Text = $"TreeView: {state.SearchString}"; + _treeView.KeystrokeNavigator.SearchStringChanged += (s,e) => { + label.Text = $"TreeView: {e.SearchString}"; }; }