Added whitelist to status view.

systray
Sean McArdle 2016-11-21 16:16:14 -08:00
parent d7fdf4708d
commit a59b5f2215
2 changed files with 19 additions and 1 deletions

View File

@ -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>

View File

@ -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 {