source: trunk/CrypPlugins/P2PEditor/GUI/Controls/JobDisplayTemplate.xaml @ 2995

Last change on this file since 2995 was 2995, checked in by kopal, 11 years ago

Some more localization of the network editor

File size: 3.7 KB
Line 
1<ResourceDictionary x:Class="Cryptool.P2PEditor.GUI.Controls.JobDisplayTemplate"
2              xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3              xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4              xmlns:Distributed="clr-namespace:Cryptool.P2PEditor.Distributed"
5              xmlns:Converters="clr-namespace:Cryptool.P2PEditor.Converters">
6
7    <Converters:StatusToColorConverter x:Key="StatusToColorConverter" />
8        <Converters:StringEmptyToVisibilityConverter x:Key="StringEmptyToVisibilityConverter" />
9        <Converters:TrueToVisibleOrCollapsedConverter x:Key="TrueToVisibleOrCollapsedConverter" />
10    <Converters:UtcDateTimeToLocalConverter x:Key="UtcDateTimeToLocalConverter" />
11        <DataTemplate DataType="{x:Type Distributed:DistributedJob}" x:Key="jobDisplayTemplate">
12        <Border BorderBrush="Silver" BorderThickness="0,0,0,1">
13            <StackPanel>
14                <Grid>
15                    <Grid.ColumnDefinitions>
16                        <ColumnDefinition Width="300*" />
17                        <ColumnDefinition Width="300" />
18                        <ColumnDefinition Width="140" />
19                    </Grid.ColumnDefinitions>
20                    <Label Content="{Binding Name}" FontSize="16" Grid.Column="0" />
21
22                    <Ellipse Fill="{Binding Status.CurrentStatus, Converter={StaticResource StatusToColorConverter}}" Height="18" Width="18" StrokeThickness="1" Stroke="DarkGray" Margin="0,5,105,5" Grid.Column="1" HorizontalAlignment="Right" />
23                    <ProgressBar Value="{Binding Status.Progress}" Maximum="1" Width="100" Height="20" Grid.Column="1" HorizontalAlignment="Right" />
24
25                    <Label Content="{Binding CreateDate, Converter={StaticResource UtcDateTimeToLocalConverter}}" FontSize="16" Grid.Column="2" HorizontalAlignment="Right" Foreground="DarkGray" />
26                </Grid>
27                <Grid Visibility="{Binding IsSelected, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListBoxItem}}, Converter={StaticResource TrueToVisibleOrCollapsedConverter}}">
28                    <Grid.ColumnDefinitions>
29                        <ColumnDefinition Width="75" />
30                        <ColumnDefinition Width="*" />
31                    </Grid.ColumnDefinitions>
32                    <StackPanel Grid.Column="0">
33                        <Label Content="{Loc Author_}" FontSize="10" Height="23" />
34                        <Label Content="{Loc Workspace_}" FontSize="10" Height="23" />
35                        <Label Content="{Loc Downloads_}" FontSize="10" Height="23" />
36                        <Label Content="{Loc Participants_}" FontSize="10" Height="23" />
37                        <Label Content="{Loc Start_date_}" FontSize="10" Height="23" />
38                        <Label Content="{Loc Description_}" FontSize="10" Height="23" />
39                    </StackPanel>
40                    <StackPanel Grid.Column="1">
41                        <Label Content="{Binding Owner}" Height="23" FontSize="10" />
42                        <Label Content="{Binding FileName}" Height="23" FontSize="10" />
43                        <Label Content="{Binding Downloads}" Height="23" FontSize="10" />
44                        <Label Content="{Binding Status.Participants, FallbackValue=-}" Height="23" FontSize="10" />
45                        <Label Content="{Binding Status.StartDate, Converter={StaticResource UtcDateTimeToLocalConverter}, FallbackValue=-}" Height="23" FontSize="10" />
46                        <Label Content="{Binding Description}" FontSize="10" />
47                    </StackPanel>
48                </Grid>
49            </StackPanel>
50        </Border>
51    </DataTemplate>
52   
53</ResourceDictionary>
Note: See TracBrowser for help on using the repository browser.