File tree Expand file tree Collapse file tree 2 files changed +20
-2
lines changed
InternetTest/InternetTest Expand file tree Collapse file tree 2 files changed +20
-2
lines changed Original file line number Diff line number Diff line change @@ -63,6 +63,8 @@ public ObservableCollection<NetworkAdapterItemViewModel> Adapters
6363
6464 public ICommand RefreshCommand => new RelayCommand ( o => GetAdapters ( ) ) ;
6565 public ICommand RefreshWiFiCommand { get ; set ; }
66+ public ICommand RefreshProfilesCommand => new RelayCommand ( o => RefreshProfiles ( true ) ) ;
67+
6668 public WiFiPageViewModel ( Settings settings )
6769 {
6870 _settings = settings ;
@@ -112,10 +114,10 @@ internal void GetAdapters()
112114 }
113115 }
114116
115- private async void RefreshProfiles ( )
117+ private async void RefreshProfiles ( bool forceRefresh = false )
116118 {
117119 ProfileLoading = true ;
118- var profiles = await WlanProfile . GetProfilesAsync ( ) ;
120+ var profiles = await WlanProfile . GetProfilesAsync ( forceRefresh ) ;
119121 WlanProfiles . Clear ( ) ;
120122 profiles . ForEach ( x => WlanProfiles . Add ( new WlanProfileItemViewModel ( x ) ) ) ;
121123 ProfileLoading = false ;
Original file line number Diff line number Diff line change 195195 Text =" {x:Static lang:Resources.NoNetworks}"
196196 TextWrapping =" Wrap" />
197197 </StackPanel >
198+
199+ <StackPanel Grid.Column=" 1" Orientation =" Horizontal" >
200+ <Button
201+ Padding =" 5"
202+ VerticalAlignment =" Center"
203+ Background =" Transparent"
204+ Command =" {Binding RefreshProfilesCommand}"
205+ Content ="  "
206+ Cursor =" Hand"
207+ FontFamily =" ..\Fonts\#FluentSystemIcons-Regular"
208+ Foreground =" {DynamicResource Foreground1}" >
209+ <Button .ToolTip>
210+ <ToolTip Content =" {x:Static lang:Resources.Refresh}" />
211+ </Button .ToolTip>
212+ </Button >
213+ </StackPanel >
198214 </Grid >
199215 </Border >
200216 <Border
You can’t perform that action at this time.
0 commit comments