source: trunk/CrypPlugins/PeerToPeerManager_NEW/P2PManagerPresentation.xaml @ 1178

Last change on this file since 1178 was 1178, checked in by arnold, 12 years ago

P2PManager: Added a job distribution Expander in the QuickWatchPresentation
Bug fixes: Cyclic Register-Message-Sending, Allocating more than one job to each worker

File size: 8.4 KB
Line 
1<UserControl x:Class="Cryptool.Plugins.PeerToPeer.P2PManagerPresentation"
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:Cryptool.Plugins.PeerToPeer"
5    HorizontalAlignment="Stretch"
6    VerticalAlignment="Stretch"
7    Name="MngrMain"
8    Background="LightBlue"
9    MinHeight="150" MinWidth="100"
10    Height="Auto" Width="Auto">
11
12    <Canvas Name="Canvas" VerticalAlignment="Stretch" HorizontalAlignment="Stretch">
13        <Grid Name="Grid1" VerticalAlignment="Stretch" HorizontalAlignment="Stretch">
14            <Grid.RowDefinitions>
15                <RowDefinition Height="Auto"/>
16                <RowDefinition Height="Auto"/>
17                <RowDefinition Height="Auto"/>
18                <RowDefinition Height="Auto"/>
19            </Grid.RowDefinitions>
20            <Grid.ColumnDefinitions>
21                <ColumnDefinition Width="14*"/>
22                <ColumnDefinition Width="139.16*" />
23            </Grid.ColumnDefinitions>
24
25            <Expander Name="Expander_JobStatus" Header="Job Status Info" IsExpanded="True" FontSize="10">
26                <Grid Name="JobGrid">
27                    <Grid.RowDefinitions>
28                        <RowDefinition/>
29                        <RowDefinition/>
30                        <RowDefinition/>
31                        <RowDefinition/>
32                    </Grid.RowDefinitions>
33                    <Grid.ColumnDefinitions>
34                        <ColumnDefinition Width="Auto"/>
35                        <ColumnDefinition MinWidth="20" Width="Auto"/>
36                        <ColumnDefinition Width="Auto"/>
37                    </Grid.ColumnDefinitions>
38
39                    <Grid Grid.Row="0" Grid.Column="2" Grid.RowSpan="4">
40                        <Grid.RowDefinitions>
41                            <RowDefinition/>
42                            <RowDefinition/>
43                            <RowDefinition/>
44                            <RowDefinition/>
45                        </Grid.RowDefinitions>
46                        <Grid.ColumnDefinitions>
47                            <ColumnDefinition/>
48                        </Grid.ColumnDefinitions>
49
50                        <Label Grid.Row="0" Grid.Column="0" FontSize="10" FontWeight="Bold" VerticalContentAlignment="Bottom"
51                           VerticalAlignment="Top" HorizontalContentAlignment="Center" >Total Progress:</Label>
52                        <TextBox Name="txtProgressInPercent" Grid.Row="1" Grid.Column="0" TextAlignment="Center"
53                             IsReadOnly="True" TextWrapping="WrapWithOverflow" FontSize="8" FontWeight="Bold"
54                             BorderThickness="0" VerticalContentAlignment="Top" HorizontalContentAlignment="Center" Background="Transparent"/>
55                        <!--<Label Name="txtProgressInPercent" Grid.Row="1" Grid.Column="0" HorizontalContentAlignment="Center" VerticalContentAlignment="Top"
56                               VerticalAlignment="Top" FontWeight="Bold" FontSize="8">0,00%</Label>-->
57
58                        <Label Grid.Row="2" Grid.Column="0" FontSize="10" FontWeight="Bold" FontStyle="Italic" VerticalContentAlignment="Bottom"
59                           VerticalAlignment="Top" HorizontalContentAlignment="Center" >Estimated end time:</Label>
60                        <TextBox Name="txtEstimatedEndTime" Text="no finished jobs" Grid.Row="3" Grid.Column="0" TextAlignment="Center"
61                             IsReadOnly="True" TextWrapping="WrapWithOverflow" FontSize="8" FontWeight="Bold"
62                             BorderThickness="0" VerticalContentAlignment="Top" HorizontalContentAlignment="Center" Background="Transparent"/>
63                    </Grid>
64
65                    <Label Grid.Row="0" Grid.Column="0" FontSize="8" FontWeight="Bold" VerticalAlignment="Top" Height="23" Width="AUTO">Total:</Label>
66                    <TextBox Name="txtTotal" Grid.Row="0" Grid.Column="1" TextAlignment="Left"
67                     IsReadOnly="True" TextWrapping="WrapWithOverflow" VerticalAlignment="Top"
68                     Height="23" FontSize="8" FontWeight="Bold" BorderThickness="1" Background="Transparent" />
69
70                    <Label Grid.Row="1" Grid.Column="0" FontSize="8" Background="LightGray" VerticalAlignment="Top" Height="23" Width="AUTO">In Progress:</Label>
71                    <TextBox Name="txtInProgress" Grid.Row="1" Grid.Column="1" TextAlignment="Left"
72                     IsReadOnly="True" TextWrapping="WrapWithOverflow" VerticalAlignment="Bottom"
73                     Height="23" FontSize="8" BorderThickness="1" Background="LightGray"/>
74
75                    <Label Grid.Row="2" Grid.Column="0" FontSize="8" VerticalAlignment="Top" Height="23" Width="AUTO">Left:</Label>
76                    <TextBox Name="txtLeft" Grid.Row="2" Grid.Column="1" TextAlignment="Left"
77                     IsReadOnly="True" TextWrapping="WrapWithOverflow" VerticalAlignment="Top"
78                     Height="23" FontSize="8" BorderThickness="1" Background="Transparent" />
79
80                    <Label Grid.Row="3" Grid.Column="0" FontSize="8" FontWeight="Bold" Background="LightGray" VerticalAlignment="Top" Height="23" Width="AUTO">Finished:</Label>
81                    <TextBox Name="txtFinished" Grid.Row="3" Grid.Column="1" TextAlignment="Left"
82                     IsReadOnly="True" TextWrapping="WrapWithOverflow" VerticalAlignment="Bottom"
83                     Height="23" FontSize="8" BorderThickness="1" Background="LightGray" />
84
85                </Grid>
86            </Expander>
87
88            <Expander Name="Expander_List" Header="Global Top 10 List" IsExpanded="True" FontSize="10" Grid.Row="2">
89                <ListView Name="ListView" ItemsSource="{Binding}" ScrollViewer.HorizontalScrollBarVisibility="Auto"  ScrollViewer.VerticalScrollBarVisibility="Auto" FontSize="7" MaxWidth="200">
90                    <ListView.View>
91                        <GridView>
92                            <GridViewColumn Header="Ranking" DisplayMemberBinding="{Binding Path=Ranking}"></GridViewColumn>
93                            <GridViewColumn Header="Value" DisplayMemberBinding="{Binding Path=Value}"></GridViewColumn>
94                            <GridViewColumn Header="Key" DisplayMemberBinding="{Binding Path=Key}"></GridViewColumn>
95                            <GridViewColumn Header="Text" DisplayMemberBinding="{Binding Path=Text}" ></GridViewColumn>
96                        </GridView>
97                    </ListView.View>
98                </ListView>
99            </Expander>
100
101            <Expander Name="Expander_WorkerInfo" Header="Worker Info" IsExpanded="False" FontSize="10" Grid.Row="3">
102                <Grid Name="WorkerGrid">
103                    <Grid.RowDefinitions>
104                        <RowDefinition/>
105                        <RowDefinition/>
106                        <RowDefinition/>
107                    </Grid.RowDefinitions>
108                    <Grid.ColumnDefinitions>
109                        <ColumnDefinition Width="75"/>
110                        <ColumnDefinition Width="50"/>
111                    </Grid.ColumnDefinitions>
112
113                    <Label Grid.Row="0" Grid.Column="0" FontSize="8" Height="23" FontWeight="Bold">Total Amount:</Label>
114                    <TextBox Name="txtTotalWorker" Grid.Row="0" Grid.Column="1" TextAlignment="Left"
115                     IsReadOnly="True" TextWrapping="WrapWithOverflow" VerticalAlignment="Top"
116                     Height="23" FontSize="8" BorderThickness="1" FontWeight="Bold" Background="Transparent"/>
117
118                    <Label Grid.Row="1" Grid.Column="0" FontSize="8" Height="23" Background="LightGray">Free:</Label>
119                    <TextBox Name="txtFreeWorker" Grid.Row="1" Grid.Column="1" TextAlignment="Left"
120                     IsReadOnly="True" TextWrapping="WrapWithOverflow" VerticalAlignment="Top"
121                     Height="23" FontSize="8" BorderThickness="1" Background="LightGray"/>
122
123                    <Label Grid.Row="2" Grid.Column="0" FontSize="8" Height="23">Busy:</Label>
124                    <TextBox Name="txtBusyWorker" Grid.Row="2" Grid.Column="1" TextAlignment="Left"
125                     IsReadOnly="True" TextWrapping="WrapWithOverflow" VerticalAlignment="Top"
126                     Height="23" FontSize="8" BorderThickness="1" Background="Transparent"/>
127                </Grid>
128            </Expander>
129        </Grid>
130    </Canvas>
131</UserControl>
Note: See TracBrowser for help on using the repository browser.