-
Notifications
You must be signed in to change notification settings - Fork 708
Fixes #4023 - Changes CommandEventArgs
to be based on HandledEventArgs
instead of CancelEventArgs
#4054
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes issue #4023 by replacing the use of CancelEventArgs with HandledEventArgs in various command event handlers across the Terminal.Gui examples. The key changes include:
- Updating assignments from e.Cancel to e.Handled for consistent event handling.
- Revising inline comments to reflect the new property.
- Modifying the ReactiveExample command event argument types (with one potential inconsistency noted).
Reviewed Changes
Copilot reviewed 51 out of 51 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
Examples/UICatalog/Scenarios/SimpleDialog.cs | Replaced e.Cancel with e.Handled in dialog acceptance. |
Examples/UICatalog/Scenarios/Shortcuts.cs | Updated event handler assignments from Cancel to Handled. |
Examples/UICatalog/Scenarios/MessageBoxes.cs | Changed event assignment from e.Cancel to e.Handled. |
Examples/UICatalog/Scenarios/Menus.cs | Systematic change from e.Cancel to e.Handled in menu actions. |
Examples/UICatalog/Scenarios/LineDrawing.cs | Replaced e.Cancel with e.Handled in color prompting events. |
Examples/UICatalog/Scenarios/Generic.cs | Adjusted comment and event property from e.Cancel to e.Handled. |
Examples/UICatalog/Scenarios/FileDialogExamples.cs | Changed file dialog event handling from Cancel to Handled. |
Examples/UICatalog/Scenarios/Editors/PosEditor.cs | Updated event property from e.Cancel to e.Handled in editor init. |
Examples/UICatalog/Scenarios/Editors/DimEditor.cs | Replaced e.Cancel with e.Handled in dimension editor events. |
Examples/UICatalog/Scenarios/Dialogs.cs | Multiple updates of e.Cancel to e.Handled in dialog event handlers. |
Examples/UICatalog/Scenarios/CharacterMap/CharacterMap.cs | Replaced e.Cancel with e.Handled when handling the ENTER key. |
Examples/UICatalog/Scenarios/Buttons.cs | Numerous updates replacing e.Cancel with e.Handled in button events. |
Examples/UICatalog/Scenarios/Bars.cs | Modified event handling for menu shortcuts and status bar actions. |
Examples/UICatalog/Scenarios/AllViewsTester.cs | Changed event handling property from Cancel to Handled. |
Examples/UICatalog/Scenarios/Adornments.cs | Updated window close event to use e.Handled instead of e.Cancel. |
Examples/SelfContained/Program.cs | Revised comment and event property from e.Cancel to e.Handled. |
Examples/NativeAot/Program.cs | Changed event handling from e.Cancel to e.Handled for login error events. |
Examples/Example/Example.cs | Updated acceptance logic replacing e.Cancel with e.Handled. |
Examples/CommunityToolkitExample/LoginView.cs | Revised event handling to use e.Handled instead of e.Cancel. |
Examples/ReactiveExample/LoginViewModel.cs | Changed ReactiveCommand event args type from HandledEventArgs to CancelEventArgs (potential inconsistency). |
I had to do this because I couldn't get the reactive sample to build otherwise. |
Fixes
CommandEventArgs
to be based onHandledEventArgs
instead ofCancelEventArgs
#4023Pull Request checklist:
CTRL-K-D
to automatically reformat your files before committing.dotnet test
before commit///
style comments)