aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Dialogs/JobCreationView.xaml
blob: cecdf813c0c34ca25d9902ca1275ff04a174c6e5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
<UserControl x:Class="Tango.PPC.Jobs.Dialogs.JobCreationView"
             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:local="clr-namespace:Tango.PPC.Jobs.Dialogs"
             xmlns:enumerations="clr-namespace:Tango.BL.Enumerations;assembly=Tango.BL"
             xmlns:converters="clr-namespace:Tango.PPC.Jobs.Converters"
             xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
             xmlns:touch="clr-namespace:Tango.Touch.Controls;assembly=Tango.Touch"
             mc:Ignorable="d" 
             Background="{StaticResource TangoPrimaryBackgroundBrush}"  d:DesignHeight="555" d:DesignWidth="560" Width="570" Height="700" d:DataContext="{d:DesignInstance Type=local:JobCreationViewVM, IsDesignTimeCreatable=False}">

    <UserControl.Resources>
        <converters:JobTypeToImageConverter x:Key="JobTypeToImageConverter" />
        <converters:ColorSpaceToImageConverter x:Key="ColorSpaceToImageConverter" />

    </UserControl.Resources>

    <Grid Margin="20">

        <DockPanel>
            <Grid DockPanel.Dock="Bottom">
                <touch:TouchButton HorizontalAlignment="Left" CornerRadius="25" Command="{Binding CloseCommand}" Style="{StaticResource TangoHollowButton}" Width="150" Height="50" VerticalAlignment="Bottom">CANCEL</touch:TouchButton>
                <touch:TouchButton HorizontalAlignment="Right" CornerRadius="25" Command="{Binding OKCommand}" Style="{StaticResource TangoHollowButton}" Width="150" Height="50" VerticalAlignment="Bottom">CREATE</touch:TouchButton>
            </Grid>

            <StackPanel DockPanel.Dock="Top">
                <TextBlock HorizontalAlignment="Left" Margin="0 10 0 0" FontSize="{StaticResource TangoHeaderFontSize}">New Job</TextBlock>
                <TextBlock Margin="0 30 100 0" HorizontalAlignment="Left" TextWrapping="Wrap" FontSize="{StaticResource TangoTitleFontSize}">Please select the job application and color space/catalog and press 'create'.</TextBlock>
            </StackPanel>

            <UniformGrid Rows="2" Margin="0 40 0 0" VerticalAlignment="Center" TextElement.FontWeight="Normal">
                <touch:TouchStaticListBox Margin="20" VerticalAlignment="Center" Width="480" ItemsSource="{Binding SupportedJobTypes}" SelectedItem="{Binding SelectedJobType,Mode=TwoWay}">
                    <touch:TouchStaticListBox.ItemsPanel>
                        <ItemsPanelTemplate>
                            <UniformGrid Rows="1" />
                        </ItemsPanelTemplate>
                    </touch:TouchStaticListBox.ItemsPanel>
                    <touch:TouchStaticListBox.ItemContainerStyle>
                        <Style TargetType="touch:TouchStaticListBoxItem">
                            <Setter Property="BorderBrush" Value="{StaticResource TangoPrimaryAccentBrush}"></Setter>
                            <Setter Property="BorderThickness" Value="0"></Setter>
                            <Setter Property="CornerRadius" Value="5"></Setter>
                            <Setter Property="Padding" Value="0 10"></Setter>
                            <Setter Property="Margin" Value="25"></Setter>
                            <Setter Property="Background" Value="Transparent"></Setter>
                            <Setter Property="Width" Value="110"></Setter>
                            <Style.Triggers>
                                <Trigger Property="IsSelected" Value="True">
                                    <Setter Property="BorderThickness" Value="2"></Setter>
                                </Trigger>
                            </Style.Triggers>
                        </Style>
                    </touch:TouchStaticListBox.ItemContainerStyle>
                    <touch:TouchStaticListBox.ItemTemplate>
                        <DataTemplate>
                            <StackPanel Orientation="Vertical" HorizontalAlignment="Center">
                                <Image Stretch="Fill" Width="60" RenderOptions.BitmapScalingMode="Fant" Height="60" Source="{Binding Converter={StaticResource JobTypeToImageConverter}}"></Image>
                                <TextBlock HorizontalAlignment="Center" Margin="0 10 0 0" Text="{Binding Converter={StaticResource EnumToDescriptionConverter}}" ></TextBlock>
                            </StackPanel>
                        </DataTemplate>
                    </touch:TouchStaticListBox.ItemTemplate>
                </touch:TouchStaticListBox>
                
                <Grid>
                    <Rectangle HorizontalAlignment="Stretch" VerticalAlignment="Top" Margin="70 0" StrokeThickness="1" Stroke="{StaticResource TangoDividerBrush}" />

                    <Grid Margin="-20 -40 -20 0">
                        <touch:TouchStaticListBox VerticalAlignment="Center" ItemsSource="{Binding SupportedColorSpaces}" SelectedItem="{Binding SelectedColorSpace,Mode=TwoWay}">
                        <touch:TouchStaticListBox.ItemsPanel>
                            <ItemsPanelTemplate>
                                <UniformGrid Rows="1" />
                            </ItemsPanelTemplate>
                        </touch:TouchStaticListBox.ItemsPanel>
                        <touch:TouchStaticListBox.ItemContainerStyle>
                            <Style TargetType="touch:TouchStaticListBoxItem">
                                <Setter Property="BorderBrush" Value="{StaticResource TangoPrimaryAccentBrush}"></Setter>
                                <Setter Property="BorderThickness" Value="0"></Setter>
                                <Setter Property="CornerRadius" Value="5"></Setter>
                                <Setter Property="Padding" Value="0 10"></Setter>
                                <Setter Property="Margin" Value="10"></Setter>
                                <Setter Property="Width" Value="90"></Setter>
                                <Setter Property="Background" Value="Transparent"></Setter>
                                <Style.Triggers>
                                    <Trigger Property="IsSelected" Value="True">
                                        <Setter Property="BorderThickness" Value="2"></Setter>
                                    </Trigger>
                                </Style.Triggers>
                            </Style>
                        </touch:TouchStaticListBox.ItemContainerStyle>
                        <touch:TouchStaticListBox.ItemTemplate>
                            <DataTemplate>
                                <StackPanel Orientation="Vertical" HorizontalAlignment="Center">
                                    <Image Stretch="Fill" Width="32" Height="32" RenderOptions.BitmapScalingMode="Fant" Source="{Binding Converter={StaticResource ColorSpaceToImageConverter}}"></Image>
                                    <TextBlock HorizontalAlignment="Center" Margin="0 10 0 0" Text="{Binding}"></TextBlock>
                                </StackPanel>
                            </DataTemplate>
                        </touch:TouchStaticListBox.ItemTemplate>
                    </touch:TouchStaticListBox>
                    </Grid>
                </Grid>
            </UniformGrid>
        </DockPanel>
    </Grid>
</UserControl>