Added whitelist to status view.
parent
d7fdf4708d
commit
a59b5f2215
|
@ -22,6 +22,7 @@
|
|||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="62"/>
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock>
|
||||
|
@ -31,6 +32,9 @@
|
|||
<DataGrid x:Name="DataGridNics"
|
||||
Grid.Row="1"
|
||||
ItemsSource="{Binding Nics, Mode=OneWay}" />
|
||||
<ListBox x:Name="IgnoredNicsList"
|
||||
Grid.Row="2"
|
||||
ItemsSource="{Binding IgnoredNics, Mode=OneWay}" />
|
||||
</Grid>
|
||||
</TabItem>
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
using System.ServiceProcess;
|
||||
using System.Text;
|
||||
|
@ -49,7 +50,20 @@ namespace WifiSitterGui.ViewModel
|
|||
}
|
||||
|
||||
|
||||
public List<SimpleNic> Nics { get { return NetState?.Nics; } }
|
||||
public List<SimpleNic> Nics {
|
||||
get {
|
||||
return NetState?.Nics.Where(x => !NetState.IgnoreAdapters.Any(y => x.Description.StartsWith(y))).ToList();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
public ObservableCollection<string> IgnoredNics {
|
||||
get {
|
||||
if (NetState == null) return null;
|
||||
return new ObservableCollection<string>(NetState?.IgnoreAdapters);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public string ServiceState {
|
||||
|
|
Loading…
Reference in New Issue