-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMainPage.xaml
182 lines (179 loc) · 15.3 KB
/
MainPage.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
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
<Page
x:Class="PassDefend.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d">
<Grid x:Name="MainWindowGrid">
<Grid.Resources>
<Storyboard x:Name="fadeLoginBackground">
<FadeOutThemeAnimation Storyboard.TargetName="loginRectangle" SpeedRatio="0.5"/>
</Storyboard>
</Grid.Resources>
<!--TITLE BAR-->
<Grid.RowDefinitions>
<!--rendering the title bar-->
<RowDefinition Height="0" />
<RowDefinition/>
<RowDefinition Height="60" MinHeight="60" MaxHeight="60"/>
<RowDefinition Height="27" MinHeight="27" MaxHeight="27"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="266" MinWidth="266" MaxWidth="266"/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<!--END OF TITLE BAR-->
<!--APP CONTENT-->
<Rectangle x:Name="MainBackground" Fill="#FF165D43" Grid.Row="1" Grid.ColumnSpan="2" Grid.RowSpan="3"/>
<TextBlock x:Name="selectAccountText" Grid.Row="1" Grid.Column="1" TextWrapping="WrapWholeWords" Foreground="White" FontSize="25" Text="Select an account to begin
or press the + button to add an account" TextAlignment="Center" Margin="15,0,15,0" HorizontalAlignment="Center" VerticalAlignment="Center"/>
<ScrollViewer x:Name="AccountDetailScroller" Margin="0,40,0,40" Grid.Row="1" Grid.Column="1" VerticalScrollMode="Enabled" HorizontalScrollMode="Enabled">
<Grid x:Name="AccountDetailWindow" Background="#FF165D43" Height="545">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0.4*" MinWidth="300"/>
<ColumnDefinition Width="35" MinWidth="30"/>
<ColumnDefinition Width="0.5*" MinWidth="330"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="0.1*"/>
<RowDefinition/>
</Grid.RowDefinitions>
<TextBox x:Name="accountNameTextBox" Grid.Row="1" Grid.ColumnSpan="2" Margin="48,62,0,0" Text="" VerticalAlignment="Top" PlaceholderText="Enter account name" TextChanged="accountNameTextbox_TextChanged" Background="#66FFFFFF"/>
<TextBlock x:Name="accountNameText" Grid.Row="1" Margin="48,38,0,0" Text="Account name:" TextWrapping="Wrap" VerticalAlignment="Top" HorizontalAlignment="Left" Width="100"/>
<TextBlock x:Name="usernameText" Grid.Row="1" HorizontalAlignment="Left" Margin="48,163,0,0" Text="Username:" TextWrapping="Wrap" VerticalAlignment="Top" Width="82"/>
<TextBox x:Name="usernameTextBox" Grid.Row="1" Grid.ColumnSpan="2" Margin="48,187,0,0" Text="" VerticalAlignment="Top" PlaceholderText="Enter username" TextChanged="usernameTextBox_TextChanged" Background="#66FFFFFF"/>
<TextBlock x:Name="emailText" Grid.Row="1" HorizontalAlignment="Left" Margin="48,258,0,0" Text="Email:" TextWrapping="Wrap" VerticalAlignment="Top" Width="45"/>
<TextBox x:Name="emailTextBox" Grid.Row="1" Grid.ColumnSpan="2" Margin="48,282,0,0" Text="" VerticalAlignment="Top" PlaceholderText="Enter email" TextChanged="emailTextBox_TextChanged" Background="#66FFFFFF"/>
<TextBlock x:Name="passwordText" Grid.Row="1" HorizontalAlignment="Left" Margin="48,353,0,0" Text="Password:" VerticalAlignment="Top" Width="77"/>
<TextBox x:Name="passwordTextBox" Grid.Row="1" Grid.ColumnSpan="2" Margin="48,377,0,0" Text="" VerticalAlignment="Top" PlaceholderText="Enter password or generate below" TextChanged="passwordTextBox_TextChanged" Background="#66FFFFFF"/>
<TextBlock x:Name="accountNameHeader" Grid.Row="0" Foreground="White" FontSize="25" Text="New account" Margin="48,9,48,8" Grid.ColumnSpan="3"/>
<Button x:Name="copyPasswordButton" Grid.Column="1" Grid.Row="1" ToolTipService.ToolTip="Copy password to clipboard" FontFamily="Segoe MDL2 Assets" Content="" Margin="0,414,0,0" VerticalAlignment="Top" Width="35" Click="copyPasswordButton_Click" Height="32" FontSize="16" HorizontalAlignment="Center"/>
<Button x:Name="copyUsernameButton" Grid.Column="1" Grid.Row="1" ToolTipService.ToolTip="Copy username to clipboard" FontFamily="Segoe MDL2 Assets" Content="" Margin="0,224,0,0" VerticalAlignment="Top" Click="copyUsernameButton_Click" Height="32" FontSize="16" HorizontalAlignment="Center" Width="35"/>
<Button x:Name="copyEmailButton" Grid.Column="1" Grid.Row="1" ToolTipService.ToolTip="Copy email to clipboard" FontFamily="Segoe MDL2 Assets" Content="" Margin="0,319,0,0" VerticalAlignment="Top" Width="35" Click="copyEmailButton_Click" Height="32" FontSize="16" HorizontalAlignment="Center"/>
<Button x:Name="generatePasswordButton" Grid.Column="0" Grid.Row="1" Content="Generate password" Margin="48,414,0,0" VerticalAlignment="Top" Width="150" Click="copyPasswordButton_Click">
<Button.Flyout>
<Flyout x:Name="passwordGeneratorFlyout" Placement="Bottom" Opened="passwordGeneratorFlyout_Opened">
<Flyout.FlyoutPresenterStyle>
<Style TargetType="FlyoutPresenter">
<Setter Property="MinWidth" Value="200"/>
</Style>
</Flyout.FlyoutPresenterStyle>
<StackPanel>
<TextBox x:Name="generateResultBox" Text="password" Margin="0,0,0,10" MaxWidth="170" IsReadOnly="True"/>
<MenuFlyoutSeparator/>
<TextBlock Text="Length:"/>
<Slider x:Name="generateLengthSlider" Minimum="4" Maximum="100" Value="16" ValueChanged="generateLengthSlider_ValueChanged" />
<MenuFlyoutSeparator/>
<CheckBox x:Name="generateCapitalsOption" Content="Uppercase (A-Z)" IsChecked="True" Click="generateCapitalsOption_Click"/>
<CheckBox x:Name="generateLowercaseOption" Content="Lowercase (a-z)" IsChecked="True" Click="generateLowercaseOption_Click"/>
<CheckBox x:Name="generateNumbersOption" Content="Numbers (0-9)" IsChecked="True" Click="generateNumbersOption_Click"/>
<CheckBox x:Name="generateSymbolsOption" Content="Symbols" IsChecked="True" Click="generateSymbolsOption_Click"/>
<MenuFlyoutSeparator/>
<Button x:Name="regenerateGeneratedButton" Content="Regenerate password" HorizontalAlignment="Stretch" Margin="0,10,0,10" Click="regenerateGeneratedButton_Click"/>
<Button x:Name="storeGeneratedButton" Content="Use password" HorizontalAlignment="Stretch" Click="storeGeneratedButton_Click"/>
</StackPanel>
</Flyout>
</Button.Flyout>
</Button>
<TextBlock x:Name="notesText" Grid.Column="2" Grid.Row="1" HorizontalAlignment="Left" Text="Notes:" TextWrapping="Wrap" VerticalAlignment="Top" Margin="30,38,0,0"/>
<TextBox x:Name="notesTextBox" Grid.Column="2" Grid.Row="1" TextWrapping="Wrap" VerticalAlignment="Top" AcceptsReturn="True" PlaceholderText="Enter notes" TextChanged="notesTextBox_TextChanged" Background="#66FFFFFF" Margin="30,62,48,0" Height="384"/>
</Grid>
</ScrollViewer>
<Grid x:Name="StatusBar" Background="#FF1E7957" Margin="255,0,0,0" Height="27" VerticalAlignment="Bottom" Grid.Row="3" Grid.Column="0" Grid.ColumnSpan="2">
<Grid.ColumnDefinitions>
<ColumnDefinition MinWidth="400"/>
<ColumnDefinition Width="305" MaxWidth="305"/>
</Grid.ColumnDefinitions>
<TextBlock x:Name="timeSinceBreachText" Grid.Column="0" HorizontalAlignment="Left" Margin="20,0,0,0" Text="Last password breach check:" TextWrapping="Wrap" VerticalAlignment="Center" FocusVisualPrimaryBrush="Black" Foreground="#FFAAAAAA" Height="23"/>
<Button x:Name="refreshBreachCheckButton" Grid.Column="0" ToolTipService.ToolTip="Refresh breach check" FontFamily="Segoe MDL2 Assets" Content="" Height="27" Margin="334,0,0,0" Width="30" FontSize="10" Click="refreshBreachCheckButton_Click"/>
<TextBlock x:Name="breachProviderText" Grid.Column="1" TextWrapping="Wrap" TextAlignment="Right" VerticalAlignment="Center" Foreground="#FFB6B6B6" Height="23" Margin="1,0,6,0"><Run Text="Breach checking provided by HaveIBeenPwned"/><LineBreak/><Run/></TextBlock>
</Grid>
<Grid x:Name="OptionBar" Background="#FF19664A" Height="60" VerticalAlignment="Center" Grid.Row="2" Grid.Column="1">
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Width="191">
<Button x:Name="deleteEntryButton" ToolTipService.ToolTip="Delete account" FontFamily="Segoe MDL2 Assets" Content="" Height="47" IsEnabled="False" Width="50" Click="deleteEntryButton_Click" Margin="10,-2,0,0" FontSize="24"/>
<Button x:Name="revertButton" ToolTipService.ToolTip="Revert changes" FontFamily="Segoe MDL2 Assets" Content="" Height="47" Width="50" IsEnabled="False" Click="revertButton_Click" Margin="10,-2,0,0" FontSize="24"/>
<Button x:Name="saveButton" ToolTipService.ToolTip="Save account" FontFamily="Segoe MDL2 Assets" Content="" Height="47" IsEnabled="False" Width="50" Click="saveButton_Click" Margin="10,-2,0,0" FontSize="24"/>
</StackPanel>
</Grid>
<Grid x:Name="SideBar" Background="#FF26956C" MinWidth="266" HorizontalAlignment="Left" Width="266" Grid.Column="0" Grid.RowSpan="4" CornerRadius="0,12,12,0">
<ListView x:Name="accountList" Margin="0,100,0,56" Background="#FF739E8E" HorizontalAlignment="Center" Width="246" SelectionChanged="accountList_SelectionChanged">
<ListView.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Vertical">
<TextBlock Text="{Binding Name}" FontSize="20" />
<TextBlock Text="{Binding Username}" FontSize="15"/>
<TextBlock Text="{Binding Email}" FontSize="15"/>
</StackPanel>
</DataTemplate>
</ListView.ItemTemplate>
<ListView.ItemContainerStyle>
<Style TargetType="ListViewItem">
<Setter Property="Padding" Value="3"/>
<Setter Property="Margin" Value="4"/>
</Style>
</ListView.ItemContainerStyle>
</ListView>
<StackPanel x:Name="sideBarSearch" Margin="11,11,0,11" HorizontalAlignment="Left" Width="242">
<!--rendering title-->
<TextBlock Foreground="White" FontSize="25" HorizontalAlignment="Center" Text="PassDefend" FontWeight="Normal" FontStyle="Normal" Height="45"/>
<!--rendering search and add button-->
<StackPanel Orientation="Horizontal" VerticalAlignment="Top" Grid.Column="1" HorizontalAlignment="Center">
<TextBox x:Name="SearchBox" PlaceholderText="Search accounts" Margin="0,0,10,0" Width="193" TextChanged="SearchBox_TextChanged" Background="#66FFFFFF"/>
<Button x:Name="addAccountButton" ToolTipService.ToolTip="Add new account" FontFamily="Segoe MDL2 Assets" Content="" Click="addAccountButton_Click" Height="33"/>
</StackPanel>
</StackPanel>
<Button x:Name="menuButton" ToolTipService.ToolTip="Open the menu" Content="Menu" Margin="10,0,10,11" VerticalAlignment="Bottom" HorizontalAlignment="Stretch" Height="34">
<Button.Flyout>
<MenuFlyout>
<MenuFlyoutItem Text="Export database" Click="MenuFlyoutItem_Click_5" IsEnabled="False">
<MenuFlyoutItem.Icon>
<FontIcon Glyph="" />
</MenuFlyoutItem.Icon>
</MenuFlyoutItem>
<MenuFlyoutItem Text="Import database" IsEnabled="False">
<MenuFlyoutItem.Icon>
<FontIcon Glyph="" />
</MenuFlyoutItem.Icon>
</MenuFlyoutItem>
<MenuFlyoutSeparator />
<MenuFlyoutItem Text="Automatic backup settings" IsEnabled="False">
<MenuFlyoutItem.Icon>
<FontIcon Glyph="" />
</MenuFlyoutItem.Icon>
</MenuFlyoutItem>
<MenuFlyoutSeparator />
<MenuFlyoutItem Text="Reset PassDefend" Click="MenuFlyoutItem_Click_6">
<MenuFlyoutItem.Icon>
<FontIcon Glyph="" />
</MenuFlyoutItem.Icon>
</MenuFlyoutItem>
<MenuFlyoutSeparator />
<MenuFlyoutSubItem Text="Change color scheme">
<MenuFlyoutSubItem.Icon>
<FontIcon Glyph="" />
</MenuFlyoutSubItem.Icon>
<MenuFlyoutItem Text="Green" Click="MenuFlyoutItem_Click_1"/>
<MenuFlyoutItem Text="Red" Click="MenuFlyoutItem_Click_2"/>
<MenuFlyoutItem Text="Purple" Click="MenuFlyoutItem_Click_3"/>
<MenuFlyoutItem Text="Black" Click="MenuFlyoutItem_Click_4"/>
</MenuFlyoutSubItem>
<MenuFlyoutItem Text="Change master password" Click="MenuFlyoutItem_Click">
<MenuFlyoutItem.Icon>
<FontIcon Glyph="" />
</MenuFlyoutItem.Icon>
</MenuFlyoutItem>
<MenuFlyoutSeparator />
<MenuFlyoutItem x:Name="versionInfo" Text="PassDefend v" Click="versionInfo_Click">
<MenuFlyoutItem.Icon>
<FontIcon Glyph="" />
</MenuFlyoutItem.Icon>
</MenuFlyoutItem>
</MenuFlyout>
</Button.Flyout>
</Button>
</Grid>
<Rectangle x:Name="loginRectangle" Grid.Row="0" Grid.RowSpan="4" Grid.Column="0" Grid.ColumnSpan="2" Fill="#FF26956C" d:IsHidden="True"/>
<TextBlock x:Name="decryptingText" Grid.Column="0" Grid.ColumnSpan="2" Grid.Row="0" Grid.RowSpan="4" FontSize="20" HorizontalAlignment="Center" VerticalAlignment="Center" TextAlignment="Center" Margin="0,0,0,0" TextWrapping="Wrap" Text="PassDefend

Decrypting and logging in...
This should only take a second" d:IsHidden="True"/>
<!--END OF APP CONTENT-->
</Grid>
</Page>