aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/JobView.xaml
blob: 90162f501aa6a2d3f5b1c3213c85a91e71bed1b6 (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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
<UserControl x:Class="Tango.PPC.Jobs.Views.JobView"
             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:vm="clr-namespace:Tango.PPC.Jobs.ViewModels"
             xmlns:fa="http://schemas.fontawesome.io/icons/"
             xmlns:touch="clr-namespace:Tango.Touch.Controls;assembly=Tango.Touch"
             xmlns:global="clr-namespace:Tango.PPC.Jobs"
             xmlns:controls="clr-namespace:Tango.SharedUI.Controls;assembly=Tango.SharedUI"
             xmlns:local="clr-namespace:Tango.PPC.Jobs.Views"
             mc:Ignorable="d" 
             d:DesignHeight="1280" d:DesignWidth="800" d:DataContext="{d:DesignInstance Type=vm:JobViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.JobViewVM}">

    <UserControl.Resources>
        <Style TargetType="FrameworkElement" x:Key="Level1Container">
            <Setter Property="Margin" Value="20 15 60 15"></Setter>
        </Style>
        <Style TargetType="FrameworkElement" x:Key="Level2Container">
            <Setter Property="Margin" Value="80 30 60 0"></Setter>
        </Style>
    </UserControl.Resources>

    <Grid Background="{StaticResource TangoMidBackgroundBrush}">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="1*"/>
        </Grid.RowDefinitions>

        <Grid Grid.Row="1">
            <Grid x:Name="Container">
                <touch:LightTouchScrollViewer>
                    <Grid Margin="10 60 10 0" VerticalAlignment="Top">
                        <StackPanel>
                            <touch:TouchExpander Padding="20 15">
                                <touch:TouchExpander.Header>
                                    <StackPanel Orientation="Horizontal" VerticalAlignment="Center" Margin="0 0 20 0">
                                        <Image Source="../Images/JobView/job-details.png" Width="39" />
                                        <TextBlock FontWeight="Medium" Margin="20 0 0 0" VerticalAlignment="Center" FontSize="{StaticResource TangoExpanderHeaderFontSize}">Job Details</TextBlock>

                                        <TextBlock FontWeight="Medium" Margin="50 0 0 0" VerticalAlignment="Center" Text="{Binding Job.Rml.Name}"></TextBlock>
                                    </StackPanel>
                                </touch:TouchExpander.Header>

                                <StackPanel Margin="60 30 60 20" TextElement.FontWeight="Medium">
                                    <controls:TableGrid RowHeight="50">
                                        <TextBlock>Job name:</TextBlock>
                                        <touch:TouchTextBox Text="{Binding Job.Name,UpdateSourceTrigger=PropertyChanged}" KeyboardMode="AlphaNumeric" KeyboardAction="Next" KeyboardContainer="{Binding ElementName=Container}" />
                                        <TextBlock>Customer name:</TextBlock>
                                        <touch:TouchTextBox Text="{Binding Job.Customer.Name}" KeyboardMode="AlphaNumeric" KeyboardAction="Next" KeyboardContainer="{Binding ElementName=Container}" />
                                        <TextBlock>Thread type:</TextBlock>
                                        <touch:TouchComboBox SelectedItem="{Binding Job.Rml.Name}" />
                                        <TextBlock>Comment:</TextBlock>
                                        <TextBox Margin="20 0 0 -42" Text="{Binding Job.Description}" FocusVisualStyle="{x:Null}" BorderBrush="{StaticResource TangoDividerBrush}" Foreground="{StaticResource TangoDarkForegroundBrush}" AcceptsReturn="True" TextWrapping="Wrap" Height="60" Padding="5">

                                        </TextBox>
                                    </controls:TableGrid>

                                    <Grid HorizontalAlignment="Center" Margin="0 20 0 0" TextElement.Foreground="{StaticResource TangoGrayTextBrush}">
                                        <Grid.ColumnDefinitions>
                                            <ColumnDefinition Width="Auto" />
                                            <ColumnDefinition Width="Auto" />
                                            <ColumnDefinition Width="Auto" />
                                            <ColumnDefinition Width="Auto" />
                                            <ColumnDefinition Width="Auto" />
                                        </Grid.ColumnDefinitions>

                                        <TextBlock HorizontalAlignment="Left">
                                    <Run Text="Job status:"></Run>
                                    <Run Text="{Binding Job.JobStatus}"></Run>
                                        </TextBlock>

                                        <Rectangle Margin="20 0" Grid.Column="1" HorizontalAlignment="Center" StrokeThickness="1" Stroke="{StaticResource TangoGrayTextBrush}" />

                                        <TextBlock Grid.Column="2" HorizontalAlignment="Center">
                                    <Run Text="Last updated:"></Run>
                                    <Run Text="{Binding Job.LastUpdated,Converter={StaticResource DateTimeUTCToShortDateConverter},TargetNullValue=Never}"></Run>
                                        </TextBlock>

                                        <Rectangle Margin="20 0" Grid.Column="3" HorizontalAlignment="Center" StrokeThickness="1" Stroke="{StaticResource TangoGrayTextBrush}" />

                                        <TextBlock Grid.Column="4" HorizontalAlignment="Right">
                                    <Run Text="Last dye:"></Run>
                                    <Run Text="{Binding Job.LastRun,Converter={StaticResource DateTimeUTCToShortDateConverter},TargetNullValue=Never}"></Run>
                                        </TextBlock>
                                    </Grid>
                                </StackPanel>
                            </touch:TouchExpander>

                            <Border Style="{StaticResource TangoTouchBorder}" Margin="0 12 0 0" Padding="0 0 0 40">
                                <StackPanel>
                                    <StackPanel Orientation="Horizontal" VerticalAlignment="Center"  Style="{StaticResource Level1Container}">
                                        <Image Source="../Images/JobView/color-length.png" Width="39" />
                                        <TextBlock FontWeight="Medium" Margin="20 0 0 0" VerticalAlignment="Center" FontSize="{StaticResource TangoExpanderHeaderFontSize}">Color &amp; Length</TextBlock>
                                    </StackPanel>

                                    <DockPanel Style="{StaticResource Level2Container}">
                                        <TextBlock Text="Color Catalog/Space"></TextBlock>
                                        <touch:TouchComboBox Margin="20 0 0 0" SelectedItem="{Binding Job.ColorSpace.Name}" />
                                    </DockPanel>

                                    <StackPanel HorizontalAlignment="Right" Style="{StaticResource Level2Container}" Orientation="Horizontal">
                                        <touch:TouchButton FontWeight="Normal" RippleBrush="{StaticResource TangoRippleDarkBrush}" FontSize="{StaticResource TangoDefaultFontSize}" EnableDropShadow="False" Foreground="{StaticResource TangoPrimaryAccentBrush}" Width="170" CornerRadius="20" Padding="0 10" Background="Transparent" BorderThickness="2" BorderBrush="{StaticResource TangoPrimaryAccentBrush}">
                                            <StackPanel Orientation="Horizontal">
                                                <fa:ImageAwesome Icon="Plus" Foreground="{StaticResource TangoPrimaryAccentBrush}" Width="16" Height="16" />
                                                <TextBlock Margin="10 0 0 0">SOLID SEGMENT</TextBlock>
                                            </StackPanel>
                                        </touch:TouchButton>
                                        <touch:TouchButton FontWeight="Normal" RippleBrush="{StaticResource TangoRippleDarkBrush}" FontSize="{StaticResource TangoDefaultFontSize}" Margin="30 0 0 0" EnableDropShadow="False" Foreground="{StaticResource TangoPrimaryAccentBrush}" Padding="0 10" Width="200" CornerRadius="20" Background="Transparent" BorderThickness="2">
                                            <touch:TouchButton.BorderBrush>
                                                <LinearGradientBrush>
                                                    <GradientStop Offset="0" Color="{StaticResource TangoPrimaryAccentColor}" />
                                                    <GradientStop Offset="1" Color="#57F157" />
                                                </LinearGradientBrush>
                                            </touch:TouchButton.BorderBrush>

                                            <StackPanel Orientation="Horizontal">
                                                <fa:ImageAwesome Icon="Plus" Foreground="{StaticResource TangoPrimaryAccentBrush}" Width="16" Height="16" />
                                                <TextBlock Margin="10 0 0 0">GRADIENT SEGMENT</TextBlock>
                                            </StackPanel>
                                        </touch:TouchButton>
                                    </StackPanel>

                                    <Rectangle Stroke="{StaticResource TangoDividerBrush}" Margin="0 30 0 0" />

                                    <StackPanel Orientation="Horizontal" VerticalAlignment="Center"  Style="{StaticResource Level1Container}">
                                        <Image Source="../Images/JobView/output.png" Width="39" />
                                        <TextBlock FontWeight="Medium" Margin="20 0 0 0" VerticalAlignment="Center" FontSize="{StaticResource TangoExpanderHeaderFontSize}">Output</TextBlock>
                                    </StackPanel>

                                    <DockPanel Style="{StaticResource Level2Container}">
                                        <TextBlock Text="Output spool (m):"></TextBlock>
                                        <touch:TouchComboBox SelectedItem="{Binding Job.SpoolType.Name}" Margin="40 0 0 0" />
                                    </DockPanel>
                                </StackPanel>
                            </Border>
                        </StackPanel>
                    </Grid>
                </touch:LightTouchScrollViewer>
            </Grid>
        </Grid>

        <Border Padding="20" Background="{StaticResource TangoPrimaryBackgroundBrush}" BorderThickness="0 0 0 1" BorderBrush="{StaticResource TangoDividerBrush}">
            <Border.Effect>
                <DropShadowEffect Color="Silver" ShadowDepth="0" BlurRadius="20" Opacity="1" />
            </Border.Effect>

            <Grid>
            <TextBlock VerticalAlignment="Center" FontSize="{StaticResource TangoHeaderFontSize}" FontWeight="SemiBold" Text="{Binding Job.Name}"></TextBlock>
                <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Bottom" Height="57" Margin="0 0 30 -45">
                    <touch:TouchButton Margin="0 0 30 0" Padding="15" Style="{StaticResource TangoRoundTouchButton}">
                        <Image Source="../Images/JobView/delete.png" />
                    </touch:TouchButton>
                    <touch:TouchButton Padding="20" Style="{StaticResource TangoRoundTouchButton}">
                        <Image Source="../Images/JobView/remove.png" />
                    </touch:TouchButton>
                </StackPanel>
            </Grid>
        </Border>
    </Grid>
</UserControl>