-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMainPage.xaml
98 lines (86 loc) · 4.9 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
<Page
x:Class="EncryptionDecryption.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:EncryptionDecryption"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d">
<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Frame x:Name="myFrame" Grid.Row="1"/>
<Image Source="Assets/background.jpg" Grid.Column="1" Stretch="UniformToFill"/>
<TextBlock Text="This is a program that makes use of the AES cryptographic Algorithm to encrypt a string of text which you and only you are able to access and decrypt and only from the same device." VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Column="1" TextWrapping="Wrap" TextAlignment="Center" Margin="0,0,0,0" FontSize="20" FontFamily="Microsoft Sans Serif" Foreground="White" SelectionHighlightColor="Black"/>
</Grid>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="*" />
<RowDefinition Height="*" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Grid Grid.Row="0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Button Grid.Column="0" Grid.Row="0" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Content="Encrypt" Click="Encrypt_Button_Click" Foreground="White" FontSize="20" RequestedTheme="Light" >
<Button.Background>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#FF1F1E1E" Offset="0.443"/>
<GradientStop Color="#FF595858" Offset="0.997"/>
</LinearGradientBrush>
</Button.Background>
</Button>
<Button Grid.Column="1" Grid.Row="0" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Content="Decrypt" Click="Decrypt_Button_Click" Foreground="White" FontSize="20" >
<Button.Background>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#FF1F1E1E" Offset="0.443"/>
<GradientStop Color="#FF595858" Offset="0.997"/>
</LinearGradientBrush>
</Button.Background>
</Button>
<Button Grid.Column="2" Grid.Row="0" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Content="Reset" Click="Reset_Button_Click" Foreground="White" FontSize="20" >
<Button.Background>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#FF1F1E1E" Offset="0.443"/>
<GradientStop Color="#FF595858" Offset="0.997"/>
</LinearGradientBrush>
</Button.Background>
</Button>
</Grid>
<StackPanel
Grid.Row="1"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Orientation="Horizontal"
Margin="-400,0,0,-220" >
<TextBlock Padding="0,5,0,0" Text="Input data" Width="120" />
<TextBox x:Name="inputData" PlaceholderText="Write a string" Height="35" Width="200"/>
</StackPanel>
<StackPanel
Grid.Row="2"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Orientation="Horizontal"
Margin="-400,0,0,0" >
<TextBlock Padding="0,5,0,0" Text="Encrypted data" Width="120" />
<TextBox x:Name="encryptedData" IsReadOnly="True" PlaceholderText="Encrypt first" Height="35" Width="200" />
</StackPanel>
<StackPanel
Grid.Row="3"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Orientation="Horizontal"
Margin="-400,-220,0,0">
<TextBlock Padding="0,5,0,0" Text="Decrypted data" Width="120" Height="32"/>
<TextBox x:Name="decryptedData" IsReadOnly="True" PlaceholderText="Decrypt first" Height="35" Width="200" />
</StackPanel>
</Grid>
</Grid>
</Page>