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

Last change on this file since 1563 was 1563, checked in by Paul Lelgemann, 12 years ago

+ P2PEditor: Own jobs can be deleted, new jobs are displayed on top and after creation of a job, it is selected in the list

File size: 2.3 KB
Line 
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>
9                    <SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" Color="LightBlue" />
10                </Style.Resources>
11            </Style>
12        </ResourceDictionary>
13    </GUI:P2PUserControl.Resources>
14        <Grid Background="White">
15        <ListBox x:Name="JobListBox" ItemsSource="{Binding Jobs,RelativeSource ={RelativeSource FindAncestor, AncestorType={x:Type UserControl}}}" ItemTemplate="{StaticResource jobDisplayTemplate}" Style="{StaticResource jobListDisplayStyle}" KeyUp="JobListBox_KeyUp" Margin="0,0,0,35">
16            <ListBox.ItemContainerStyle>
17                <Style TargetType="{x:Type ListBoxItem}" BasedOn="{StaticResource {x:Type ListBoxItem}}">
18                    <EventSetter Event="MouseDoubleClick" Handler="ParticipateItemHandler"/>
19                </Style>
20            </ListBox.ItemContainerStyle>
21        </ListBox>
22        <Grid DataContext="{Binding SelectedItem,ElementName=JobListBox}">
23            <Button Content="Participate" HorizontalAlignment="Right" Margin="0,0,0,6" Name="ParticipateButton" Width="75" Height="23" VerticalAlignment="Bottom" Click="ParticipateButton_Click" />
24            <Button Content="Refresh" Click="RefreshButton_Click" Margin="0,0,0,6" Name="RefreshButton" Height="23" VerticalAlignment="Bottom" HorizontalAlignment="Left" Width="75" />
25            <Button Content="Delete" Click="DeleteButton_Click" Margin="0,0,81,6" Name="DeleteButton" HorizontalAlignment="Right" Width="75" Height="23" VerticalAlignment="Bottom" />
26        </Grid>
27    </Grid>
28</GUI:P2PUserControl>
Note: See TracBrowser for help on using the repository browser.