source: trunk/PKCS1/WpfControls/Components/SigGenKuehnControl.xaml @ 1743

Last change on this file since 1743 was 1743, checked in by schomburg, 11 years ago

Limitation on Kuehn Signature Generation editable by User
beta version of helpfile Gen_Kuehn_Sig_Tab.html

File size: 6.8 KB
Line 
1<UserControl x:Class="PKCS1.WpfControls.Components.SigGenKuehnControl" x:Name="This"
2    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4    xmlns:my="clr-namespace:PKCS1.WpfResources"
5    xmlns:lib="clr-namespace:PKCS1.Library"
6    VerticalAlignment="Stretch" HorizontalAlignment="Stretch">
7    <UserControl.Resources>
8        <my:ErrorsToMessageConverter x:Key="eToMConverter" />
9    </UserControl.Resources>
10    <Grid>
11        <Grid.RowDefinitions>
12            <RowDefinition Height="auto" />
13            <RowDefinition Height="auto" />
14            <RowDefinition Height="*" />
15        </Grid.RowDefinitions>
16        <!-- Generate Signature -->
17        <GroupBox Header="Signatur generieren" Name="gbSigGen" Grid.Row="0">
18            <Grid>
19                <Grid.ColumnDefinitions>
20                    <ColumnDefinition Width="auto" />
21                    <ColumnDefinition Width="auto" />
22                    <ColumnDefinition Width="*" />
23                </Grid.ColumnDefinitions>
24                <!-- left -->
25                <Grid Grid.Column="0">
26                    <Grid.RowDefinitions>
27                        <RowDefinition Height="auto" />
28                        <RowDefinition Height="auto" />
29                        <RowDefinition Height="*" />
30                    </Grid.RowDefinitions>
31                    <Label Grid.Row="0" Name="lblRsaKeySize" Margin="5,0,5,5" HorizontalAlignment="Left" VerticalAlignment="Top">RSA-Schlüsselgröße (in Bit):</Label>
32                    <Label Grid.Row="1" Name="lblPublicKey" Margin="5,0,5,5" HorizontalAlignment="Left" VerticalAlignment="Top">Öffentlicher Schlüssel:</Label>
33                    <Label Grid.Row="2" Name="lblIterations" Margin="5,0,5,5" HorizontalAlignment="Left" VerticalAlignment="Top">Anzahl an Iterationen:</Label>
34                </Grid>
35                <!-- middle -->
36                <Grid Grid.Column="1">
37                    <Grid.RowDefinitions>
38                        <RowDefinition Height="auto" />
39                        <RowDefinition Height="auto" />
40                        <RowDefinition Height="auto" />
41                        <RowDefinition Height="*" />
42                    </Grid.RowDefinitions>
43                    <Label Grid.Row="0" Name="lblRsaKeySizeRes" Margin="5,0,5,5" HorizontalAlignment="Left" VerticalAlignment="Top" MinWidth="50" MaxWidth="150"></Label>
44                    <Label Grid.Row="1" Name="lblPublicKeyRes" Margin="5,0,5,5" HorizontalAlignment="Left" VerticalAlignment="Top" MinWidth="50" MaxWidth="150"></Label>
45                    <TextBox Grid.Row="2" Name="tbIterations" Margin="5,0,5,5" HorizontalAlignment="Left" VerticalAlignment="Top" MinWidth="50">                       
46                        <Binding ElementName="This" Path="Signature.Iterations" UpdateSourceTrigger="PropertyChanged">
47                            <Binding.ValidationRules>
48                                <my:NumberValidationRule UpperBound="500000" LowerBound="0" />
49                            </Binding.ValidationRules>
50                        </Binding>
51                    </TextBox>
52                    <TextBlock Grid.Row="3"  Foreground="Red" FontWeight="Bold" FontSize="10"
53                                Text="{Binding ElementName=tbIterations,
54                                Path=(Validation.Errors),
55                                Converter={StaticResource eToMConverter}}" />
56                </Grid>
57                <!-- right -->
58                <Grid Grid.Column="2">
59                    <Grid.RowDefinitions>
60                        <RowDefinition Height="auto" />
61                        <RowDefinition Height="*" />
62                    </Grid.RowDefinitions>
63                    <GroupBox Grid.Row="0" Header="Struktur" Name="gbStruct" Height="47" Width="200" HorizontalAlignment="Right" VerticalAlignment="Top">
64                        <Grid>
65                            <Grid.ColumnDefinitions>
66                                <ColumnDefinition Width="auto" />
67                                <ColumnDefinition Width="auto" />
68                                <ColumnDefinition Width="auto" />
69                                <ColumnDefinition Width="auto" />
70                                <ColumnDefinition Width="auto" />
71                                <ColumnDefinition Width="auto" />
72                                <ColumnDefinition Width="auto" />
73                            </Grid.ColumnDefinitions>
74                            <Label Grid.Column="0">'00'</Label>
75                            <Label Grid.Column="1">'01'</Label>
76                            <Label Grid.Column="2" Foreground="Green">PS</Label>
77                            <Label Grid.Column="3">'00'</Label>
78                            <Label Grid.Column="4" Foreground="Blue">HI</Label>
79                            <Label Grid.Column="5" Foreground="Red">HW</Label>
80                            <Label Grid.Column="6">GG</Label>
81                        </Grid>
82                    </GroupBox>
83                    <Button Grid.Row="1" Name="bExecute" Margin="5,5,5,5" Click="bExecute_Click" Height="25" HorizontalAlignment="Right" VerticalAlignment="Bottom" MinWidth="100">Gefälschte Signatur generieren</Button>
84                </Grid>
85            </Grid>
86        </GroupBox>
87
88        <!-- Error -->
89        <TextBlock Grid.Row="1" Foreground="Red" FontWeight="Bold" FontSize="10" Name="tbError"></TextBlock>
90       
91        <!-- Result -->
92        <GroupBox Header="Generierte Signatur" Name="gbSigRes" Grid.Row="2" Margin="0,15,0,0">
93            <Grid>
94                <Grid.RowDefinitions >
95                    <RowDefinition Height="auto" />
96                    <RowDefinition Height="*" />
97                    <RowDefinition Height="auto" />
98                    <RowDefinition Height="*" />
99                </Grid.RowDefinitions>
100                <Label Grid.Row="0" Margin="0,0,0,0" Name="lblClearText">Unverschlüsselt</Label>
101                <Label Grid.Row="0" Margin="150,0,0,0" Name="lblSignatureLength"></Label>
102                <RichTextBox Grid.Row="1" Name="rtbResult" MinHeight="80" IsReadOnly="True" Margin="5,5,5,5" MaxWidth="450" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch" TextChanged="rtbResult_TextChanged"></RichTextBox>
103                <Label Grid.Row="2" Margin="0,0,0,0" Name="lblCipherText">Verschlüsselt</Label>
104                <Label Grid.Row="2" Margin="150,0,0,0" Name="lblEncryptedSignatureLength"></Label>
105                <TextBox Grid.Row="3" Name="tbResultEncrypted" TextWrapping="Wrap" MinHeight="80" IsReadOnly="True" Margin="5,5,5,5" MaxWidth="450" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch" TextChanged="tbResultEncrypted_TextChanged"></TextBox>
106            </Grid>
107        </GroupBox>
108    </Grid>
109</UserControl>
Note: See TracBrowser for help on using the repository browser.