Feat: Implement Ping Server Configuration UI and Fix Compilation Issues #2223
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.
This Pull Request introduces a user interface for configuring the Ping Server address directly within the application and resolves several compilation issues.
Key Changes
UI Enhancement:
Added a "Ping Server" label and editable text field to the "Advanced" section of the General Settings dialog.
Updated
GeneralSettingsDlg
to persist the ping server configuration.
Functionality Improvement:
Modified TrafficMonitorDlg::ApplySettings to apply the new ping server address immediately. Users no longer need to restart the application for the change to take effect.
Compilation & Bug Fixes:
Fixed C2228 and C2006 errors in
PingMonitor.cpp
(removed corrupted HTML entities and fixed string type mismatches).
Fixed C2664 types errors in
TrafficMonitor.cpp
regarding CString/std::wstring conversions.
Fixed a logic error in
TrafficMonitor.cpp
where an assignment (=) was used instead of comparison (==).
Verification
The solution builds successfully with Visual Studio 2022 (v143 toolset) with 0 errors.
Verified that the new UI control is correctly positioned in the General Settings dialog.
Verified that changing the Ping Server IP updates the monitoring target immediately.