aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Dialogs/JobCreationView.xaml
blob: 1f48474aae9aef1d005eb0562c4d8ea56e957c04 (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
<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="550" Height="750" d:DataContext="{d:DesignInstance Type=local:JobCreationViewVM, IsDesignTimeCreatable=False}">

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

    </UserControl.Resources>

    <Grid Margin="20">

        <DockPanel>
            <StackPanel DockPanel.Dock="Bottom" HorizontalAlignment="Right" Orientation="Horizontal">
                <touch:TouchButton Command="{Binding CloseCommand}" Style="{StaticResource TangoMessageBoxButton}" DockPanel.Dock="Right" Width="120" Height="50" VerticalAlignment="Bottom">CANCEL</touch:TouchButton>
                <touch:TouchButton Command="{Binding OKCommand}" Style="{StaticResource TangoMessageBoxButton}" DockPanel.Dock="Right" Width="120" Height="50" VerticalAlignment="Bottom">CREATE</touch:TouchButton>
            </StackPanel>
            <StackPanel>
                <touch:TouchIcon HorizontalAlignment="Center" Icon="PlusCircle" Foreground="{StaticResource TangoSuccessBrush}" Height="80" />
                <TextBlock HorizontalAlignment="Center" Margin="0 20 0 0" FontSize="{StaticResource TangoHeaderFontSize}">NEW JOB</TextBlock>
                <TextBlock Margin="20 20" HorizontalAlignment="Center" TextWrapping="Wrap" TextAlignment="Center">Please select the job application and color space/catalog and press 'CREATE'.</TextBlock>

                <touch:TouchStaticListBox Margin="20" 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="Opacity" Value="0.5"></Setter>
                            <Style.Triggers>
                                <Trigger Property="IsSelected" Value="True">
                                    <Setter Property="Opacity" Value="1"></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 5 0 0" Text="{Binding Converter={StaticResource EnumToDescriptionConverter}}" FontSize="{StaticResource TangoButtonFontSize}"></TextBlock>
                            </StackPanel>
                        </DataTemplate>
                    </touch:TouchStaticListBox.ItemTemplate>
                </touch:TouchStaticListBox>

                <touch:TouchStaticListBox Margin="20 100 20 20" 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="Opacity" Value="0.5"></Setter>
                            <Style.Triggers>
                                <Trigger Property="IsSelected" Value="True">
                                    <Setter Property="Opacity" Value="1"></Setter>
                                </Trigger>
                            </Style.Triggers>
                        </Style>
                    </touch:TouchStaticListBox.ItemContainerStyle>
                    <touch:TouchStaticListBox.ItemTemplate>
                        <DataTemplate>
                            <Border BorderBrush="{StaticResource TangoLightBorderBrush}" BorderThickness="1" Padding="20" Margin="5" Background="Transparent">
                                <TextBlock HorizontalAlignment="Center" Text="{Binding}" FontSize="{StaticResource TangoDefaultFontSize}"></TextBlock>
                            </Border>
                        </DataTemplate>
                    </touch:TouchStaticListBox.ItemTemplate>
                </touch:TouchStaticListBox>
            </StackPanel>
        </DockPanel>
    </Grid>
</UserControl>