source: trunk/CrypPlugins/KeySearcher/Presentation/Controls/LocalQuickWatchPresentation.xaml

Last change on this file was 8983, checked in by kopal, 9 months ago

Complete CrypTool 2 project

  • renamed "Cryptool" namespace to "CrypTool" namespace
File size: 4.9 KB
Line 
1<UserControl x:Class="KeySearcherPresentation.Controls.LocalQuickWatchPresentation"
2    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4    xmlns:properties="clr-namespace:KeySearcher.Properties"
5    xmlns:con="clr-namespace:KeySearcher.Converter"
6    xmlns:crypanalysisviewcontrol="clr-namespace:CrypTool.CrypAnalysisViewControl;assembly=CrypAnalysisViewControl"
7    x:Name="LocalQuickWatch">
8
9    <UserControl.Resources>
10        <con:ByteArrayToUtf8StringConverter x:Key="ByteArrayToUtf8StringConverter" />
11    </UserControl.Resources>
12
13    <crypanalysisviewcontrol:CrypAnalysisViewControl ResultHeaderCaption="{x:Static properties:Resources.Local_}" ResultListCaption="{x:Static properties:Resources.Top_Ten_}">
14        <crypanalysisviewcontrol:CrypAnalysisViewControl.ResultHeaderLabels>
15            <crypanalysisviewcontrol:ViewLabel Caption="{x:Static properties:Resources.Start_}" x:Name="StartTime" />
16            <crypanalysisviewcontrol:ViewLabel Caption="{x:Static properties:Resources.End_}" x:Name="EndTime" />
17            <crypanalysisviewcontrol:ViewLabel Caption="{x:Static properties:Resources.Elapsed_}" x:Name="ElapsedTime" />
18            <crypanalysisviewcontrol:ViewLabel Caption="{x:Static properties:Resources.Remaining_}" x:Name="TimeLeft" />
19            <crypanalysisviewcontrol:ViewLabel Caption="{x:Static properties:Resources.Tested_Bits_}" x:Name="TestedBits" />
20            <crypanalysisviewcontrol:ViewLabel Caption="{x:Static properties:Resources.Keys_Sec_}" x:Name="KeysPerSecond" />
21        </crypanalysisviewcontrol:CrypAnalysisViewControl.ResultHeaderLabels>
22
23        <crypanalysisviewcontrol:CrypAnalysisViewControl.AdditionalSections>
24            <crypanalysisviewcontrol:SectionControl SectionHeaderCaption="OpenCL" IsSectionVisible="{Binding IsOpenCLEnabled}"
25                                                    SectionHeaderBackground="#FF3B8EA4" SectionBackground="#AF73B7A6">
26                <crypanalysisviewcontrol:SectionViewLabelsControl>
27                    <crypanalysisviewcontrol:ViewLabel Caption="{Loc Keys_sec_OpenCL_}" x:Name="KeysPerSecondOpenCL" />
28                    <crypanalysisviewcontrol:ViewLabel Caption="{Loc Keys_sec_CPU_}" x:Name="KeysPerSecondCPU" />
29                    <crypanalysisviewcontrol:ViewLabel Caption="{Loc Devices_}" x:Name="Devices" />
30                    <crypanalysisviewcontrol:ViewLabel Caption="{Loc Work_Items_}" x:Name="WorkItems" />
31                    <crypanalysisviewcontrol:ViewLabel Caption="{Loc Ration_}" x:Name="Ratio" />
32                </crypanalysisviewcontrol:SectionViewLabelsControl>
33            </crypanalysisviewcontrol:SectionControl>
34        </crypanalysisviewcontrol:CrypAnalysisViewControl.AdditionalSections>
35
36        <crypanalysisviewcontrol:CrypAnalysisResultListView ItemsSource="{Binding Entries}" ResultItemAction="HandleResultItemAction">
37            <crypanalysisviewcontrol:CrypAnalysisResultListView.View>
38                <GridView>
39                    <GridViewColumn Header="#" DisplayMemberBinding="{Binding Path=Ranking}" Width="25">
40                        <GridViewColumn.CellTemplate>
41                            <DataTemplate>
42                                <Label/>
43                            </DataTemplate>
44                        </GridViewColumn.CellTemplate>
45                    </GridViewColumn>
46                    <GridViewColumn Header="{x:Static properties:Resources.Value}" DisplayMemberBinding="{Binding Path=Value}">
47                        <GridViewColumn.CellTemplate>
48                            <DataTemplate>
49                                <Label/>
50                            </DataTemplate>
51                        </GridViewColumn.CellTemplate>
52                    </GridViewColumn>
53                    <GridViewColumn Header="{x:Static properties:Resources.Key}" DisplayMemberBinding="{Binding Path=Key}">
54                        <GridViewColumn.CellTemplate>
55                            <DataTemplate>
56                                <Label/>
57                            </DataTemplate>
58                        </GridViewColumn.CellTemplate>
59                    </GridViewColumn>
60                    <GridViewColumn Header="{x:Static properties:Resources.Text}" DisplayMemberBinding="{Binding Path=Text, Converter={StaticResource ByteArrayToUtf8StringConverter}}">
61                        <GridViewColumn.CellTemplate>
62                            <DataTemplate>
63                                <Label/>
64                            </DataTemplate>
65                        </GridViewColumn.CellTemplate>
66                    </GridViewColumn>
67                </GridView>
68            </crypanalysisviewcontrol:CrypAnalysisResultListView.View>
69        </crypanalysisviewcontrol:CrypAnalysisResultListView>
70    </crypanalysisviewcontrol:CrypAnalysisViewControl>
71</UserControl>
Note: See TracBrowser for help on using the repository browser.