-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAccountView.xaml
More file actions
196 lines (195 loc) Β· 10.8 KB
/
AccountView.xaml
File metadata and controls
196 lines (195 loc) Β· 10.8 KB
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
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
ο»Ώ<UserControl x:Class="Upsilon.Apps.Passkey.GUI.WPF.Views.Controls.AccountView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:Upsilon.Apps.Passkey.GUI.WPF.Views.Controls"
xmlns:controls="clr-namespace:Upsilon.Apps.Passkey.GUI.WPF.ViewModels.Controls"
d:DataContext="{d:DesignInstance Type=controls:AccountViewModel}"
mc:Ignorable="d">
<DockPanel VerticalAlignment="Stretch">
<GroupBox Header="{Binding AccountId}"
DockPanel.Dock="Top">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<Label Grid.Row="0"
Grid.Column="0"
Content="Label : "/>
<Button Grid.Row="0"
Grid.Column="2"
Content="π"
Click="_viewActivities_Button_Click"/>
<TextBox Grid.Row="0"
Grid.Column="1"
Text="{Binding Label, Mode=TwoWay}"
Background="{Binding LabelBackground}"/>
<Grid Grid.Row="1"
Grid.Column="0"
Grid.ColumnSpan="3">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="3*"/>
</Grid.ColumnDefinitions>
<GroupBox Header="Identifiers"
Grid.Column="0">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<ListBox Grid.Row="0"
Grid.Column="0"
Grid.ColumnSpan="6"
HorizontalContentAlignment="Stretch"
Name="_identifiers_LB">
<ListBox.ItemTemplate>
<DataTemplate>
<TextBox Background="{Binding IdentifierBackground}"
Text="{Binding Identifier, Mode=TwoWay}"
KeyUp="_identifier_TextBox_KeyUp"/>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
<Button Grid.Row="1"
Grid.Column="0"
Content="+"
Click="_addButton_Click"/>
<Button Grid.Row="1"
Grid.Column="1"
Content="π "
Click="_identifier_UpClicked"/>
<Button Grid.Row="1"
Grid.Column="2"
Click="_identifier_DownClicked"
Content="π "/>
<Button Grid.Row="1"
Grid.Column="3"
Click="_identifier_DeleteClicked"
Content="β"/>
<Button Grid.Row="1"
Grid.Column="4"
Content="π"
Click="_copyIdentifier_Clicked"/>
<Button Grid.Row="1"
Grid.Column="5"
Content="β£"
Click="_showQrCodeIdentifier_Clicked"/>
</Grid>
</GroupBox>
<GroupBox Header="Password"
Grid.Column="1">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<local:VisiblePasswordBox x:Name="_password_VPB"
Grid.Row="0"
Grid.Column="0"
Margin="5"
Background="{Binding PasswordBackground}"
Validated="_password_VPB_Validated"/>
<Button Grid.Row="0"
Grid.Column="1"
Content="π"
Click="_copyPassword_Clicked"/>
<Button Grid.Row="0"
Grid.Column="2"
Content="β£"
Click="_showQrCodePassword_Clicked"/>
<ListBox Grid.Row="1"
Grid.Column="0"
Grid.ColumnSpan="3"
HorizontalContentAlignment="Stretch"
Name="_passwords_LB">
<ListBox.ItemTemplate>
<DataTemplate>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<Label Grid.Column="0"
Content="{Binding UpdateDate}"
Background="Transparent"/>
<local:VisiblePasswordBox Grid.Column="1"
Margin="5"
MinWidth="230"
ReadOnly="True"
Loaded="_passwords_VPB_Loaded"/>
<Button Grid.Column="2"
Content="π"
Click="_copyPasswords_Clicked"/>
<Button Grid.Column="3"
Content="β£"
Click="_showQrCodePasswords_Clicked"/>
</Grid>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</Grid>
</GroupBox>
</Grid>
<Label Grid.Row="2"
Grid.Column="0"
Content="Notes : "/>
<TextBox Grid.Row="2"
Grid.Column="1"
Grid.ColumnSpan="2"
Text="{Binding Notes, Mode=TwoWay}"
Background="{Binding NotesBackground}"
MaxHeight="75"
VerticalScrollBarVisibility="Auto"
AcceptsReturn="True"
AcceptsTab="True"/>
<GroupBox Header="Options"
Grid.Row="3"
Grid.Column="0"
Grid.ColumnSpan="3">
<StackPanel>
<StackPanel Orientation="Horizontal">
<CheckBox IsChecked="{Binding RemindPasswordUpdate}"
Content="Remind to update password every"/>
<TextBox Width="25"
HorizontalContentAlignment="Center"
TextChanged="_value_TextBox_TextChanged"
PreviewTextInput="_value_TextBox_PreviewTextInput"
DataObject.Pasting="_value_TextBox_Pasting"
Text="{Binding RemindPasswordUpdateDelay, Mode=TwoWay}"/>
<Label Margin="0">months.</Label>
</StackPanel>
<StackPanel Orientation="Horizontal">
<CheckBox IsChecked="{Binding WarnPasswordLeak}">Warn if the password leaked.</CheckBox>
<CheckBox IsChecked="{Binding WarnIfDuplicatedPassword}">Warn if the password is same as another account's password.</CheckBox>
</StackPanel>
</StackPanel>
</GroupBox>
</Grid>
</GroupBox>
</DockPanel>
</UserControl>