Skip to content

Commit 85dc5a3

Browse files
committed
1 parent b829a59 commit 85dc5a3

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

Source/NETworkManager/App.xaml.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,6 @@ private void Application_Startup(object sender, StartupEventArgs e)
114114

115115
private void DispatcherTimer_Tick(object sender, EventArgs e)
116116
{
117-
Debug.WriteLine("Auto save settings...");
118117
Save();
119118
}
120119

Source/NETworkManager/ViewModels/NetworkInterfaceViewModel.cs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -751,9 +751,9 @@ public NetworkInterfaceViewModel(IDialogCoordinator instance)
751751
_dialogCoordinator = instance;
752752

753753
LoadNetworkInterfaces();
754-
754+
755755
InitialBandwidthChart();
756-
756+
757757
Profiles = new CollectionViewSource { Source = ProfileManager.Profiles }.View;
758758
Profiles.GroupDescriptions.Add(new PropertyGroupDescription(nameof(ProfileInfo.Group)));
759759
Profiles.SortDescriptions.Add(new SortDescription(nameof(ProfileInfo.Group), ListSortDirection.Ascending));
@@ -779,6 +779,10 @@ public NetworkInterfaceViewModel(IDialogCoordinator instance)
779779
// This will select the first entry as selected item...
780780
SelectedProfile = Profiles.SourceCollection.Cast<ProfileInfo>().Where(x => x.NetworkInterface_Enabled).OrderBy(x => x.Group).ThenBy(x => x.Name).FirstOrDefault();
781781

782+
// Detect if network address or status changed...
783+
NetworkChange.NetworkAvailabilityChanged += (sender, args) => ReloadNetworkInterfacesAction();
784+
NetworkChange.NetworkAddressChanged += (sender, args) => ReloadNetworkInterfacesAction();
785+
782786
LoadSettings();
783787

784788
SettingsManager.Current.PropertyChanged += SettingsManager_PropertyChanged;

0 commit comments

Comments
 (0)