blob: 932c185afc70f89f81d713be8f5e3c0521d057f0 (
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
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
|
<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:keyboard="clr-namespace:Tango.Touch.Keyboard;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.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid x:Name="Container" keyboard:KeyboardView.ContainerOffset="40" Grid.RowSpan="2">
<touch:LightTouchScrollViewer>
<StackPanel Margin="10 60 10 0">
<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 ItemsSource="{Binding Rmls}" SelectedItem="{Binding Job.Rml}" DisplayMemberPath="Name" Title="Select Thread Type" />
<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 & Length</TextBlock>
</StackPanel>
<DockPanel Style="{StaticResource Level2Container}">
<TextBlock Text="Color Catalog/Space" VerticalAlignment="Center"></TextBlock>
<touch:TouchComboBox Margin="20 0 0 0" ItemsSource="{Binding ColorSpaces}" SelectedItem="{Binding Job.ColorSpace}" DisplayMemberPath="Name" Title="Select Color Catalog/Space" />
</DockPanel>
<StackPanel HorizontalAlignment="Right" Style="{StaticResource Level2Container}" Orientation="Horizontal">
<touch:TouchButton Command="{Binding AddSolidSegmentCommand}" 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>
<StackPanel Style="{StaticResource Level2Container}">
<StackPanel Margin="0 10 0 0">
<touch:TouchCheckBox HorizontalAlignment="Left" IsChecked="{Binding Job.EnableInterSegment}">Include white gap between segments</touch:TouchCheckBox>
</StackPanel>
</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):" VerticalAlignment="Center"></TextBlock>
<touch:TouchComboBox ItemsSource="{Binding SpoolTypes}" SelectedItem="{Binding Job.SpoolType}" Margin="40 0 0 0" DisplayMemberPath="Name" Title="Select Output Spool" />
</DockPanel>
<DockPanel Style="{StaticResource Level2Container}">
<TextBlock Text="Segments per spool:" VerticalAlignment="Center"></TextBlock>
<touch:TouchToggleSlider Margin="30 0 0 0" BorderThickness="2" Height="38" Width="83" HorizontalAlignment="Left" UncheckedContent="One" CheckedContent="All" IsChecked="{Binding Job.IsAllSegmentsPerSpool}" />
</DockPanel>
</StackPanel>
</Border>
<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/job-summary.png" Width="39" />
<TextBlock FontWeight="Medium" Margin="20 0 0 0" VerticalAlignment="Center" FontSize="{StaticResource TangoExpanderHeaderFontSize}">Job Summary</TextBlock>
</StackPanel>
</StackPanel>
</Border>
<Border Style="{StaticResource TangoTouchBorder}" Margin="0 12 0 120" Padding="0 0 0 40">
<StackPanel>
<StackPanel Orientation="Horizontal" VerticalAlignment="Center" Style="{StaticResource Level1Container}">
<Image Source="../Images/JobView/additional-tools.png" Width="39" />
<TextBlock FontWeight="Medium" Margin="20 0 0 0" VerticalAlignment="Center" FontSize="{StaticResource TangoExpanderHeaderFontSize}">Additional Tools</TextBlock>
</StackPanel>
<StackPanel Style="{StaticResource Level2Container}" HorizontalAlignment="Left">
<DockPanel LastChildFill="False">
<TextBlock Text="Make a sample dye" VerticalAlignment="Center"></TextBlock>
<touch:TouchToggleSlider DockPanel.Dock="Right" Width="75" Style="{StaticResource TouchToggleButtonCheck}" Margin="30 0 0 0" Height="38" HorizontalAlignment="Left" />
</DockPanel>
<DockPanel Margin="0 25 0 0" LastChildFill="False">
<TextBlock Text="Run color fine tuning" VerticalAlignment="Center"></TextBlock>
<touch:TouchToggleSlider DockPanel.Dock="Right" Width="75" Style="{StaticResource TouchToggleButtonCheck}" Margin="30 0 0 0" Height="38" HorizontalAlignment="Left" />
</DockPanel>
</StackPanel>
</StackPanel>
</Border>
</StackPanel>
</StackPanel>
</touch:LightTouchScrollViewer>
</Grid>
<Grid Grid.Row="1">
<Grid.Background>
<LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
<GradientStop Offset="0" Color="#AEFFFFFF" />
<GradientStop Offset="1" Color="{StaticResource TangoPrimaryBackgroundColor}" />
</LinearGradientBrush>
</Grid.Background>
<Rectangle Stroke="{StaticResource TangoDividerBrush}" StrokeThickness="1" VerticalAlignment="Top" />
<Border Padding="20 20">
<Grid>
<touch:TouchButton Height="54" Padding="0" Width="184" CornerRadius="30" BlurRadius="20" HorizontalAlignment="Right" Command="{Binding DyeCommand}">
DYE
</touch:TouchButton>
</Grid>
</Border>
</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>
|