/
OptionsWindow.xaml
47 lines (44 loc) · 2.82 KB
/
OptionsWindow.xaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<Window
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:IPFilter.Views"
xmlns:ViewModels="clr-namespace:IPFilter.ViewModels" x:Class="IPFilter.Views.OptionsWindow"
mc:Ignorable="d"
WindowStyle="ToolWindow" ResizeMode="CanResizeWithGrip" MinWidth="450" WindowStartupLocation="CenterScreen"
Title="Options" Height="200.642" Width="660" Loaded="Window_Loaded" SizeToContent="Height">
<Window.Resources>
<local:InverseBoolConverter x:Key="InverseBoolConverter" />
</Window.Resources>
<Window.DataContext>
<ViewModels:OptionsViewModel/>
</Window.DataContext>
<DockPanel>
<StatusBar DockPanel.Dock="Bottom">
<StatusBarItem>
<Button Padding="5" Margin="5" Content="OK" Command="{Binding SaveSettingsCommand}" CommandParameter="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}}" />
</StatusBarItem>
<StatusBarItem>
<Button Padding="5" Margin="0,5,5,5" Content="Cancel" Command="{Binding ResetSettingsCommand}" CommandParameter="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}}" />
</StatusBarItem>
<StatusBarItem Width="Auto">
<TextBlock VerticalAlignment="Top" Text="{Binding ErrorMessage}" Foreground="Red" TextWrapping="WrapWithOverflow" Margin="0,0,5,0" />
</StatusBarItem>
</StatusBar>
<StackPanel Orientation="Vertical" Margin="5,0,5,5">
<Label Content="Automatic list update" />
<StackPanel Orientation="Horizontal" Margin="10">
<CheckBox IsChecked="{Binding IsScheduleEnabled}" Content="Schedule automatic background update of list"/>
<!-- <Slider Width="200" Minimum="1" Maximum="24" Value="{Binding ScheduleHours}"/> -->
<!-- <Label Content="{Binding ScheduleHours}" ContentStringFormat=" {0} hour(s)" /> -->
</StackPanel>
<Label Content="Software Updates" />
<StackPanel Orientation="Vertical" Margin="10">
<CheckBox IsChecked="{Binding IsUpdateDisabled}" Content="Disable software update check at startup"/>
<CheckBox IsChecked="{Binding IsPreReleaseEnabled}" IsEnabled="{Binding IsUpdateDisabled, Converter={StaticResource InverseBoolConverter}}" Content="Allow updating to pre-release versions"/>
<!-- <CheckBox IsChecked="{Binding ShowNotifications}" Content="Show notifications"/> -->
</StackPanel>
</StackPanel>
</DockPanel>
</Window>