source: trunk/CrypPlugins/PKCS1/WpfControls/Components/SigGenKuehnControl.xaml @ 1765

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

some fixes and updated some help files

File size: 7.1 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">Max. 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                    <DockPanel Grid.Row="2">
46                    <TextBox Grid.Row="2" Name="tbIterations" Margin="5,0,5,5" HorizontalAlignment="Left" VerticalAlignment="Top" MinWidth="50">                       
47                        <Binding ElementName="This" Path="Signature.Iterations" UpdateSourceTrigger="PropertyChanged">
48                            <Binding.ValidationRules>
49                                <my:NumberValidationRule UpperBound="500000" LowerBound="0" />
50                            </Binding.ValidationRules>
51                        </Binding>
52                    </TextBox>
53                    <Image Name="btnHelpIterations" Cursor="Hand" Source="../../Resources/icons/help.png" Width="16" Height="16" HorizontalAlignment="Right" MouseLeftButtonDown="btn_Help_MouseLeftButtonDown" />
54                    </DockPanel>
55                    <TextBlock Grid.Row="3"  Foreground="Red" FontWeight="Bold" FontSize="10"
56                                Text="{Binding ElementName=tbIterations,
57                                Path=(Validation.Errors),
58                                Converter={StaticResource eToMConverter}}" />
59                </Grid>
60                <!-- right -->
61                <Grid Grid.Column="2">
62                    <Grid.RowDefinitions>
63                        <RowDefinition Height="auto" />
64                        <RowDefinition Height="*" />
65                    </Grid.RowDefinitions>
66                    <GroupBox Grid.Row="0" Header="Struktur" Name="gbStruct" Height="47" Width="200" HorizontalAlignment="Right" VerticalAlignment="Top">
67                        <Grid>
68                            <Grid.ColumnDefinitions>
69                                <ColumnDefinition Width="auto" />
70                                <ColumnDefinition Width="auto" />
71                                <ColumnDefinition Width="auto" />
72                                <ColumnDefinition Width="auto" />
73                                <ColumnDefinition Width="auto" />
74                                <ColumnDefinition Width="auto" />
75                                <ColumnDefinition Width="auto" />
76                            </Grid.ColumnDefinitions>
77                            <Label Grid.Column="0">'00'</Label>
78                            <Label Grid.Column="1">'01'</Label>
79                            <Label Grid.Column="2" Foreground="Green">PS</Label>
80                            <Label Grid.Column="3">'00'</Label>
81                            <Label Grid.Column="4" Foreground="Blue">HI</Label>
82                            <Label Grid.Column="5" Foreground="Red">HW</Label>
83                            <Label Grid.Column="6">GG</Label>
84                        </Grid>
85                    </GroupBox>
86                    <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>
87                </Grid>
88            </Grid>
89        </GroupBox>
90
91        <!-- Error -->
92        <TextBlock Grid.Row="1" Foreground="Red" FontWeight="Bold" FontSize="10" Name="tbError"></TextBlock>
93       
94        <!-- Result -->
95        <GroupBox Header="Generierte Signatur" Name="gbSigRes" Grid.Row="2" Margin="0,15,0,0">
96            <Grid>
97                <Grid.RowDefinitions >
98                    <RowDefinition Height="auto" />
99                    <RowDefinition Height="*" />
100                    <RowDefinition Height="auto" />
101                    <RowDefinition Height="*" />
102                </Grid.RowDefinitions>
103                <Label Grid.Row="0" Margin="0,0,0,0" Name="lblClearText">Unverschlüsselt</Label>
104                <Label Grid.Row="0" Margin="150,0,0,0" Name="lblSignatureLength"></Label>
105                <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>
106                <Label Grid.Row="2" Margin="0,0,0,0" Name="lblCipherText">Verschlüsselt</Label>
107                <Label Grid.Row="2" Margin="150,0,0,0" Name="lblEncryptedSignatureLength"></Label>
108                <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>
109            </Grid>
110        </GroupBox>
111    </Grid>
112</UserControl>
Note: See TracBrowser for help on using the repository browser.