Ignore:
Timestamp:
Jul 5, 2010, 3:51:42 PM (11 years ago)
Author:
Paul Lelgemann
Message:

+ P2PEditor can display the status of jobs, if available; Participating displays overlay while loading workspace data
+ KeySearcher can upload status for P2PEditor display

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/CrypPlugins/P2PEditor/GUI/Controls/JobDisplayTemplate.xaml

    r1701 r1727  
    33    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:Distributed="clr-namespace:Cryptool.P2PEditor.Distributed" xmlns:Converters="clr-namespace:Cryptool.P2PEditor.Converters">
    44
    5         <Converters:DateTimeConverter x:Key="DateTimeConverter" />
     5    <Converters:StatusToColorConverter x:Key="StatusToColorConverter" />
     6        <Converters:StringEmptyToVisibilityConverter x:Key="StringEmptyToVisibilityConverter" />
     7        <Converters:TrueToVisibleOrCollapsedConverter x:Key="TrueToVisibleOrCollapsedConverter" />
     8    <Converters:UtcDateTimeToLocalConverter x:Key="UtcDateTimeToLocalConverter" />
    69        <DataTemplate DataType="{x:Type Distributed:DistributedJob}" x:Key="jobDisplayTemplate">
    7         <Grid>
    8             <Grid.ColumnDefinitions>
    9                 <ColumnDefinition Width="75" />
    10                 <ColumnDefinition Width="*" />
    11                 <ColumnDefinition Width="130" />
    12             </Grid.ColumnDefinitions>
    13             <StackPanel Grid.Column="0">
    14                 <Label Content="Name" FontWeight="Bold" Height="24" />
    15                 <Label Content="Author:" FontWeight="Bold" FontSize="10" Height="23" />
    16                 <Label Content="Workspace:" FontWeight="Bold" FontSize="10" Height="23" />
     10        <Border BorderBrush="Silver" BorderThickness="0,0,0,1">
     11            <StackPanel>
     12                <Grid>
     13                    <Grid.ColumnDefinitions>
     14                        <ColumnDefinition Width="300*" />
     15                        <ColumnDefinition Width="300" />
     16                        <ColumnDefinition Width="140" />
     17                    </Grid.ColumnDefinitions>
     18                    <Label Content="{Binding Name}" FontSize="16" Grid.Column="0" />
     19
     20                    <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" />
     21                    <ProgressBar Value="{Binding Status.Progress}" Maximum="1" Width="100" Height="20" Grid.Column="1" HorizontalAlignment="Right" />
     22
     23                    <Label Content="{Binding CreateDate, Converter={StaticResource UtcDateTimeToLocalConverter}}" FontSize="16" Grid.Column="2" HorizontalAlignment="Right" Foreground="DarkGray" />
     24                </Grid>
     25                <Grid Visibility="{Binding IsSelected, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListBoxItem}}, Converter={StaticResource TrueToVisibleOrCollapsedConverter}}">
     26                    <Grid.ColumnDefinitions>
     27                        <ColumnDefinition Width="75" />
     28                        <ColumnDefinition Width="*" />
     29                    </Grid.ColumnDefinitions>
     30                    <StackPanel Grid.Column="0">
     31                        <Label Content="Author:" FontSize="10" Height="23" />
     32                        <Label Content="Workspace:" FontSize="10" Height="23" />
     33                        <Label Content="Downloads:" FontSize="10" Height="23" />
     34                        <Label Content="Participants:" FontSize="10" Height="23" />
     35                        <Label Content="Start date:" FontSize="10" Height="23" />
     36                        <Label Content="Description:" FontSize="10" Height="23" />
     37                    </StackPanel>
     38                    <StackPanel Grid.Column="1">
     39                        <Label Content="{Binding Owner}" Height="23" FontSize="10" />
     40                        <Label Content="{Binding FileName}" Height="23" FontSize="10" />
     41                        <Label Content="{Binding Downloads}" Height="23" FontSize="10" />
     42                        <Label Content="{Binding Status.Participants}" Height="23" FontSize="10" />
     43                        <Label Content="{Binding Status.StartDate, Converter={StaticResource UtcDateTimeToLocalConverter}}" Height="23" FontSize="10" />
     44                        <Label Content="{Binding Description}" Height="23" FontSize="10" />
     45                    </StackPanel>
     46                </Grid>
    1747            </StackPanel>
    18             <StackPanel Grid.Column="1">
    19                 <Label Content="{Binding JobName}" Height="24" />
    20                 <Label Content="{Binding JobOwner}" Height="23" FontSize="10" />
    21                 <Label Content="{Binding FileName}" Height="23" FontSize="10" />
    22             </StackPanel>
    23             <StackPanel Grid.Column="2" HorizontalAlignment="Right">
    24                 <Label Content="{Binding JobDate, Converter={StaticResource DateTimeConverter}}" VerticalAlignment="Top" FontSize="10" Height="23" />
    25                 <Label Content="" VerticalAlignment="Top" FontSize="10" Height="23" />
    26             </StackPanel>
    27         </Grid>
     48        </Border>
    2849    </DataTemplate>
    2950   
Note: See TracChangeset for help on using the changeset viewer.