Added whitelist to status view.
parent
d7fdf4708d
commit
a59b5f2215
|
@ -22,6 +22,7 @@
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="62"/>
|
<RowDefinition Height="62"/>
|
||||||
<RowDefinition/>
|
<RowDefinition/>
|
||||||
|
<RowDefinition/>
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
<TextBlock>
|
<TextBlock>
|
||||||
|
@ -31,6 +32,9 @@
|
||||||
<DataGrid x:Name="DataGridNics"
|
<DataGrid x:Name="DataGridNics"
|
||||||
Grid.Row="1"
|
Grid.Row="1"
|
||||||
ItemsSource="{Binding Nics, Mode=OneWay}" />
|
ItemsSource="{Binding Nics, Mode=OneWay}" />
|
||||||
|
<ListBox x:Name="IgnoredNicsList"
|
||||||
|
Grid.Row="2"
|
||||||
|
ItemsSource="{Binding IgnoredNics, Mode=OneWay}" />
|
||||||
</Grid>
|
</Grid>
|
||||||
</TabItem>
|
</TabItem>
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Collections.ObjectModel;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.ServiceProcess;
|
using System.ServiceProcess;
|
||||||
using System.Text;
|
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 {
|
public string ServiceState {
|
||||||
|
|
Loading…
Reference in New Issue