source: trunk/CrypPlugins/P2PEditor/GUI/Controls/JobDisplay.xaml @ 1917

Last change on this file since 1917 was 1917, checked in by Paul Lelgemann, 11 years ago

o KeySearcher: fixed "+unendlich years" as estimated finish date display bug
o P2PEditor: fixed behavior of new button without p2p connection and participate button with not job selected
o P2PEditor: minor refactoring, removed unused code and classes

File size: 2.5 KB
RevLine 
[1549]1<GUI:P2PUserControl x:Class="Cryptool.P2PEditor.GUI.Controls.JobDisplay" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:GUI="clr-namespace:Cryptool.P2PEditor.GUI" mc:Ignorable="d" d:DesignHeight="218" d:DesignWidth="416">
2        <GUI:P2PUserControl.Resources>
3        <ResourceDictionary>
4            <ResourceDictionary.MergedDictionaries>
5                <ResourceDictionary Source="JobDisplayTemplate.xaml" />
6            </ResourceDictionary.MergedDictionaries>
7            <Style x:Key="jobListDisplayStyle" TargetType="{x:Type ListBox}">
8                <Style.Resources>
[1563]9                    <SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" Color="LightBlue" />
[1549]10                </Style.Resources>
11            </Style>
12        </ResourceDictionary>
13    </GUI:P2PUserControl.Resources>
[1727]14    <AdornerDecorator>
15        <DockPanel Name="mainPane">
16            <Grid Background="White">
[1917]17                <ListBox x:Name="JobListBox" HorizontalContentAlignment="Stretch" ItemsSource="{Binding Jobs, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}}}" ItemTemplate="{StaticResource jobDisplayTemplate}" Style="{StaticResource jobListDisplayStyle}" KeyUp="JobListBoxKeyUp" Margin="0,0,0,35">
[1727]18                    <ListBox.ItemContainerStyle>
19                        <Style TargetType="{x:Type ListBoxItem}">
20                            <EventSetter Event="MouseDoubleClick" Handler="ParticipateItemHandler"/>
21                        </Style>
22                    </ListBox.ItemContainerStyle>
23                </ListBox>
24                <Grid DataContext="{Binding SelectedItem,ElementName=JobListBox}">
[1917]25                    <Button Content="Participate" HorizontalAlignment="Right" Margin="0,0,0,6" Name="ParticipateButton" Width="75" Height="23" VerticalAlignment="Bottom" Click="ParticipateButtonClick" />
26                    <Button Content="Refresh" Click="RefreshButtonClick" Margin="0,0,0,6" Name="RefreshButton" Height="23" VerticalAlignment="Bottom" HorizontalAlignment="Left" Width="75" />
27                    <Button Content="Delete" Click="DeleteButtonClick" Margin="0,0,81,6" Name="DeleteButton" HorizontalAlignment="Right" Width="75" Height="23" VerticalAlignment="Bottom" />
[1727]28                </Grid>
29            </Grid>
30        </DockPanel>
31    </AdornerDecorator>
[1527]32</GUI:P2PUserControl>
Note: See TracBrowser for help on using the repository browser.