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
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
|
<UserControl x:Class="Tango.MachineStudio.Developer.Views.MainView"
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:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
xmlns:global="clr-namespace:Tango.MachineStudio.Developer"
xmlns:mahapps="http://metro.mahapps.com/winfx/xaml/controls"
xmlns:db="clr-namespace:Tango.MachineStudio.DB.Views.DBViews;assembly=Tango.MachineStudio.DB"
xmlns:commonControls="clr-namespace:Tango.MachineStudio.Common.Controls;assembly=Tango.MachineStudio.Common"
xmlns:designer="clr-namespace:Tango.MachineStudio.MachineDesigner.Views;assembly=Tango.MachineStudio.MachineDesigner"
xmlns:vm="clr-namespace:Tango.MachineStudio.Developer.ViewModels"
xmlns:localConverters="clr-namespace:Tango.MachineStudio.Developer.Converters"
xmlns:converters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI"
xmlns:observables="clr-namespace:Tango.DAL.Observables;assembly=Tango.DAL.Observables"
xmlns:shapes="clr-namespace:Tango.SharedUI.Shapes;assembly=Tango.SharedUI"
xmlns:local="clr-namespace:Tango.MachineStudio.Developer.Views"
mc:Ignorable="d"
d:DesignHeight="1080" d:DesignWidth="1920" Background="White" d:DataContext="{d:DesignInstance Type=vm:MainViewVM, IsDesignTimeCreatable=True}" DataContext="{x:Static global:ViewModelLocator.MainViewVM}">
<UserControl.Resources>
<Style TargetType="{x:Type TabItem}" BasedOn="{StaticResource {x:Type TabItem}}">
<Setter Property="mahapps:ControlsHelper.HeaderFontSize" Value="18" />
<Setter Property="Margin" Value="2" />
</Style>
<converters:ColorToIntegerConverter x:Key="ColorToIntegerConverter"></converters:ColorToIntegerConverter>
<localConverters:DbRmlViewToEntityConverter x:Key="DbRmlViewToEntityConverter"></localConverters:DbRmlViewToEntityConverter>
<converters:NullObjectToBooleanConverter x:Key="NullObjectToBooleanConverter"></converters:NullObjectToBooleanConverter>
<SolidColorBrush x:Key="SideBarBackground" Color="#F9F9F9">
</SolidColorBrush>
</UserControl.Resources>
<Grid>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Grid Grid.Column="1">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<Grid Background="{StaticResource SideBarBackground}">
<Grid.Style>
<Style TargetType="Grid">
<Setter Property="Height" Value="350"></Setter>
<Setter Property="LayoutTransform">
<Setter.Value>
<ScaleTransform ScaleX="1" ScaleY="0"></ScaleTransform>
</Setter.Value>
</Setter>
<Style.Triggers>
<DataTrigger Binding="{Binding IsSideBarOpened}" Value="True">
<DataTrigger.EnterActions>
<BeginStoryboard>
<Storyboard>
<DoubleAnimation Storyboard.TargetProperty="LayoutTransform.ScaleY" To="1" Duration="00:00:0.2"></DoubleAnimation>
</Storyboard>
</BeginStoryboard>
</DataTrigger.EnterActions>
<DataTrigger.ExitActions>
<BeginStoryboard>
<Storyboard>
<DoubleAnimation Storyboard.TargetProperty="LayoutTransform.ScaleY" To="0" Duration="00:00:0.2"></DoubleAnimation>
</Storyboard>
</BeginStoryboard>
</DataTrigger.ExitActions>
</DataTrigger>
</Style.Triggers>
</Style>
</Grid.Style>
<ScrollViewer VerticalScrollBarVisibility="Auto">
<StackPanel>
<Expander Header="PROCESS PARAMETERS" IsExpanded="True">
<Grid>
<Grid Height="250">
<StackPanel Orientation="Horizontal" Margin="25 0 0 0">
<Border Width="140" Margin="0 0 10 0" Padding="5" CornerRadius="5" BorderThickness="1" BorderBrush="Silver">
<DockPanel>
<TextBlock DockPanel.Dock="Top" VerticalAlignment="Center" Padding="2">HISTORY</TextBlock>
<ListBox Margin="0 10 0 0" ItemsSource="{Binding GroupsHistory}" SelectedItem="{Binding SelectedGroupHistory}">
<ListBox.ItemTemplate>
<DataTemplate>
<StackPanel>
<TextBlock Text="{Binding Name}" FontSize="11" FontWeight="Bold">
<TextBlock.Style>
<Style TargetType="TextBlock">
<Style.Triggers>
<DataTrigger Binding="{Binding Active}" Value="True">
<Setter Property="Foreground" Value="#FF5F5F"></Setter>
<Setter Property="FontStyle" Value="Italic"></Setter>
</DataTrigger>
</Style.Triggers>
</Style>
</TextBlock.Style>
</TextBlock>
<TextBlock Text="{Binding SaveDate}" FontStyle="Italic" Foreground="Gray" FontSize="10"></TextBlock>
</StackPanel>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</DockPanel>
</Border>
<ItemsControl ItemsSource="{Binding RmlProcessParametersTableGroup.ProcessParametersTables}" IsEnabled="{Binding RmlProcessParametersTableGroup.Active}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<WrapPanel IsItemsHost="True"></WrapPanel>
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate DataType="{x:Type observables:ProcessParametersTable}">
<Border Padding="5" CornerRadius="5" BorderThickness="1" BorderBrush="Silver" Height="250" Margin="0 0 10 0">
<DockPanel>
<TextBox materialDesign:HintAssist.Hint="Table Name" DockPanel.Dock="Top" Text="{Binding Name}"></TextBox>
<WrapPanel Orientation="Vertical" Margin="0 5 0 0">
<WrapPanel.Resources>
<Style TargetType="TextBlock" BasedOn="{StaticResource {x:Type TextBlock}}">
<Setter Property="FontSize" Value="10"></Setter>
<Setter Property="Foreground" Value="Gray"></Setter>
<Setter Property="Margin" Value="0 5 0 5"></Setter>
<Setter Property="MinWidth" Value="80"></Setter>
</Style>
<Style TargetType="Border">
<Setter Property="BorderBrush" Value="Gainsboro"></Setter>
<Setter Property="BorderThickness" Value="1"></Setter>
<Setter Property="Padding" Value="2"></Setter>
<Setter Property="Margin" Value="5"></Setter>
<Setter Property="CornerRadius" Value="3"></Setter>
</Style>
</WrapPanel.Resources>
<Border>
<StackPanel>
<TextBlock>Dyeing Speed:</TextBlock>
<mahapps:NumericUpDown Minimum="0" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding DyeingSpeed,Mode=TwoWay}"></mahapps:NumericUpDown>
</StackPanel>
</Border>
<Border>
<StackPanel>
<TextBlock>Min Ink Uptake:</TextBlock>
<mahapps:NumericUpDown Minimum="0" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding MinInkUptake,Mode=TwoWay}"></mahapps:NumericUpDown>
</StackPanel>
</Border>
<Border>
<StackPanel>
<TextBlock>Mixer Temp:</TextBlock>
<mahapps:NumericUpDown Minimum="0" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding MixerTemp,Mode=TwoWay}"></mahapps:NumericUpDown>
</StackPanel>
</Border>
<Border>
<StackPanel>
<TextBlock>Head Zone1 Temp:</TextBlock>
<mahapps:NumericUpDown Minimum="0" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding HeadZone1Temp,Mode=TwoWay}"></mahapps:NumericUpDown>
</StackPanel>
</Border>
<Border>
<StackPanel>
<TextBlock>Head Zone2 Temp:</TextBlock>
<mahapps:NumericUpDown Minimum="0" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding HeadZone2Temp,Mode=TwoWay}"></mahapps:NumericUpDown>
</StackPanel>
</Border>
<Border>
<StackPanel>
<TextBlock>Head Zone3 Temp:</TextBlock>
<mahapps:NumericUpDown Minimum="0" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding HeadZone3Temp,Mode=TwoWay}"></mahapps:NumericUpDown>
</StackPanel>
</Border>
<Border>
<StackPanel>
<TextBlock>Head Air Flow:</TextBlock>
<mahapps:NumericUpDown Minimum="0" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding HeadAirFlow,Mode=TwoWay}"></mahapps:NumericUpDown>
</StackPanel>
</Border>
<Border>
<StackPanel>
<TextBlock>Feeder Tension:</TextBlock>
<mahapps:NumericUpDown Minimum="0" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding FeederTension,Mode=TwoWay}"></mahapps:NumericUpDown>
</StackPanel>
</Border>
<Border>
<StackPanel>
<TextBlock>Puller Tension:</TextBlock>
<mahapps:NumericUpDown Minimum="0" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding PullerTension,Mode=TwoWay}"></mahapps:NumericUpDown>
</StackPanel>
</Border>
<Border>
<StackPanel>
<TextBlock>Dryer Buffer Length:</TextBlock>
<mahapps:NumericUpDown Minimum="0" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding DryerBufferLength,Mode=TwoWay}"></mahapps:NumericUpDown>
</StackPanel>
</Border>
<Border>
<StackPanel>
<TextBlock>Dryer Zone1 Temp:</TextBlock>
<mahapps:NumericUpDown Minimum="0" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding DryerZone1Temp,Mode=TwoWay}"></mahapps:NumericUpDown>
</StackPanel>
</Border>
<Border>
<StackPanel>
<TextBlock>Dryer Zone2 Temp:</TextBlock>
<mahapps:NumericUpDown Minimum="0" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding DryerZone2Temp,Mode=TwoWay}"></mahapps:NumericUpDown>
</StackPanel>
</Border>
<Border>
<StackPanel>
<TextBlock>Dryer Zone3 Temp:</TextBlock>
<mahapps:NumericUpDown Minimum="0" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding DryerZone3Temp,Mode=TwoWay}"></mahapps:NumericUpDown>
</StackPanel>
</Border>
<Border>
<StackPanel>
<TextBlock>Dryer Air Flow:</TextBlock>
<mahapps:NumericUpDown Minimum="0" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding DryerAirFlow,Mode=TwoWay}"></mahapps:NumericUpDown>
</StackPanel>
</Border>
<Border>
<StackPanel>
<TextBlock>Winder Tension:</TextBlock>
<mahapps:NumericUpDown Minimum="0" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding WinderTension,Mode=TwoWay}"></mahapps:NumericUpDown>
</StackPanel>
</Border>
</WrapPanel>
</DockPanel>
</Border>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
<StackPanel Margin="5 0 0 10" VerticalAlignment="Bottom">
<Button Command="{Binding SaveProcessParametersCommand}">SAVE GROUP</Button>
</StackPanel>
</StackPanel>
</Grid>
<Grid Background="White">
<Grid.Style>
<Style TargetType="Grid">
<Setter Property="Visibility" Value="Visible"></Setter>
<Style.Triggers>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition Binding="{Binding SelectedMachine,Converter={StaticResource NullObjectToBooleanConverter}}" Value="True"></Condition>
<Condition Binding="{Binding SelectedRML,Converter={StaticResource NullObjectToBooleanConverter}}" Value="True"></Condition>
</MultiDataTrigger.Conditions>
<Setter Property="Visibility" Value="Collapsed"></Setter>
</MultiDataTrigger>
</Style.Triggers>
</Style>
</Grid.Style>
<TextBlock Foreground="#FA9292" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="24">SELECT MACHINE & MEDIA</TextBlock>
</Grid>
</Grid>
</Expander>
<Expander Header="CONTROL PARAMETERS" IsExpanded="False">
</Expander>
</StackPanel>
</ScrollViewer>
<Rectangle VerticalAlignment="Bottom" Stroke="#CECECE" StrokeThickness="1"></Rectangle>
</Grid>
<Grid Grid.Row="1">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="234*"/>
<RowDefinition Height="131*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="173*"/>
<ColumnDefinition Width="467*"/>
</Grid.ColumnDefinitions>
<Grid>
<Rectangle HorizontalAlignment="Right" StrokeDashArray="5" StrokeThickness="1" Stroke="Silver" Margin="0 40 0 40"></Rectangle>
<DockPanel Margin="10">
<StackPanel DockPanel.Dock="Top" >
<StackPanel Orientation="Horizontal">
<Image Source="../Images/machine-trans.png" RenderOptions.BitmapScalingMode="Fant" Width="70"></Image>
<TextBlock VerticalAlignment="Top" FontWeight="SemiBold" Margin="10 10 0 0" FontSize="14">MACHINE JOBS</TextBlock>
</StackPanel>
<Rectangle VerticalAlignment="Bottom" StrokeDashArray="7" StrokeThickness="1" Stroke="Silver" Margin="0 8 0 0"></Rectangle>
</StackPanel>
<ListBox ItemsSource="{Binding SelectedMachine.Jobs}" SelectedItem="{Binding SelectedJob}" Margin="0 10 0 0">
<ListBox.ItemTemplate>
<DataTemplate>
<Grid>
<StackPanel Orientation="Horizontal">
<Image Source="../Images/rgb.png" Width="32"></Image>
<StackPanel VerticalAlignment="Center" Margin="10 0 0 0">
<TextBlock FontWeight="Bold" Text="{Binding Name}"></TextBlock>
<TextBlock Foreground="Gray" FontStyle="Italic" FontSize="10" Text="{Binding CreationDate}"></TextBlock>
</StackPanel>
</StackPanel>
</Grid>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</DockPanel>
</Grid>
<Grid Grid.Column="1" Margin="10">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<Grid>
<StackPanel>
<Grid>
<StackPanel Orientation="Horizontal" Margin="0 5 0 0">
<Image Source="../Images/rgb.png" Width="24"></Image>
<TextBlock Margin="5 0 0 0" Text="{Binding SelectedJob.Name,FallbackValue='UNSET'}" FontSize="16" FontWeight="SemiBold" VerticalAlignment="Center"></TextBlock>
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0 5 0 0" HorizontalAlignment="Right">
<TextBlock Margin="0 0 5 0" Text="{Binding SelectedJob.CreationDate,FallbackValue='UNSET'}" FontSize="12" Foreground="Gray" FontStyle="Italic" VerticalAlignment="Center"></TextBlock>
<Image Source="../Images/calendar.png" Width="16"></Image>
</StackPanel>
</Grid>
<StackPanel Orientation="Horizontal" Margin="0 20 0 0" MaxWidth="800" HorizontalAlignment="Left">
<StackPanel Margin="5" Width="140">
<StackPanel Orientation="Horizontal">
<Image Source="../Images/name.png" Width="32"></Image>
<TextBlock VerticalAlignment="Center" Margin="5 0 0 0" FontSize="10">Name</TextBlock>
</StackPanel>
<TextBox Margin="0 3 0 0" Text="{Binding SelectedJob.Name,UpdateSourceTrigger=PropertyChanged}" materialDesign:HintAssist.Hint="Name"></TextBox>
</StackPanel>
<StackPanel Margin="20 5 5 5" Width="140">
<StackPanel Orientation="Horizontal">
<Image Source="../Images/wind.png" Width="32"></Image>
<TextBlock VerticalAlignment="Center" Margin="5 0 0 0" FontSize="10">Winding Method</TextBlock>
</StackPanel>
<ComboBox ItemsSource="{Binding Adapter.WindingMethods}" SelectedItem="{Binding SelectedJob.WindingMethods}" DisplayMemberPath="Name" materialDesign:HintAssist.Hint="Winding Method"></ComboBox>
</StackPanel>
<StackPanel Margin="20 5 5 5" Width="140">
<StackPanel Orientation="Horizontal">
<Image Source="../Images/inter-segment.png" Width="32"></Image>
<TextBlock VerticalAlignment="Center" Margin="5 0 0 0" FontSize="10">Inter Segment</TextBlock>
</StackPanel>
<DockPanel LastChildFill="True">
<ToggleButton DockPanel.Dock="Right" VerticalAlignment="Bottom" HorizontalAlignment="Right" IsChecked="{Binding SelectedJob.EnableInterSegment}"></ToggleButton>
<mahapps:NumericUpDown IsEnabled="{Binding SelectedJob.EnableInterSegment}" Margin="0 2 0 0" HideUpDownButtons="True" Minimum="0" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0 0 0 1" BorderBrush="DimGray" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding SelectedJob.InterSegmentLength,Mode=TwoWay}"></mahapps:NumericUpDown>
</DockPanel>
</StackPanel>
<StackPanel Margin="20 5 5 5" Width="140">
<StackPanel Orientation="Horizontal">
<Image Source="../Images/lubrication.png" Width="32"></Image>
<TextBlock VerticalAlignment="Center" Margin="5 0 0 0" FontSize="10">Lubrication</TextBlock>
</StackPanel>
<DockPanel LastChildFill="True" Margin="0 10 0 0">
<ToggleButton DockPanel.Dock="Right" VerticalAlignment="Center" HorizontalAlignment="Right" IsChecked="{Binding SelectedJob.EnableLubrication}"></ToggleButton>
<TextBlock HorizontalAlignment="Left">Enable</TextBlock>
</DockPanel>
</StackPanel>
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="10 20 0 0">
<Image Source="../Images/description.png" Width="32"></Image>
<TextBlock VerticalAlignment="Center" Margin="5 0 0 0" FontSize="10">Description</TextBlock>
</StackPanel>
<Border BorderThickness="1" BorderBrush="Silver" CornerRadius="5" Margin="0 0 5 5">
<TextBox Style="{x:Null}" BorderThickness="0" Margin="5" Height="80" Text="{Binding SelectedJob.Description}" VerticalAlignment="Stretch" materialDesign:HintAssist.Hint="Enter description" AcceptsReturn="True" TextWrapping="Wrap" VerticalScrollBarVisibility="Auto"></TextBox>
</Border>
</StackPanel>
</Grid>
<Grid Grid.Column="1" Background="{StaticResource SideBarBackground}" Margin="10 0 0 0" Width="400">
<Grid.Style>
<Style TargetType="Grid">
<Setter Property="LayoutTransform">
<Setter.Value>
<ScaleTransform ScaleY="1" ScaleX="1"></ScaleTransform>
</Setter.Value>
</Setter>
<Style.Triggers>
<DataTrigger Binding="{Binding IsSideBarOpened}" Value="True">
<DataTrigger.EnterActions>
<BeginStoryboard>
<Storyboard>
<DoubleAnimation Storyboard.TargetProperty="LayoutTransform.ScaleX" To="0" Duration="00:00:0.2"></DoubleAnimation>
</Storyboard>
</BeginStoryboard>
</DataTrigger.EnterActions>
<DataTrigger.ExitActions>
<BeginStoryboard>
<Storyboard>
<DoubleAnimation Storyboard.TargetProperty="LayoutTransform.ScaleX" To="1" Duration="00:00:0.2"></DoubleAnimation>
</Storyboard>
</BeginStoryboard>
</DataTrigger.ExitActions>
</DataTrigger>
</Style.Triggers>
</Style>
</Grid.Style>
<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center">CAMERAS</TextBlock>
</Grid>
</Grid>
<Grid Grid.Row="1" Grid.ColumnSpan="2">
</Grid>
</Grid>
</Grid>
</Grid>
<Grid Background="{StaticResource SideBarBackground}">
<Grid.Style>
<Style TargetType="Grid">
<Setter Property="Width" Value="550"></Setter>
<Setter Property="LayoutTransform">
<Setter.Value>
<ScaleTransform ScaleY="1" ScaleX="0"></ScaleTransform>
</Setter.Value>
</Setter>
<Style.Triggers>
<DataTrigger Binding="{Binding IsSideBarOpened}" Value="True">
<DataTrigger.EnterActions>
<BeginStoryboard>
<Storyboard>
<DoubleAnimation Storyboard.TargetProperty="LayoutTransform.ScaleX" To="1" Duration="00:00:0.2"></DoubleAnimation>
</Storyboard>
</BeginStoryboard>
</DataTrigger.EnterActions>
<DataTrigger.ExitActions>
<BeginStoryboard>
<Storyboard>
<DoubleAnimation Storyboard.TargetProperty="LayoutTransform.ScaleX" To="0" Duration="00:00:0.2"></DoubleAnimation>
</Storyboard>
</BeginStoryboard>
</DataTrigger.ExitActions>
</DataTrigger>
</Style.Triggers>
</Style>
</Grid.Style>
<ScrollViewer VerticalScrollBarVisibility="Auto" FlowDirection="RightToLeft">
<materialDesign:Card Background="{StaticResource SideBarBackground}" FlowDirection="LeftToRight">
<StackPanel>
<Expander Header="MACHINE" IsExpanded="True" Background="{StaticResource SideBarBackground}">
<StackPanel Margin="0 0 0 0">
<ComboBox ItemsSource="{Binding Adapter.Machines}" SelectedItem="{Binding SelectedMachine}" materialDesign:HintAssist.IsFloating="True" materialDesign:HintAssist.Hint="Selected Machine" Margin="40 0 40 0">
<ComboBox.ItemTemplate>
<DataTemplate>
<StackPanel>
<TextBlock Text="{Binding SerialNumber}" FontWeight="Bold" FontStyle="Italic"></TextBlock>
<TextBlock FontSize="11" Text="{Binding Name}" Foreground="Gray"></TextBlock>
</StackPanel>
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
<designer:MachineView IsHitTestVisible="False" Margin="0 40 0 0" DataContext="{Binding SelectedMachine}" />
<Button Command="{Binding EditMachineCommand}" HorizontalAlignment="Right" Margin="0 10 20 20" Style="{StaticResource MaterialDesignFlatButton}">
<StackPanel Orientation="Horizontal">
<materialDesign:PackIcon VerticalAlignment="Center" Kind="Pencil"></materialDesign:PackIcon>
<TextBlock Margin="10 0 0 0">EDIT</TextBlock>
</StackPanel>
</Button>
</StackPanel>
</Expander>
<Separator Foreground="{StaticResource MaterialDesignDivider}" Background="{StaticResource MaterialDesignDivider}" />
<Expander Header="MEDIA" Background="{StaticResource SideBarBackground}" IsExpanded="True">
<StackPanel>
<ComboBox DockPanel.Dock="Top" ItemsSource="{Binding Adapter.Rmls}" SelectedItem="{Binding SelectedRML}" materialDesign:HintAssist.IsFloating="True" materialDesign:HintAssist.Hint="Selected Thread" Margin="40 0 40 0">
<ComboBox.ItemTemplate>
<DataTemplate>
<StackPanel>
<TextBlock Text="{Binding Name}" FontWeight="Bold" FontStyle="Italic"></TextBlock>
<TextBlock FontSize="11" Text="{Binding Manufacturer}" Foreground="Gray"></TextBlock>
</StackPanel>
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
<Button DockPanel.Dock="Bottom" Command="{Binding EditRMLCommand}" HorizontalAlignment="Right" Margin="0 10 20 20" Style="{StaticResource MaterialDesignFlatButton}">
<StackPanel Orientation="Horizontal">
<materialDesign:PackIcon VerticalAlignment="Center" Kind="Pencil"></materialDesign:PackIcon>
<TextBlock Margin="10 0 0 0">EDIT</TextBlock>
</StackPanel>
</Button>
</StackPanel>
</Expander>
<Separator Foreground="{StaticResource MaterialDesignDivider}" Background="{StaticResource MaterialDesignDivider}" />
<Expander Background="{StaticResource SideBarBackground}" IsExpanded="True">
<Expander.HeaderTemplate>
<DataTemplate>
<TextBlock><Run>LIQUID FACTORS</Run> <Run FontSize="10" Foreground="DimGray">( Max Nanolitter/CM )</Run></TextBlock>
</DataTemplate>
</Expander.HeaderTemplate>
<Grid>
<StackPanel Margin="40 0 40 0">
<ItemsControl ItemsSource="{Binding LiquidTypesRmls}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<WrapPanel IsItemsHost="True"></WrapPanel>
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate DataType="{x:Type observables:LiquidTypesRml}">
<StackPanel Margin="0 0 10 20">
<TextBlock HorizontalAlignment="Center" FontSize="10" Foreground="DimGray" Text="{Binding LiquidTypes.Name}"></TextBlock>
<Grid Width="60" Height="50" Margin="0 5 0 0">
<shapes:Hexagon StrokeThickness="1" Stroke="Gray">
<shapes:Hexagon.Fill>
<LinearGradientBrush Opacity="0.7" >
<GradientStop Color="{Binding LiquidTypes.Color,Converter={StaticResource ColorToIntegerConverter}}"/>
<GradientStop Color="White" Offset="1"/>
</LinearGradientBrush>
</shapes:Hexagon.Fill>
</shapes:Hexagon>
<TextBox Style="{x:Null}" Background="Transparent" Foreground="Black" BorderThickness="0" Text="{Binding MaxNlPerCm}" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" FontWeight="Bold" FontStyle="Italic"></TextBox>
</Grid>
<!--<mahapps:NumericUpDown Minimum="0" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding MaxNlPerCm,Mode=TwoWay}"></mahapps:NumericUpDown>-->
</StackPanel>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
<Button Command="{Binding SaveLiquidFactorsCommand}" HorizontalAlignment="Right" Margin="0 10 -20 20" Style="{StaticResource MaterialDesignFlatButton}">
<StackPanel Orientation="Horizontal">
<materialDesign:PackIcon VerticalAlignment="Center" Kind="Harddisk"></materialDesign:PackIcon>
<TextBlock Margin="10 0 0 0">SAVE</TextBlock>
</StackPanel>
</Button>
</StackPanel>
<Grid Height="150" Background="{StaticResource SideBarBackground}">
<Grid.Style>
<Style TargetType="Grid">
<Setter Property="Visibility" Value="Visible"></Setter>
<Style.Triggers>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition Binding="{Binding SelectedMachine,Converter={StaticResource NullObjectToBooleanConverter}}" Value="True"></Condition>
<Condition Binding="{Binding SelectedRML,Converter={StaticResource NullObjectToBooleanConverter}}" Value="True"></Condition>
</MultiDataTrigger.Conditions>
<Setter Property="Visibility" Value="Collapsed"></Setter>
</MultiDataTrigger>
</Style.Triggers>
</Style>
</Grid.Style>
<TextBlock Foreground="#FA9292" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="24">SELECT MACHINE & MEDIA</TextBlock>
</Grid>
</Grid>
</Expander>
</StackPanel>
</materialDesign:Card>
</ScrollViewer>
<Rectangle HorizontalAlignment="Right" Stroke="#CECECE" StrokeThickness="1"></Rectangle>
</Grid>
<Button Background="{StaticResource SideBarBackground}" Command="{Binding ToggleSideBarCommand}" Padding="0" Style="{StaticResource MaterialDesignFlatButton}" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch" HorizontalAlignment="Right" VerticalAlignment="Center" Height="200" Width="50" Margin="0 0 -50 0">
<Border CornerRadius="0 10 10 0" BorderThickness="0 1 1 1" BorderBrush="#C6C0C0">
<Grid>
<TextBlock Text="CONFIGURATION" FontSize="16" RenderTransformOrigin="0.5,0.5" VerticalAlignment="Center" HorizontalAlignment="Center">
<TextBlock.LayoutTransform>
<RotateTransform Angle="270"></RotateTransform>
</TextBlock.LayoutTransform>
</TextBlock>
</Grid>
</Border>
</Button>
</Grid>
</Grid>
</UserControl>
|