-
Notifications
You must be signed in to change notification settings - Fork 0
/
KuznechikManager.xaml
124 lines (124 loc) · 5.03 KB
/
KuznechikManager.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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
<Window x:Class="InformationSecurity.KuznechikManager"
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:InformationSecurity"
mc:Ignorable="d"
Title="Лабка ИБ — Шифрование Кузнечиком" Height="450" Width="800">
<Grid Margin="10">
<Grid.RowDefinitions>
<RowDefinition Height="auto"/>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<StackPanel
Grid.Row="0"
Orientation="Horizontal"
HorizontalAlignment="Stretch"
>
<Button
x:Name="btnSave"
VerticalAlignment="Top"
HorizontalAlignment="Stretch"
Content="Сохранить изменения таблицы"
Click="btnSave_Click"
/>
<Button
x:Name="btnReturn"
VerticalAlignment="Top"
HorizontalAlignment="Stretch"
Margin="5,0,0,0"
Content="Выйти"
Click="btnReturn_Click"
/>
</StackPanel>
<DataGrid
Grid.Row="1"
VerticalScrollBarVisibility="Auto"
VerticalAlignment="Top"
AutoGenerateColumns="False"
IsTextSearchEnabled="True"
CanUserDeleteRows="False"
CanUserAddRows="False"
CanUserSortColumns="True"
x:Name="dgData"
>
<DataGrid.Columns>
<DataGridTextColumn x:Name="clmLogin" Binding="{Binding user, UpdateSourceTrigger=PropertyChanged}" Header="Логин"/>
<DataGridTextColumn IsReadOnly="True" Binding="{Binding first_key, UpdateSourceTrigger=PropertyChanged}" Header="1ый ключ"/>
<DataGridTextColumn IsReadOnly="True" Binding="{Binding second_key, UpdateSourceTrigger=PropertyChanged}" Header="2ой ключ"/>
<DataGridTextColumn IsReadOnly="True" Binding="{Binding message, UpdateSourceTrigger=PropertyChanged}" Header="Сообщение"/>
<DataGridTextColumn IsReadOnly="True" Binding="{Binding cipher, UpdateSourceTrigger=PropertyChanged}" Header="Шифр"/>
</DataGrid.Columns>
</DataGrid>
<StackPanel
Grid.Row="2"
VerticalAlignment="Bottom"
>
<StackPanel
Orientation="Horizontal"
HorizontalAlignment="Stretch" >
<Button
Content="Шифровать"
x:Name="btnCipher"
Click="btnCipher_Click"
/>
<Button
Content="Дешифровать"
Margin="5,0,0,0"
x:Name="btnDecipher"
Click="btnDecipher_Click"
/>
<Button
Content="Сохранить данные в таблицу"
Margin="5,0,0,0"
x:Name="btnSaveToTable"
Click="btnSaveToTable_Click"
/>
<Button
Margin="5,0,0,0"
Content="Указать все ключи"
x:Name="btnSetAllKeys"
Click="btnSetAllKeys_Click"
/>
</StackPanel>
<TextBox
x:Name="txtKey1"
Text="1-ый ключ"
ToolTip="1-ый ключ"
GotFocus="TextBox_GotFocus"
LostFocus="TextBox_LostFocus"
/>
<TextBox
x:Name="txtKey2"
Text="2-ой ключ"
ToolTip="2-ой ключ"
GotFocus="TextBox_GotFocus"
LostFocus="TextBox_LostFocus"
/>
<ScrollViewer CanContentScroll="True" Height="60">
<TextBox
x:Name="txtInput"
VerticalAlignment="Stretch"
TextWrapping="Wrap"
Text="Текст"
ToolTip="Текст"
GotFocus="TextBox_GotFocus"
LostFocus="TextBox_LostFocus"
/>
</ScrollViewer>
<ScrollViewer CanContentScroll="True" Height="60">
<TextBox
x:Name="txtOutput"
VerticalAlignment="Stretch"
TextWrapping="Wrap"
Text="Шифр"
ToolTip="Шифр"
GotFocus="TextBox_GotFocus"
LostFocus="TextBox_LostFocus"
/>
</ScrollViewer>
</StackPanel>
</Grid>
</Window>