From feab1467a7dce847c2be495769d8b331e26d39c7 Mon Sep 17 00:00:00 2001 From: BornToBeRoot <16019165+BornToBeRoot@users.noreply.github.com> Date: Mon, 25 May 2026 17:20:32 +0200 Subject: [PATCH 1/4] Feature: Refresh button --- Source/NETworkManager/StatusWindow.xaml | 16 +----- Source/NETworkManager/StatusWindow.xaml.cs | 7 --- .../IPApiDNSResolverWidgetViewModel.cs | 16 +----- .../IPApiIPGeolocationWidgetViewModel.cs | 16 +----- .../NetworkConnectionWidgetViewModel.cs | 32 ++++++++---- .../Views/DashboardView.xaml.cs | 20 +++---- .../Views/IPApiDNSResolverWidgetView.xaml | 48 +++++++++++++---- .../Views/IPApiIPGeolocationWidgetView.xaml | 48 +++++++++++++---- .../Views/NetworkConnectionWidgetView.xaml | 52 ++++++++++++++----- 9 files changed, 149 insertions(+), 106 deletions(-) diff --git a/Source/NETworkManager/StatusWindow.xaml b/Source/NETworkManager/StatusWindow.xaml index 743ccd9187..eae2a831c0 100644 --- a/Source/NETworkManager/StatusWindow.xaml +++ b/Source/NETworkManager/StatusWindow.xaml @@ -60,21 +60,7 @@ - - + + diff --git a/Source/NETworkManager/Views/IPApiIPGeolocationWidgetView.xaml b/Source/NETworkManager/Views/IPApiIPGeolocationWidgetView.xaml index 86173f75d7..9d908ad2e3 100644 --- a/Source/NETworkManager/Views/IPApiIPGeolocationWidgetView.xaml +++ b/Source/NETworkManager/Views/IPApiIPGeolocationWidgetView.xaml @@ -10,10 +10,11 @@ xmlns:viewModels="clr-namespace:NETworkManager.ViewModels" xmlns:settings="clr-namespace:NETworkManager.Settings;assembly=NETworkManager.Settings" xmlns:system="clr-namespace:System;assembly=mscorlib" + xmlns:wpfHelpers="clr-namespace:NETworkManager.Utilities.WPF;assembly=NETworkManager.Utilities.WPF" mc:Ignorable="d" MinHeight="200" d:DataContext="{d:DesignInstance viewModels:IPApiIPGeolocationWidgetViewModel}"> - + @@ -40,15 +41,42 @@ - - - - - - - - + + + + + + + + + + + + + + + + diff --git a/Source/NETworkManager/Views/NetworkConnectionWidgetView.xaml b/Source/NETworkManager/Views/NetworkConnectionWidgetView.xaml index 0838b5e8a3..78d87bf98b 100644 --- a/Source/NETworkManager/Views/NetworkConnectionWidgetView.xaml +++ b/Source/NETworkManager/Views/NetworkConnectionWidgetView.xaml @@ -8,10 +8,11 @@ xmlns:mah="http://metro.mahapps.com/winfx/xaml/controls" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:viewModels="clr-namespace:NETworkManager.ViewModels" + xmlns:wpfHelpers="clr-namespace:NETworkManager.Utilities.WPF;assembly=NETworkManager.Utilities.WPF" mc:Ignorable="d" d:DataContext="{d:DesignInstance viewModels:NetworkConnectionWidgetViewModel}"> - + @@ -20,8 +21,8 @@ - - + + @@ -167,15 +168,42 @@ - - - - - - - - + + + + + + + + + + + + + + + + From 4c24bdb32dfbf439f5ac80bd1887694c24da0416 Mon Sep 17 00:00:00 2001 From: BornToBeRoot <16019165+BornToBeRoot@users.noreply.github.com> Date: Mon, 25 May 2026 17:50:11 +0200 Subject: [PATCH 2/4] Chore: Copilot feedback --- .../ViewModels/IPApiDNSResolverWidgetViewModel.cs | 7 ++++--- .../ViewModels/IPApiIPGeolocationWidgetViewModel.cs | 3 ++- .../ViewModels/NetworkConnectionWidgetViewModel.cs | 2 ++ Source/NETworkManager/Views/DashboardView.xaml.cs | 5 ----- .../Views/IPApiDNSResolverWidgetView.xaml.cs | 5 +---- .../Views/IPApiIPGeolocationWidgetView.xaml.cs | 4 ---- Website/docs/changelog/next-release.md | 1 + 7 files changed, 10 insertions(+), 17 deletions(-) diff --git a/Source/NETworkManager/ViewModels/IPApiDNSResolverWidgetViewModel.cs b/Source/NETworkManager/ViewModels/IPApiDNSResolverWidgetViewModel.cs index d37881d367..e04b17a819 100644 --- a/Source/NETworkManager/ViewModels/IPApiDNSResolverWidgetViewModel.cs +++ b/Source/NETworkManager/ViewModels/IPApiDNSResolverWidgetViewModel.cs @@ -1,4 +1,4 @@ -using System.Threading.Tasks; +using System.Threading.Tasks; using System.Windows.Input; using NETworkManager.Models.IPApi; using NETworkManager.Settings; @@ -55,6 +55,7 @@ private set public IPApiDNSResolverWidgetViewModel() { LoadSettings(); + Check(); } /// @@ -81,7 +82,7 @@ private void LoadSettings() /// /// Checks the DNS resolver. /// - public void Check() + private void Check() { _ = CheckAsync(); } @@ -98,7 +99,7 @@ private async Task CheckAsync() IsRunning = true; Result = null; - // Make the user happy, let him see a reload animation (and he cannot spam the reload command) + // Make the user happy, let him see a reload animation (and he cannot spam the reload command) await Task.Delay(GlobalStaticConfiguration.ApplicationUIRefreshInterval); Result = await DNSResolverService.GetInstance().GetDNSResolverAsync(); diff --git a/Source/NETworkManager/ViewModels/IPApiIPGeolocationWidgetViewModel.cs b/Source/NETworkManager/ViewModels/IPApiIPGeolocationWidgetViewModel.cs index 5fba710d19..201395dded 100644 --- a/Source/NETworkManager/ViewModels/IPApiIPGeolocationWidgetViewModel.cs +++ b/Source/NETworkManager/ViewModels/IPApiIPGeolocationWidgetViewModel.cs @@ -58,6 +58,7 @@ private set public IPApiIPGeolocationWidgetViewModel() { LoadSettings(); + Check(); } /// @@ -83,7 +84,7 @@ private void LoadSettings() /// /// Checks the IP geolocation. /// - public void Check() + private void Check() { _ = CheckAsync(); } diff --git a/Source/NETworkManager/ViewModels/NetworkConnectionWidgetViewModel.cs b/Source/NETworkManager/ViewModels/NetworkConnectionWidgetViewModel.cs index 155d2f7432..db05c7d8e1 100644 --- a/Source/NETworkManager/ViewModels/NetworkConnectionWidgetViewModel.cs +++ b/Source/NETworkManager/ViewModels/NetworkConnectionWidgetViewModel.cs @@ -502,6 +502,7 @@ private set public NetworkConnectionWidgetViewModel() { LoadSettings(); + Check(); } /// @@ -587,6 +588,7 @@ private async Task CheckAsync() finally { IsChecking = false; + _cancellationTokenSource.Dispose(); if (!wasCanceled) Log.Info("Network connection check completed."); diff --git a/Source/NETworkManager/Views/DashboardView.xaml.cs b/Source/NETworkManager/Views/DashboardView.xaml.cs index 3837ea111d..0fb44cf056 100644 --- a/Source/NETworkManager/Views/DashboardView.xaml.cs +++ b/Source/NETworkManager/Views/DashboardView.xaml.cs @@ -22,11 +22,6 @@ public DashboardView() ContentControlIPApiIPGeolocation.Content = _ipApiIPGeolocationWidgetView; ContentControlIPApiDNSResolver.Content = _ipApiDNSResolverWidgetView; ContentControlSpeedTest.Content = _speedTestWidgetView; - - // Check all widgets - _networkConnectionWidgetView.Check(); - _ipApiIPGeolocationWidgetView.Check(); - _ipApiDNSResolverWidgetView.Check(); } public void OnViewVisible() diff --git a/Source/NETworkManager/Views/IPApiDNSResolverWidgetView.xaml.cs b/Source/NETworkManager/Views/IPApiDNSResolverWidgetView.xaml.cs index 3f6965507d..ed93bf424d 100644 --- a/Source/NETworkManager/Views/IPApiDNSResolverWidgetView.xaml.cs +++ b/Source/NETworkManager/Views/IPApiDNSResolverWidgetView.xaml.cs @@ -1,3 +1,4 @@ + using NETworkManager.ViewModels; namespace NETworkManager.Views; @@ -12,8 +13,4 @@ public IPApiDNSResolverWidgetView() DataContext = _viewModel; } - public void Check() - { - _viewModel.Check(); - } } \ No newline at end of file diff --git a/Source/NETworkManager/Views/IPApiIPGeolocationWidgetView.xaml.cs b/Source/NETworkManager/Views/IPApiIPGeolocationWidgetView.xaml.cs index 54e004404a..2e6224f830 100644 --- a/Source/NETworkManager/Views/IPApiIPGeolocationWidgetView.xaml.cs +++ b/Source/NETworkManager/Views/IPApiIPGeolocationWidgetView.xaml.cs @@ -12,8 +12,4 @@ public IPApiIPGeolocationWidgetView() DataContext = _viewModel; } - public void Check() - { - _viewModel.Check(); - } } \ No newline at end of file diff --git a/Website/docs/changelog/next-release.md b/Website/docs/changelog/next-release.md index 480ee60f48..ace0c46d11 100644 --- a/Website/docs/changelog/next-release.md +++ b/Website/docs/changelog/next-release.md @@ -67,6 +67,7 @@ Release date: **xx.xx.2025** **Dashboard** +- Added a **Refresh** button (with animated feedback) to the **Network Connection**, **IP Geolocation**, and **DNS Resolver** widgets. The global reload button in the Status Window has been removed, as each widget now has its own. [#3447](https://github.com/BornToBeRoot/NETworkManager/pull/3447) - Redesign Status Window to make it more compact. [#3359](https://github.com/BornToBeRoot/NETworkManager/pull/3359) **Network Interface** From 9e3069e52db9328be641b53339859a5b26cf955b Mon Sep 17 00:00:00 2001 From: BornToBeRoot <16019165+BornToBeRoot@users.noreply.github.com> Date: Mon, 25 May 2026 18:06:00 +0200 Subject: [PATCH 3/4] Chore: Add tooltip --- Source/NETworkManager/Views/IPApiDNSResolverWidgetView.xaml | 1 + Source/NETworkManager/Views/IPApiIPGeolocationWidgetView.xaml | 1 + Source/NETworkManager/Views/NetworkConnectionWidgetView.xaml | 1 + 3 files changed, 3 insertions(+) diff --git a/Source/NETworkManager/Views/IPApiDNSResolverWidgetView.xaml b/Source/NETworkManager/Views/IPApiDNSResolverWidgetView.xaml index 5351ec8ae8..4f1b3d7b1c 100644 --- a/Source/NETworkManager/Views/IPApiDNSResolverWidgetView.xaml +++ b/Source/NETworkManager/Views/IPApiDNSResolverWidgetView.xaml @@ -55,6 +55,7 @@