Feature: #3109 - Add F2/Delete hotkeys in HostsFileEditor & Refactor #3113
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changes proposed in this pull request
Related issue(s)
Copilot generated summary
Provide a Copilot generated summary of the changes in this pull request.
Copilot summary
This pull request introduces several improvements to the
NETworkManager
project, focusing on enhancing user interface interactions, improving command execution patterns, and ensuring better accessibility by setting focus on specific UI elements when child windows are loaded. Below is a summary of the most important changes grouped by theme:Enhanced User Interface Interactions:
Source/NETworkManager/ViewModels/HostsFileEditorViewModel.cs
: Replaced the dialog coordinator with a child window (OKMessageChildWindow
) for error messages, improving consistency in UI design.Source/NETworkManager/Views/HostsFileEditorView.xaml
: Added mouse double-click event and keyboard shortcuts (F2
for edit,Delete
for delete) to theMultiSelectDataGrid
for better user interaction. [1] [2]Improved Command Execution Patterns:
CanExecute
checks andExecute
invocations for commands across multiple files to ensure proper command validation before execution:Source/NETworkManager/Views/AWSSessionManagerSettingsView.xaml.cs
: Updated AWS profile editing logic.Source/NETworkManager/Views/DNSLookupSettingsView.xaml.cs
: Updated DNS server editing logic.Source/NETworkManager/Views/HostsFileEditorView.xaml.cs
: Added command execution for editing entries.PortScannerSettingsView.xaml.cs
,SNMPSettingsView.xaml.cs
,SNTPLookupSettingsView.xaml.cs
, andSettingsProfilesView.xaml.cs
. [1] [2] [3] [4]Accessibility Improvements in Child Windows:
Source/NETworkManager/Views/OKMessageChildWindow.xaml
andOKMessageChildWindow.xaml.cs
: Focuses theOK
button when loaded. [1] [2]UpgradeChildWindow
,WelcomeChildWindow
, andOKCancelInfoMessageChildWindow
. [1] [2] [3] [4] [5]Code Cleanup:
using
directives across several files to improve code readability and maintainability:Source/NETworkManager/Views/DNSLookupSettingsView.xaml.cs
andHostsFileEditorView.xaml.cs
. [1] [2]These changes collectively enhance the user experience, improve code quality, and ensure better adherence to UI and accessibility standards.
To-Do
Contributing
By submitting this pull request, I confirm the following: