-
Notifications
You must be signed in to change notification settings - Fork 0
/
settingsWindow.xaml
63 lines (61 loc) · 7.93 KB
/
settingsWindow.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<Window x:Class="WpfWebRTCPlayer.settingsWindow"
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:WpfWebRTCPlayer"
xmlns:c="clr-namespace:CalcBinding;assembly=CalcBinding"
xmlns:ui="http://schemas.modernwpf.com/2019"
ui:WindowHelper.UseModernWindowStyle="True"
xmlns:properties="clr-namespace:WpfWebRTCPlayer.Properties"
mc:Ignorable="d"
Title="Settings" Width="450" Height="350"
WindowStartupLocation="CenterScreen" Topmost="True" ShowInTaskbar="False" ResizeMode="NoResize"
Closed="Window_Closed" Loaded="Window_Loaded">
<Grid>
<StackPanel Orientation="Horizontal" Margin="0,12,0,0" VerticalAlignment="Top" HorizontalAlignment="Center">
<ui:SymbolIcon Symbol="Setting" Margin="5,5,5,0"/>
<TextBlock Text="Settings" FontSize="22" FontWeight="Bold"/>
</StackPanel>
<StackPanel Margin="0,55,0,0" VerticalAlignment="Top" HorizontalAlignment="Center">
<DockPanel Margin="0,0,0,5" VerticalAlignment="Top">
<CheckBox x:Name="chk_autoOpenEnable" Margin="5,2,5,0" Content="#1 Show Display at:" IsChecked="{Binding Source={x:Static properties:Settings.Default}, Path=set_openEnable, Mode=TwoWay}"/>
<ui:NumberBox x:Name="txt_autoOpenHour" Text="{Binding Source={x:Static properties:Settings.Default}, Path=set_openHour, Mode=TwoWay}" IsEnabled="{c:Binding Source={x:Static properties:Settings.Default}, Path=!set_openEnable, Mode=OneWay}" Minimum="0" Maximum="23" SpinButtonPlacementMode="Compact"/>
<TextBlock Text=" : " VerticalAlignment="Center"/>
<ui:NumberBox x:Name="txt_autoOpenMinute" Text="{Binding Source={x:Static properties:Settings.Default}, Path=set_openMinute, Mode=TwoWay}" IsEnabled="{c:Binding Source={x:Static properties:Settings.Default}, Path=!set_openEnable, Mode=OneWay}" HorizontalAlignment="Left" Minimum="0" Maximum="59" SpinButtonPlacementMode="Compact"/>
<CheckBox x:Name="chk_autoOpenJustPlayer" Margin="6,2,3,0" Content="Just Player" IsChecked="{Binding Source={x:Static properties:Settings.Default}, Path=set_openJustPlayer, Mode=TwoWay}" IsEnabled="{c:Binding Source={x:Static properties:Settings.Default}, Path=!set_openEnable, Mode=OneWay}"/>
</DockPanel>
<DockPanel Margin="0,0,0,5" VerticalAlignment="Top">
<CheckBox x:Name="chk_autoCloseEnable" Margin="5,2,5,0" Content="#1 Hide Display at:" IsChecked="{Binding Source={x:Static properties:Settings.Default}, Path=set_closeEnable, Mode=TwoWay}"/>
<ui:NumberBox x:Name="txt_autoCloseHour" Text="{Binding Source={x:Static properties:Settings.Default}, Path=set_closeHour, Mode=TwoWay}" IsEnabled="{c:Binding Source={x:Static properties:Settings.Default}, Path=!set_closeEnable, Mode=OneWay}" Minimum="0" Maximum="23" SpinButtonPlacementMode="Compact"/>
<TextBlock Text=" : " VerticalAlignment="Center"/>
<ui:NumberBox x:Name="txt_autoCloseMinute" Text="{Binding Source={x:Static properties:Settings.Default}, Path=set_closeMinute, Mode=TwoWay}" IsEnabled="{c:Binding Source={x:Static properties:Settings.Default}, Path=!set_closeEnable, Mode=OneWay}" HorizontalAlignment="Left" Minimum="0" Maximum="59" SpinButtonPlacementMode="Compact"/>
<CheckBox x:Name="chk_autocloseExit" Margin="6,2,3,0" Content="and Exit" IsChecked="{Binding Source={x:Static properties:Settings.Default}, Path=set_closeExit, Mode=TwoWay}" IsEnabled="{c:Binding Source={x:Static properties:Settings.Default}, Path=!set_closeEnable, Mode=OneWay}"/>
</DockPanel>
<DockPanel Margin="0,10,0,5" VerticalAlignment="Top">
<CheckBox x:Name="chk_autoOpen2Enable" Margin="5,2,5,0" Content="#2 Show Display at:" IsChecked="{Binding Source={x:Static properties:Settings.Default}, Path=set_open2Enable, Mode=TwoWay}"/>
<ui:NumberBox x:Name="txt_autoOpen2Hour" Text="{Binding Source={x:Static properties:Settings.Default}, Path=set_open2Hour, Mode=TwoWay}" IsEnabled="{c:Binding Source={x:Static properties:Settings.Default}, Path=!set_open2Enable, Mode=OneWay}" Minimum="0" Maximum="23" SpinButtonPlacementMode="Compact"/>
<TextBlock Text=" : " VerticalAlignment="Center"/>
<ui:NumberBox x:Name="txt_autoOpen2Minute" Text="{Binding Source={x:Static properties:Settings.Default}, Path=set_open2Minute, Mode=TwoWay}" IsEnabled="{c:Binding Source={x:Static properties:Settings.Default}, Path=!set_open2Enable, Mode=OneWay}" HorizontalAlignment="Left" Minimum="0" Maximum="59" SpinButtonPlacementMode="Compact"/>
<CheckBox x:Name="chk_autoOpen2JustPlayer" Margin="6,2,3,0" Content="Just Player" IsChecked="{Binding Source={x:Static properties:Settings.Default}, Path=set_open2JustPlayer, Mode=TwoWay}" IsEnabled="{c:Binding Source={x:Static properties:Settings.Default}, Path=!set_open2Enable, Mode=OneWay}"/>
</DockPanel>
<DockPanel Margin="0,0,0,5" VerticalAlignment="Top">
<CheckBox x:Name="chk_autoClose2Enable" Margin="5,2,5,0" Content="#2 Hide Display at:" IsChecked="{Binding Source={x:Static properties:Settings.Default}, Path=set_close2Enable, Mode=TwoWay}"/>
<ui:NumberBox x:Name="txt_autoClose2Hour" Text="{Binding Source={x:Static properties:Settings.Default}, Path=set_close2Hour, Mode=TwoWay}" IsEnabled="{c:Binding Source={x:Static properties:Settings.Default}, Path=!set_close2Enable, Mode=OneWay}" Minimum="0" Maximum="23" SpinButtonPlacementMode="Compact"/>
<TextBlock Text=" : " VerticalAlignment="Center"/>
<ui:NumberBox x:Name="txt_autoClose2Minute" Text="{Binding Source={x:Static properties:Settings.Default}, Path=set_close2Minute, Mode=TwoWay}" IsEnabled="{c:Binding Source={x:Static properties:Settings.Default}, Path=!set_close2Enable, Mode=OneWay}" HorizontalAlignment="Left" Minimum="0" Maximum="59" SpinButtonPlacementMode="Compact"/>
<CheckBox x:Name="chk_autoclose2Exit" Margin="6,2,3,0" Content="and Exit" IsChecked="{Binding Source={x:Static properties:Settings.Default}, Path=set_close2Exit, Mode=TwoWay}" IsEnabled="{c:Binding Source={x:Static properties:Settings.Default}, Path=!set_close2Enable, Mode=OneWay}"/>
</DockPanel>
<DockPanel Margin="0,10,0,5" VerticalAlignment="Top">
<ui:ToggleSwitch x:Name="chk_autorunEnable" Margin="5,2,5,0" OnContent="Start App on Windows startup" OffContent="Start App on Windows startup" IsOn="{Binding Source={x:Static properties:Settings.Default}, Path=set_autorunEnable, Mode=TwoWay}" Toggled="autorunCheck"/>
<ui:ToggleSwitch x:Name="chk_playAuto" Margin="6,0,0,0" OnContent="Play on Start" OffContent="Play on Start" IsOn="{Binding Source={x:Static properties:Settings.Default}, Path=set_playAuto, Mode=TwoWay}"/>
</DockPanel>
<DockPanel Margin="0,0,0,0" VerticalAlignment="Top">
<TextBlock Text="Player Box: " FontWeight="DemiBold" VerticalAlignment="Center" FontSize="14" Margin="5,0,0,0"/>
<ui:NumberBox x:Name="txt_width" Minimum="0" Maximum="5000" Text="{c:Binding Source={x:Static properties:Settings.Default}, Path=set_playerWidth, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" SpinButtonPlacementMode="Compact" PlaceholderText="Width"/>
<TextBlock Text=" x " VerticalAlignment="Center"/>
<ui:NumberBox x:Name="txt_height" Minimum="0" Maximum="5000" Text="{c:Binding Source={x:Static properties:Settings.Default}, Path=set_playerHeight, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" HorizontalAlignment="Left" SpinButtonPlacementMode="Compact" PlaceholderText="Height"/>
</DockPanel>
</StackPanel>
</Grid>
</Window>