aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/FSE/Modules/Tango.FSE.Statistics/Views/MainView.xaml
blob: 099ab57f9aac56487c63fca3ad81e634336f0ce5 (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
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
<UserControl x:Class="Tango.FSE.Statistics.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:global="clr-namespace:Tango.FSE.Statistics"
             xmlns:vm="clr-namespace:Tango.FSE.Statistics.ViewModels"
             xmlns:mahapps="http://metro.mahapps.com/winfx/xaml/controls"
             xmlns:controls="clr-namespace:Tango.FSE.Common.Controls;assembly=Tango.FSE.Common"
             xmlns:autoComplete="clr-namespace:Tango.AutoComplete.Editors;assembly=Tango.AutoComplete"
             xmlns:material="http://materialdesigninxaml.net/winfx/xaml/themes"
             xmlns:lvc="clr-namespace:LiveCharts.Wpf;assembly=LiveCharts.Wpf"
             xmlns:local="clr-namespace:Tango.FSE.Statistics.Views"
             mc:Ignorable="d" 
             d:DesignHeight="720" d:DesignWidth="1280" Background="{StaticResource FSE_PrimaryBackgroundBrush}" d:DataContext="{d:DesignInstance Type=vm:MainViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.MainViewVM}">

    <UserControl.Resources>
        <Style x:Key="EmptyColumnStyle" TargetType="DataGridCell" BasedOn="{StaticResource {x:Type DataGridCell}}">
            <Setter Property="Background" Value="{StaticResource FSE_PrimaryBackgroundLightBrush}"></Setter>
            <Setter Property="BorderBrush" Value="{StaticResource FSE_PrimaryBackgroundLightBrush}"></Setter>
            <Setter Property="BorderThickness" Value="0 0 0 1"></Setter>
            <Setter Property="Margin" Value="15 0 0 -1"></Setter>
            <Setter Property="Padding" Value="0"></Setter>
            <Style.Triggers>
                <Trigger Property="IsSelected" Value="True">
                    <Setter Property="Background" Value="{StaticResource FSE_PrimaryBackgroundLightBrush}"></Setter>
                </Trigger>
            </Style.Triggers>
        </Style>

        <DataTemplate x:Key="EmptyColumnTemplate">
            <Grid>
                <Border Width="30" HorizontalAlignment="Left" Background="{StaticResource FSE_PrimaryBackgroundBrush}" Margin="-28 -10 0 -10" Height="35" />
                <Border Background="{Binding BestMatchBrush,Mode=OneWay}" Width="20" Height="20" HorizontalAlignment="Left" Margin="10 0 0 0">
                    <Border.ToolTip>
                        <TextBlock>
                            <Run FontWeight="SemiBold">Best Match</Run>
                            <LineBreak/>
                            <Run Text="{Binding BestMatchR}"></Run>,
                            <Run Text="{Binding BestMatchG}"></Run>,
                            <Run Text="{Binding BestMatchB}"></Run>
                        </TextBlock>
                    </Border.ToolTip>
                </Border>
            </Grid>
        </DataTemplate>

        <Style x:Key="EmptyColumnStyle2" TargetType="DataGridCell" BasedOn="{StaticResource {x:Type DataGridCell}}">
            <Setter Property="Background" Value="{StaticResource FSE_PrimaryBackgroundLightBrush}"></Setter>
            <Setter Property="BorderBrush" Value="{StaticResource FSE_PrimaryBackgroundLightBrush}"></Setter>
            <Setter Property="BorderThickness" Value="0 0 0 1"></Setter>
            <Setter Property="Margin" Value="0 0 0 -1"></Setter>
            <Setter Property="Padding" Value="0"></Setter>
            <Style.Triggers>
                <Trigger Property="IsSelected" Value="True">
                    <Setter Property="Background" Value="{StaticResource FSE_PrimaryBackgroundLightBrush}"></Setter>
                </Trigger>
            </Style.Triggers>
        </Style>
    </UserControl.Resources>

    <Grid IsEnabled="{Binding IsFree}">

        <Border Margin="40 0 0 0">
            <Grid>
                <DataGrid Style="{StaticResource FSE_DataGrid}" HeadersVisibility="Column" CellStyle="{StaticResource FSE_DataGrid_Cell}" ItemsSource="{Binding StopsView}" SelectedIndex="-1">
                    <DataGrid.GroupStyle>
                        <GroupStyle>
                            <GroupStyle.ContainerStyle>
                                <Style TargetType="{x:Type GroupItem}">
                                    <Setter Property="Template">
                                        <Setter.Value>
                                            <ControlTemplate TargetType="{x:Type GroupItem}">
                                                <StackPanel>
                                                    <Border Background="{StaticResource FSE_PrimaryBackgroundLightBrush}" MinHeight="60" BorderBrush="{StaticResource FSE_BorderBrush}" BorderThickness="1">
                                                        <Grid>
                                                            <StackPanel Margin="10 0 0 0" Orientation="Horizontal">
                                                                <material:PackIcon Background="Transparent" Width="24" Height="24" VerticalAlignment="Center" DataContext="{Binding Items[0].Items[0].JobRun}">
                                                                    <material:PackIcon.Style>
                                                                        <Style TargetType="material:PackIcon">
                                                                            <Setter Property="Kind" Value="CheckBold"></Setter>
                                                                            <Setter Property="Foreground" Value="{StaticResource FSE_SuccessBrush}"></Setter>
                                                                            <Setter Property="ToolTip" Value="Completed"></Setter>
                                                                            <Style.Triggers>
                                                                                <DataTrigger Binding="{Binding Status}" Value="1">
                                                                                    <Setter Property="Kind" Value="Alert"></Setter>
                                                                                    <Setter Property="Foreground" Value="{StaticResource FSE_WarningBrush}"></Setter>
                                                                                    <Setter Property="ToolTip" Value="Aborted By User"></Setter>
                                                                                </DataTrigger>
                                                                                <DataTrigger Binding="{Binding Status}" Value="2">
                                                                                    <Setter Property="Kind" Value="Alert"></Setter>
                                                                                    <Setter Property="Foreground" Value="{StaticResource FSE_ErrorBrush}"></Setter>
                                                                                    <Setter Property="ToolTip" Value="Failed"></Setter>
                                                                                </DataTrigger>
                                                                            </Style.Triggers>
                                                                        </Style>
                                                                    </material:PackIcon.Style>
                                                                </material:PackIcon>
                                                                <TextBlock Margin="10 0 0 0" Width="140" TextWrapping="Wrap" FontWeight="Bold" VerticalAlignment="Center" FontSize="14" Text="{Binding Items[0].Items[0].JobRun.JobName}" />
                                                                <TextBlock Margin="20 0 0 0" Text="{Binding Items[0].Items[0].ThreadName}" VerticalAlignment="Center" Width="100" TextWrapping="Wrap"></TextBlock>
                                                                <TextBlock Margin="20 0 0 0" Text="{Binding Items[0].Items[0].JobRun.JobLength}" VerticalAlignment="Center" Width="80"></TextBlock>
                                                                <TextBlock Text="{Binding Items[0].Items[0].JobRun.StartDate,Converter={StaticResource DateTimeUTCToShortDateTimeConverter}}" VerticalAlignment="Center" Width="120"></TextBlock>
                                                                <TextBlock Text="{Binding Items[0].Items[0].Duration,Mode=OneWay,Converter={StaticResource TotalDyeTimeConverter}}" VerticalAlignment="Center" Width="100"></TextBlock>
                                                                <TextBlock Text="{Binding Items[0].Items[0].JobRun.EndPosition,StringFormat=N1}" VerticalAlignment="Center" Width="80"></TextBlock>
                                                            </StackPanel>

                                                            <Grid Visibility="{Binding IsAdvancedMode,Converter={StaticResource BooleanToVisibilityConverter}}" DataContext="{Binding Items[0].Items[0]}" Width="250" Margin="0 0 50 5" HorizontalAlignment="Right" VerticalAlignment="Bottom">
                                                                <StackPanel Orientation="Horizontal">
                                                                    <TextBlock Width="175" VerticalAlignment="Center" Foreground="{StaticResource FSE_GrayBrush}" FontSize="{StaticResource FSE_SmallerFontSize}" FontStyle="Italic">
                                                                        <Run>App:</Run>
                                                                        <Run Text="{Binding JobRun.ApplicationVersion,TargetNullValue='N/A'}"></Run>,
                                                                        <Run>Firmware:</Run>
                                                                        <Run Text="{Binding JobRun.FirmwareVersion,TargetNullValue='N/A'}"></Run>,
                                                                        <Run>CE:</Run>
                                                                        <Run Text="{Binding JobRun.CeVersion,TargetNullValue='N/A'}"></Run>
                                                                    </TextBlock>

                                                                    <controls:ToggleIconButton x:Name="toggleProcess" CheckedIcon="ArrowDown" UncheckedIcon="Settings" Width="14" Background="Transparent" Foreground="{StaticResource FSE_GrayBrush}" UncheckedForeground="{StaticResource FSE_GrayBrush}" Height="14" Cursor="Hand" Margin="5 0 0 0" />

                                                                    <Popup AllowsTransparency="True" PlacementTarget="{Binding ElementName=toggleProcess}" StaysOpen="False" Placement="Bottom" IsOpen="{Binding ElementName=toggleProcess,Path=IsChecked,Mode=TwoWay}">
                                                                        <Border Background="{StaticResource FSE_PrimaryBackgroundLighterBrush}" Padding="5" CornerRadius="5">
                                                                            <Grid>
                                                                                <StackPanel>
                                                                                    <TextBlock FontWeight="Bold" FontStyle="Italic" TextDecorations="Underline">Process Parameters</TextBlock>
                                                                                    <ItemsControl Margin="0 5 0 0" ItemsSource="{Binding ProcessParameters.Parameters}" FontSize="{StaticResource FSE_SmallerFontSize}">
                                                                                        <ItemsControl.ItemTemplate>
                                                                                            <DataTemplate>
                                                                                                <TextBlock>
                                                                                                    <Run Text="{Binding Name}" FontWeight="SemiBold"></Run>:
                                                                                                    <Run Text="{Binding Value}"></Run>
                                                                                                </TextBlock>
                                                                                            </DataTemplate>
                                                                                        </ItemsControl.ItemTemplate>
                                                                                    </ItemsControl>
                                                                                </StackPanel>
                                                                            </Grid>
                                                                        </Border>
                                                                    </Popup>    
                                                                </StackPanel>
                                                            </Grid>

                                                            <controls:IconButton DataContext="{Binding Items[0].Items[0]}" Command="{Binding ShowFailedMessageCommand}" CommandParameter="{Binding}" Width="32" Height="32" ToolTip="Show failure reason" Cursor="Hand" HorizontalAlignment="Right" VerticalAlignment="Center" Icon="MessageAlert" Foreground="{StaticResource FSE_ErrorBrush}" Margin="0 0 10 0">
                                                                <controls:IconButton.Style>
                                                                    <Style TargetType="controls:IconButton" BasedOn="{StaticResource {x:Type controls:IconButton}}">
                                                                        <Setter Property="Visibility" Value="Hidden"></Setter>
                                                                        <Style.Triggers>
                                                                            <DataTrigger Binding="{Binding JobRun.Status}" Value="2">
                                                                                <Setter Property="Visibility" Value="Visible"></Setter>
                                                                            </DataTrigger>
                                                                        </Style.Triggers>
                                                                    </Style>
                                                                </controls:IconButton.Style>
                                                            </controls:IconButton>
                                                        </Grid>
                                                    </Border>
                                                    <ItemsPresenter />
                                                </StackPanel>
                                            </ControlTemplate>
                                        </Setter.Value>
                                    </Setter>
                                </Style>
                            </GroupStyle.ContainerStyle>
                        </GroupStyle>
                        <GroupStyle>
                            <GroupStyle.HeaderTemplate>
                                <DataTemplate>
                                    <StackPanel>
                                        <Border Margin="20 0 0 0" Background="#383838" Padding="0 5" BorderBrush="{StaticResource FSE_PrimaryBackgroundMidBrush}" BorderThickness="0 0 0 1">
                                            <StackPanel Orientation="Horizontal">
                                                <TextBlock Margin="10 0 0 0" FontWeight="Bold" VerticalAlignment="Center" Foreground="{StaticResource FSE_GrayBrush}">
                                                <Run>Segment</Run>
                                                <Run Text="{Binding Name,Mode=OneWay}"></Run>
                                                </TextBlock>

                                                <TextBlock Margin="233 0 0 0" Text="{Binding Items[0].Segment.Length,StringFormat=N1}" VerticalAlignment="Center" Width="80" Foreground="{StaticResource FSE_GrayBrush}" FontSize="12"></TextBlock>
                                            </StackPanel>
                                        </Border>
                                    </StackPanel>
                                </DataTemplate>
                            </GroupStyle.HeaderTemplate>
                        </GroupStyle>
                    </DataGrid.GroupStyle>
                    <DataGrid.Columns>
                        <DataGridTemplateColumn Header="         NAME" Width="190" CellStyle="{StaticResource EmptyColumnStyle}" CellTemplate="{StaticResource EmptyColumnTemplate}" />
                        <DataGridTextColumn Header="THREAD" Width="120" CellStyle="{StaticResource EmptyColumnStyle2}" />
                        <DataGridTextColumn Header="LENGTH" Width="80" CellStyle="{StaticResource EmptyColumnStyle2}" />
                        <DataGridTextColumn Header="START TIME" Width="120" CellStyle="{StaticResource EmptyColumnStyle2}" />
                        <DataGridTextColumn Header="DURATION" Width="100" CellStyle="{StaticResource EmptyColumnStyle2}" />
                        <DataGridTextColumn Header="END POSITION" Width="120" CellStyle="{StaticResource EmptyColumnStyle2}" />
                        <DataGridTextColumn Header="OFFSET" Width="90" Binding="{Binding StartMeters}" />
                        <DataGridTextColumn Header="COLOR SPACE" Width="120" Binding="{Binding ColorSpace}" />
                        <DataGridTextColumn Header="INPUT" Width="150" Binding="{Binding Input}" />
                        <DataGridTemplateColumn Header="OUTPUT" Width="*">
                            <DataGridTemplateColumn.CellTemplate>
                                <DataTemplate>
                                    <Grid>
                                        <StackPanel Orientation="Horizontal">
                                            <Grid>
                                                <TextBlock HorizontalAlignment="Center" FontWeight="Bold">
                                                <Run Foreground="Cyan" Text="{Binding CyanOutput,Mode=OneWay,TargetNullValue=0}"></Run>
                                                ,
                                                <Run Foreground="Magenta" Text="{Binding MagentaOutput,Mode=OneWay,TargetNullValue=0}"></Run>
                                                ,
                                                <Run Foreground="Yellow" Text="{Binding YellowOutput,Mode=OneWay,TargetNullValue=0}"></Run>
                                                ,
                                                <Run Foreground="Black" Text="{Binding BlackOutput,Mode=OneWay,TargetNullValue=0}"></Run>
                                                ,
                                                <Run Foreground="#9BFFFF" Text="{Binding LightCyanOutput,Mode=OneWay,TargetNullValue=0}"></Run>
                                                ,
                                                <Run Foreground="#FFA5FF" Text="{Binding LightMagentaOutput,Mode=OneWay,TargetNullValue=0}"></Run>
                                                ,
                                                <Run Foreground="#FFFF9B" Text="{Binding LightYellowOutput,Mode=OneWay,TargetNullValue=0}"></Run>
                                                ,
                                                <Run Foreground="#BBBBBB" Text="{Binding TransparentInkOutput,Mode=OneWay,TargetNullValue=0}"></Run>
                                                </TextBlock>
                                            </Grid>
                                        </StackPanel>
                                    </Grid>
                                </DataTemplate>
                            </DataGridTemplateColumn.CellTemplate>
                        </DataGridTemplateColumn>
                    </DataGrid.Columns>
                </DataGrid>
                <Border Margin="0 48 0 0" Background="{StaticResource FSE_PrimaryBackgroundBrush}" Visibility="{Binding IsResultsAvailable,Converter={StaticResource BooleanToVisibilityInverseConverter}}">
                    <Border Width="400" Padding="50" CornerRadius="25" HorizontalAlignment="Center" VerticalAlignment="Center" Background="{StaticResource FSE_PrimaryBackgroundDarkBrush}">
                        <TextBlock HorizontalAlignment="Center" Foreground="{StaticResource FSE_GrayBrush}" FontSize="25">NO DATA AVAILABLE</TextBlock>
                    </Border>
                </Border>
            </Grid>
        </Border>

        <!--Left Panel-->
        <Border HorizontalAlignment="Left" Background="{StaticResource FSE_PrimaryBackgroundMidBrush}" BorderThickness="0 0 1 0" BorderBrush="{StaticResource FSE_BorderBrush}">
            <Border.Style>
                <Style TargetType="Border">
                    <Setter Property="Margin" Value="-300 0 0 0"></Setter>
                    <Style.Triggers>
                        <DataTrigger Binding="{Binding ElementName=chkSettingsBar,Path=IsChecked}" Value="True">
                            <DataTrigger.EnterActions>
                                <BeginStoryboard>
                                    <Storyboard>
                                        <ThicknessAnimation Storyboard.TargetProperty="Margin" To="0 0 0 0" Duration="00:00:0.2" />
                                    </Storyboard>
                                </BeginStoryboard>
                            </DataTrigger.EnterActions>
                            <DataTrigger.ExitActions>
                                <BeginStoryboard>
                                    <Storyboard>
                                        <ThicknessAnimation Storyboard.TargetProperty="Margin" To="-300 0 0 0" Duration="00:00:0.2" />
                                    </Storyboard>
                                </BeginStoryboard>
                            </DataTrigger.ExitActions>
                        </DataTrigger>
                    </Style.Triggers>
                </Style>
            </Border.Style>
            <Grid Width="300" ClipToBounds="False">
                <DockPanel>
                    <Menu DockPanel.Dock="Top" Margin="0 0 0 0" Background="{StaticResource FSE_PrimaryBackgroundMidBrush}">
                        <MenuItem Header="_File">
                            <MenuItem Header="Export To CSV" Command="{Binding ExportToCsvCommand}">
                                <MenuItem.Icon>
                                    <material:PackIcon Kind="FileCsv" />
                                </MenuItem.Icon>
                            </MenuItem>
                        </MenuItem>
                    </Menu>

                    <DockPanel>
                        <Button DockPanel.Dock="Bottom" Command="{Binding GetStatisticsCommand}" HorizontalAlignment="Center" Width="250" Style="{StaticResource FSE_Button_Polygon}" Height="40" FontSize="14" Margin="0 20 0 30" IsEnabled="{Binding MachineProvider.IsPPCAvailable}">Get Statistics</Button>

                        <ScrollViewer IsEnabled="{Binding IsFiltersAvailable}" Margin="0 30 0 0" HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto">
                            <Border Padding="20">
                                <StackPanel VerticalAlignment="Top">
                                    <StackPanel>
                                        <GroupBox Padding="5 0 0 0" Style="{StaticResource FSE_Game_GroupBox}" Background="{StaticResource FSE_PrimaryBackgroundDarkBrush}">
                                            <GroupBox.Header>
                                                <TextBox FontSize="{StaticResource FSE_SmallerFontSize}">Start Date</TextBox>
                                            </GroupBox.Header>
                                            <DatePicker SelectedDate="{Binding StartSelectedDate}" />
                                        </GroupBox>

                                        <GroupBox Margin="0 30 0 0" Padding="5 0 0 0" Style="{StaticResource FSE_Game_GroupBox}" Background="{StaticResource FSE_PrimaryBackgroundDarkBrush}">
                                            <GroupBox.Header>
                                                <TextBox FontSize="{StaticResource FSE_SmallerFontSize}">End Date</TextBox>
                                            </GroupBox.Header>
                                            <DatePicker SelectedDate="{Binding EndSelectedDate}" />
                                        </GroupBox>

                                        <GroupBox Margin="0 30 0 0" Padding="5 0 0 0" Style="{StaticResource FSE_Game_GroupBox}" Height="49" Background="{StaticResource FSE_PrimaryBackgroundDarkBrush}">
                                            <GroupBox.Header>
                                                <TextBox FontSize="{StaticResource FSE_SmallerFontSize}">Threads</TextBox>
                                            </GroupBox.Header>
                                            <controls:SelectionComboBox Background="{StaticResource FSE_PrimaryBackgroundDarkBrush}" Margin="-5 0 0 0" Width="Auto" ItemsSource="{Binding SelectedThreads}" DisplayMemberPath="Name" FontSize="{StaticResource FSE_SmallFontSize}"  />
                                        </GroupBox>

                                        <GroupBox Margin="0 30 0 0" Padding="5 0 0 0" Style="{StaticResource FSE_Game_GroupBox}" Height="49" Background="{StaticResource FSE_PrimaryBackgroundDarkBrush}">
                                            <GroupBox.Header>
                                                <TextBox FontSize="{StaticResource FSE_SmallerFontSize}">Status</TextBox>
                                            </GroupBox.Header>
                                            <controls:SelectionComboBox Background="{StaticResource FSE_PrimaryBackgroundDarkBrush}" Margin="-5 0 0 0" Width="Auto" ItemsSource="{Binding JobRunSelectedStatuses}" FontSize="{StaticResource FSE_SmallFontSize}"  />
                                        </GroupBox>

                                        <GroupBox Margin="0 30 0 0" Padding="5 0 0 0" Style="{StaticResource FSE_Game_GroupBox}" Height="55" Background="{StaticResource FSE_PrimaryBackgroundDarkBrush}">
                                            <GroupBox.Header>
                                                <TextBox FontSize="{StaticResource FSE_SmallerFontSize}">Job</TextBox>
                                            </GroupBox.Header>
                                            <DockPanel>
                                                <controls:ToggleIconButton DockPanel.Dock="Right" Width="18" Height="18" CheckedIcon="FormatLetterMatches" UncheckedIcon="FormatLetterStartsWith" Margin="10 1 5 0" VerticalAlignment="Center" IsChecked="{Binding JobNameExact,Mode=TwoWay}" CheckedForeground="{StaticResource FSE_OrangeBrush}" ToolTip="Match exact job name or anything that starts with" />
                                                <autoComplete:AutoCompleteTextBox BorderThickness="0" FontSize="{StaticResource FSE_SmallFontSize}" material:HintAssist.Hint="Job Name" MaxPopupHeight="300" Margin="0 5 0 0" Provider="{Binding JobsAutoCompleteProvider}" Text="{Binding JobName,Mode=TwoWay}" />
                                            </DockPanel>
                                        </GroupBox>

                                        <Grid Margin="0 30 0 0">
                                            <GroupBox Padding="5 0 0 0" Style="{StaticResource FSE_Game_GroupBox}" Height="54" Background="{StaticResource FSE_PrimaryBackgroundDarkBrush}">
                                                <GroupBox.Header>
                                                    <TextBox FontSize="{StaticResource FSE_SmallerFontSize}">Length</TextBox>
                                                </GroupBox.Header>
                                                <mahapps:RangeSlider Focusable="True" Height="40" Margin="5 5 5 5" Minimum="0" Maximum="10000" ExtendedMode="True"
                                             LowerValue="{Binding LengthLowerValue,  Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                                             UpperValue="{Binding LengthUpperValue,  Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" 
                                             VerticalAlignment="Center" IsSnapToTickEnabled="True" FontSize="8"/>
                                            </GroupBox>

                                            <Grid HorizontalAlignment="Right" VerticalAlignment="Top" Width="130" TextBlock.Foreground="{StaticResource FSE_GrayBrush}">
                                                <Grid.ColumnDefinitions>
                                                    <ColumnDefinition Width="1*" />
                                                    <ColumnDefinition Width="30" />
                                                    <ColumnDefinition Width="1*" />
                                                </Grid.ColumnDefinitions>
                                                <TextBlock HorizontalAlignment="Left" Text="{Binding LengthLowerValue}" Grid.Column="0"></TextBlock>
                                                <material:PackIcon HorizontalAlignment="Center" Grid.Column="1" Kind="ArrowLeftRight" Margin="0 -2 0 0" VerticalAlignment="Center" Width="20" Height="20"></material:PackIcon>
                                                <TextBlock HorizontalAlignment="Right" Text="{Binding LengthUpperValue}" Grid.Column="2"></TextBlock>
                                            </Grid>
                                        </Grid>
                                    </StackPanel>
                                </StackPanel>
                            </Border>
                        </ScrollViewer>

                    </DockPanel>
                </DockPanel>

                <Grid HorizontalAlignment="Right" Margin="0 0 -30 0" VerticalAlignment="Center" Width="30" Height="350" ClipToBounds="False">
                    <Grid ClipToBounds="True">
                        <Polygon Fill="{StaticResource FSE_PrimaryBackgroundMidBrush}" Width="95" Margin="-65 0 0 0" Points="0,0 100,30 100,320 0,350" Stroke="{StaticResource FSE_BorderBrush}" Stretch="Fill"></Polygon>
                    </Grid>
                    <controls:ToggleIconButton x:Name="chkSettingsBar" Cursor="Hand" CheckedIcon="ChevronLeftCircle" UncheckedIcon="ChevronRightCircle" Width="32" Height="32" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0 0 -15 0" IsChecked="{Binding IsSettingsBarOpened}" />
                </Grid>
            </Grid>
        </Border>

        <!--Summaries-->
        <Border HorizontalAlignment="Right" VerticalAlignment="Bottom" MinWidth="930" Height="200" Background="#D6282828" Opacity="1" CornerRadius="25 25 0 0" BorderThickness="1 0 1 0" BorderBrush="{StaticResource FSE_BorderBrush}">
            <Border.Style>
                <Style TargetType="Border">
                    <Setter Property="Margin" Value="0 0 30 -176"></Setter>
                    <Style.Triggers>
                        <DataTrigger Binding="{Binding ElementName=chkSumBar,Path=IsChecked}" Value="True">
                            <DataTrigger.EnterActions>
                                <BeginStoryboard>
                                    <Storyboard>
                                        <ThicknessAnimation Storyboard.TargetProperty="Margin" To="0 0 30 0" Duration="00:00:0.2" />
                                    </Storyboard>
                                </BeginStoryboard>
                            </DataTrigger.EnterActions>
                            <DataTrigger.ExitActions>
                                <BeginStoryboard>
                                    <Storyboard>
                                        <ThicknessAnimation Storyboard.TargetProperty="Margin" To="0 0 30 -176" Duration="00:00:0.2" />
                                    </Storyboard>
                                </BeginStoryboard>
                            </DataTrigger.ExitActions>
                        </DataTrigger>
                    </Style.Triggers>
                </Style>
            </Border.Style>


            <DockPanel>
                <Border DockPanel.Dock="Top" Background="{StaticResource FSE_PrimaryBackgroundDarkBrush}" BorderBrush="{StaticResource FSE_BorderBrush}" BorderThickness="0 1 0 0" CornerRadius="25 25 0 0">
                    <DockPanel HorizontalAlignment="Center">
                        <controls:ToggleIconButton x:Name="chkSumBar" Cursor="Hand" CheckedIcon="ChevronDown" UncheckedIcon="ChevronUp" Width="24" Height="24" VerticalAlignment="Top" HorizontalAlignment="Center" Margin="0 0 0 0" IsChecked="{Binding IsSummariesBarOpened}" />
                        <TextBlock Margin="10 0 0 0" VerticalAlignment="Center">Statistics</TextBlock>
                    </DockPanel>
                </Border>
                <Grid>
                    <DockPanel>
                        <StackPanel Margin="20 10 10 10" TextElement.FontSize="{StaticResource FSE_SmallFontSize}">
                            <TextBlock><Run FontWeight="SemiBold">Total Runs:</Run> <Run Text="{Binding Stats.TotalRuns}"></Run></TextBlock>
                            <TextBlock Margin="0 8 0 0"><Run FontWeight="SemiBold">Total Dyeing Length:</Run> <Run Text="{Binding Stats.TotalDyeingLength,StringFormat='N'}"></Run></TextBlock>
                            <TextBlock Margin="0 8 0 0"><Run FontWeight="SemiBold">Average Dyeing Length:</Run> <Run Text="{Binding Stats.AverageDyeingLength,StringFormat='N'}"></Run></TextBlock>
                            <TextBlock Margin="0 8 0 0"><Run FontWeight="SemiBold">Total Dyeing Time:</Run> <Run Text="{Binding Stats.TotalDyeingTime,Converter={StaticResource TimeSpanHumanizeConverter}}"></Run></TextBlock>
                            <TextBlock Margin="0 8 0 0"><Run FontWeight="SemiBold">Average Dyeing Time:</Run> <Run Text="{Binding Stats.AverageDyeingTime,Converter={StaticResource TimeSpanHumanizeConverter}}"></Run></TextBlock>
                        </StackPanel>

                        <DockPanel>
                            <lvc:PieChart Opacity="1" FontSize="{StaticResource FSE_SmallFontSize}" DisableAnimations="True" LegendLocation="Bottom" Hoverable="True" DataTooltip="{x:Null}" HorizontalAlignment="Center" Width="250">
                                <lvc:PieChart.Series>
                                    <lvc:PieSeries Foreground="{StaticResource FSE_PrimaryForegroundBrush}" Stroke="{StaticResource FSE_PrimaryBackgroundBrush}" Fill="#5FC139" FontSize="12" Title="Completed" Values="{Binding Stats.CompletedRuns,Converter={StaticResource DoubleToChartValuesConverter}}" DataLabels="True" 
                               LabelPoint="{Binding Stats.StatusCounts}"/>
                                    <lvc:PieSeries Foreground="{StaticResource FSE_PrimaryForegroundBrush}" Stroke="{StaticResource FSE_PrimaryBackgroundBrush}" Fill="{StaticResource FSE_ErrorBrush}" FontSize="12" Title="Failed" Values="{Binding Stats.FailedRuns,Converter={StaticResource DoubleToChartValuesConverter}}" DataLabels="True"
                               LabelPoint="{Binding Stats.StatusCounts}"/>
                                    <lvc:PieSeries Foreground="{StaticResource FSE_PrimaryForegroundBrush}" Stroke="{StaticResource FSE_PrimaryBackgroundBrush}" Fill="#E19200" FontSize="12" Title="Aborted" Values="{Binding Stats.AbortedRuns,Converter={StaticResource DoubleToChartValuesConverter}}" DataLabels="True"
                               LabelPoint="{Binding Stats.StatusCounts}"/>
                                </lvc:PieChart.Series>
                            </lvc:PieChart>

                            <DockPanel>
                                <TextBlock FontSize="12" DockPanel.Dock="Bottom" HorizontalAlignment="Center" VerticalAlignment="Top" Margin="0 0 0 3">Ink Consumption</TextBlock>
                                <lvc:PieChart Opacity="0.8" FontSize="{StaticResource FSE_SmallFontSize}" DisableAnimations="True" LegendLocation="None" Hoverable="True" DataTooltip="{x:Null}" HorizontalAlignment="Center" Height="155" Width="155" VerticalAlignment="Top" Margin="0 0 0 0">
                                    <lvc:PieChart.Series>
                                        <lvc:PieSeries Foreground="{StaticResource FSE_PrimaryForegroundBrush}" Stroke="{StaticResource FSE_BorderBrush}" Fill="{Binding Stats.LiquidQuantities[0].LiquidType,Converter={StaticResource LiquidTypeToColorConverter}}" FontSize="12" Title="{Binding Stats.LiquidQuantities[0].Title}" Values="{Binding Stats.LiquidQuantities[0].Quantity,Converter={StaticResource DoubleToChartValuesConverter}}" DataLabels="False" LabelPoint="{Binding Stats.QuantityCounts}"/>
                                        <lvc:PieSeries Foreground="{StaticResource FSE_PrimaryForegroundBrush}" Stroke="{StaticResource FSE_BorderBrush}" Fill="{Binding Stats.LiquidQuantities[1].LiquidType,Converter={StaticResource LiquidTypeToColorConverter}}" FontSize="12" Title="{Binding Stats.LiquidQuantities[1].Title}" Values="{Binding Stats.LiquidQuantities[1].Quantity,Converter={StaticResource DoubleToChartValuesConverter}}" DataLabels="False" LabelPoint="{Binding Stats.QuantityCounts}"/>
                                        <lvc:PieSeries Foreground="{StaticResource FSE_PrimaryForegroundBrush}" Stroke="{StaticResource FSE_BorderBrush}" Fill="{Binding Stats.LiquidQuantities[2].LiquidType,Converter={StaticResource LiquidTypeToColorConverter}}" FontSize="12" Title="{Binding Stats.LiquidQuantities[2].Title}" Values="{Binding Stats.LiquidQuantities[2].Quantity,Converter={StaticResource DoubleToChartValuesConverter}}" DataLabels="False" LabelPoint="{Binding Stats.QuantityCounts}"/>
                                        <lvc:PieSeries Foreground="{StaticResource FSE_PrimaryForegroundBrush}" Stroke="{StaticResource FSE_BorderBrush}" Fill="{Binding Stats.LiquidQuantities[3].LiquidType,Converter={StaticResource LiquidTypeToColorConverter}}" FontSize="12" Title="{Binding Stats.LiquidQuantities[3].Title}" Values="{Binding Stats.LiquidQuantities[3].Quantity,Converter={StaticResource DoubleToChartValuesConverter}}" DataLabels="False" LabelPoint="{Binding Stats.QuantityCounts}"/>
                                        <lvc:PieSeries Foreground="{StaticResource FSE_PrimaryForegroundBrush}" Stroke="{StaticResource FSE_BorderBrush}" Fill="{Binding Stats.LiquidQuantities[4].LiquidType,Converter={StaticResource LiquidTypeToColorConverter}}" FontSize="12" Title="{Binding Stats.LiquidQuantities[4].Title}" Values="{Binding Stats.LiquidQuantities[4].Quantity,Converter={StaticResource DoubleToChartValuesConverter}}" DataLabels="False" LabelPoint="{Binding Stats.QuantityCounts}"/>
                                        <lvc:PieSeries Foreground="{StaticResource FSE_PrimaryForegroundBrush}" Stroke="{StaticResource FSE_BorderBrush}" Fill="{Binding Stats.LiquidQuantities[5].LiquidType,Converter={StaticResource LiquidTypeToColorConverter}}" FontSize="12" Title="{Binding Stats.LiquidQuantities[5].Title}" Values="{Binding Stats.LiquidQuantities[5].Quantity,Converter={StaticResource DoubleToChartValuesConverter}}" DataLabels="False" LabelPoint="{Binding Stats.QuantityCounts}"/>
                                        <lvc:PieSeries Foreground="{StaticResource FSE_PrimaryForegroundBrush}" Stroke="{StaticResource FSE_BorderBrush}" Fill="{Binding Stats.LiquidQuantities[6].LiquidType,Converter={StaticResource LiquidTypeToColorConverter}}" FontSize="12" Title="{Binding Stats.LiquidQuantities[6].Title}" Values="{Binding Stats.LiquidQuantities[6].Quantity,Converter={StaticResource DoubleToChartValuesConverter}}" DataLabels="False" LabelPoint="{Binding Stats.QuantityCounts}"/>
                                        <lvc:PieSeries Foreground="{StaticResource FSE_PrimaryForegroundBrush}" Stroke="{StaticResource FSE_BorderBrush}" Fill="{Binding Stats.LiquidQuantities[7].LiquidType,Converter={StaticResource LiquidTypeToColorConverter}}" FontSize="12" Title="{Binding Stats.LiquidQuantities[7].Title}" Values="{Binding Stats.LiquidQuantities[7].Quantity,Converter={StaticResource DoubleToChartValuesConverter}}" DataLabels="False" LabelPoint="{Binding Stats.QuantityCounts}"/>
                                        <lvc:PieSeries Foreground="{StaticResource FSE_PrimaryForegroundBrush}" Stroke="{StaticResource FSE_BorderBrush}" Fill="{Binding Stats.LiquidQuantities[8].LiquidType,Converter={StaticResource LiquidTypeToColorConverter}}" FontSize="12" Title="{Binding Stats.LiquidQuantities[8].Title}" Values="{Binding Stats.LiquidQuantities[8].Quantity,Converter={StaticResource DoubleToChartValuesConverter}}" DataLabels="False" LabelPoint="{Binding Stats.QuantityCounts}"/>
                                    </lvc:PieChart.Series>
                                </lvc:PieChart>
                            </DockPanel>

                            <ItemsControl Margin="20 10 0 0" Width="460" HorizontalAlignment="Left" ItemsSource="{Binding Stats.LiquidQuantities}" FontSize="{StaticResource FSE_SmallerFontSize}">
                                <ItemsControl.ItemsPanel>
                                    <ItemsPanelTemplate>
                                        <UniformGrid Columns="4"/>
                                    </ItemsPanelTemplate>
                                </ItemsControl.ItemsPanel>
                                <ItemsControl.ItemTemplate>
                                    <DataTemplate>
                                        <Border Background="Transparent">
                                            <StackPanel Orientation="Horizontal" Margin="4">
                                                <Ellipse VerticalAlignment="Top" Margin="0 0 0 0" StrokeThickness="1" Stroke="{StaticResource FSE_BorderBrush}" Width="30" Height="30" Fill="{Binding LiquidType,Converter={StaticResource LiquidTypeToColorConverter}}">

                                                </Ellipse>
                                                <StackPanel Orientation="Vertical" Margin="4 2 0 0">
                                                    <TextBlock Text="{Binding LiquidType,Converter={StaticResource EnumToDescriptionConverter}}" FontWeight="SemiBold"></TextBlock>
                                                    <TextBlock >
                                             <Run Text="{Binding Liters,Mode=OneWay,StringFormat='0.000'}"></Run>
                                            <Run Text=" liters"></Run>
                                                    </TextBlock>
                                                </StackPanel>
                                            </StackPanel>
                                        </Border>
                                    </DataTemplate>
                                </ItemsControl.ItemTemplate>
                            </ItemsControl>
                        </DockPanel>
                    </DockPanel>
                </Grid>
            </DockPanel>
        </Border>
    </Grid>
</UserControl>