-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
SAM_SEKeyStoreToolsControl.xaml
99 lines (99 loc) · 7.07 KB
/
SAM_SEKeyStoreToolsControl.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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
<UserControl x:Class="Leosac.KeyManager.Library.KeyStore.SAM_SE.UI.SAM_SEKeyStoreToolsControl"
xmlns="https://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="https://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="https://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="https://schemas.microsoft.com/expression/blend/2008"
xmlns:domain="clr-namespace:Leosac.KeyManager.Library.KeyStore.SAM_SE.UI.Domain"
xmlns:libui="clr-namespace:Leosac.KeyManager.Library.UI;assembly=KeyManager.Library.UI"
xmlns:local="clr-namespace:Leosac.KeyManager.Library.KeyStore.SAM_SE.UI"
xmlns:materialDesign="https://materialdesigninxaml.net/winfx/xaml/themes"
xmlns:properties="clr-namespace:Leosac.KeyManager.Library.KeyStore.SAM_SE.UI.Properties"
xmlns:wpfappctrls="clr-namespace:Leosac.WpfApp.Controls;assembly=WpfApp"
mc:Ignorable="d"
d:DataContext="{d:DesignInstance domain:SAM_SEKeyStoreToolsControlViewModel}"
d:DesignHeight="450" d:DesignWidth="800">
<UserControl.Resources>
<materialDesign:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />
</UserControl.Resources>
<StackPanel Orientation="Vertical">
<materialDesign:Card Margin="5">
<Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<Expander Grid.Row="0" HorizontalAlignment="Stretch" HorizontalContentAlignment="Center"
IsExpanded="{Binding DefaultExpanderExpanded}"
Header="{x:Static properties:Resources.ToolsUpdateDefault}">
<Grid>
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<WrapPanel Grid.Row="0" Orientation="Vertical" HorizontalAlignment="Center" Margin="24,8,24,16"
TextBlock.Foreground="{DynamicResource MaterialDesignBody}">
<Button Content="{x:Static properties:Resources.ToolsSecurEvoDefault}"
Command="{Binding SAM_SEDefaultConfigFileCommand}"
Margin="5" />
</WrapPanel>
<Grid Grid.Row="1" Margin="0,0,0,10" MaxWidth="700">
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<TextBlock Grid.Row="0" Text="{x:Static properties:Resources.ToolsWarningDefaultFile}" Foreground="OrangeRed" TextWrapping="WrapWithOverflow"/>
<TextBlock Grid.Row="1" Text="{x:Static properties:Resources.ToolsSummary}" FontWeight="Bold" Foreground="Green"/>
<StackPanel Grid.Row="2" Orientation="Horizontal" Margin="28,0,0,0">
<TextBlock Text="{x:Static properties:Resources.ToolsConfFileConf1}" FontWeight="DemiBold"/>
<TextBlock Text="{Binding Configuration1}"/>
</StackPanel>
<StackPanel Grid.Row="3" Orientation="Horizontal" Margin="28,0,0,0" Visibility="{Binding Configuration2Displayed, Converter={StaticResource BooleanToVisibilityConverter}}">
<TextBlock Text="{x:Static properties:Resources.ToolsConfFileConf2}" FontWeight="DemiBold"/>
<TextBlock Text="{Binding Configuration2}"/>
</StackPanel>
<StackPanel Grid.Row="4" Orientation="Horizontal" Margin="28,0,0,0" Visibility="{Binding Configuration3Displayed, Converter={StaticResource BooleanToVisibilityConverter}}">
<TextBlock Text="{x:Static properties:Resources.ToolsConfFileConf3}" FontWeight="DemiBold"/>
<TextBlock Text="{Binding Configuration3}"/>
</StackPanel>
<StackPanel Grid.Row="5" Orientation="Horizontal" Margin="28,0,0,0" Visibility="{Binding Configuration4Displayed, Converter={StaticResource BooleanToVisibilityConverter}}">
<TextBlock Text="{x:Static properties:Resources.ToolsConfFileConf4}" FontWeight="DemiBold"/>
<TextBlock Text="{Binding Configuration4}"/>
</StackPanel>
</Grid>
</Grid>
</Expander>
<Expander Grid.Row="1" HorizontalAlignment="Stretch" HorizontalContentAlignment="Center"
IsExpanded="{Binding LockedLevelExpanded}"
Header="{x:Static properties:Resources.ToolsLockUnlock}">
<WrapPanel Orientation="Vertical" TextBlock.Foreground="{DynamicResource MaterialDesignBody}" Margin="24,8,24,16">
<Grid Margin="-120,0,-120,10">
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<TextBlock Text="{x:Static properties:Resources.ToolsLockKeyShort}" Grid.Column="0" HorizontalAlignment="Center"/>
<TextBlock Text="{x:Static properties:Resources.ToolsLockDefaultShort}" Grid.Column="1" HorizontalAlignment="Center"/>
<TextBlock Text="{x:Static properties:Resources.ToolsLockAdvancedShort}" Grid.Column="2" HorizontalAlignment="Center"/>
</Grid>
<Slider Value="{Binding SAM_SEKeyStore.Properties.Locked, Mode=TwoWay}" Width="500"
Minimum="{Binding LockedMin}"
Maximum="{Binding LockedMax}"
SmallChange="1" TickFrequency="1" TickPlacement="TopLeft">
</Slider>
<TextBlock Text="{Binding SAM_SEKeyStore.Properties.LockedLevelString}" Margin="0,15,0,5"/>
<WrapPanel HorizontalAlignment="Center" Margin="0,5,0,0">
<Button Content="{x:Static properties:Resources.Update}"
Command="{Binding SAM_SELockCommand}"
Margin="5" />
</WrapPanel>
</WrapPanel>
</Expander>
</Grid>
</materialDesign:Card>
</StackPanel>
</UserControl>