aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Statistics/Views/JobRunsView.xaml
diff options
context:
space:
mode:
authorVictoria Plitt <Victoria.Plitt@twine-s.com>2020-02-26 13:22:44 +0200
committerVictoria Plitt <Victoria.Plitt@twine-s.com>2020-02-26 13:22:44 +0200
commita64cfe8b7dec8417a3d380b55f4ae79c5459f49d (patch)
treed40c32f55b65632b80031e64e03ae8d893ea1511 /Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Statistics/Views/JobRunsView.xaml
parente2fbc8e6047fef09681b994efe2ca1043d25ac9d (diff)
downloadTango-a64cfe8b7dec8417a3d380b55f4ae79c5459f49d.tar.gz
Tango-a64cfe8b7dec8417a3d380b55f4ae79c5459f49d.zip
Implementing JobRuns on Statistics module.
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Statistics/Views/JobRunsView.xaml')
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Statistics/Views/JobRunsView.xaml509
1 files changed, 362 insertions, 147 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Statistics/Views/JobRunsView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Statistics/Views/JobRunsView.xaml
index 4667959b8..c89cd5819 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Statistics/Views/JobRunsView.xaml
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Statistics/Views/JobRunsView.xaml
@@ -7,17 +7,24 @@
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
xmlns:localConverters="clr-namespace:Tango.MachineStudio.Statistics.Converters"
xmlns:mahapps="http://metro.mahapps.com/winfx/xaml/controls"
+ xmlns:autoComplete="clr-namespace:Tango.AutoComplete.Editors;assembly=Tango.AutoComplete"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
xmlns:enumerations="clr-namespace:Tango.BL.Enumerations;assembly=Tango.BL"
xmlns:local="clr-namespace:Tango.MachineStudio.Statistics.Views"
mc:Ignorable="d"
- d:DesignHeight="450" d:DesignWidth="1200">
+ d:DesignHeight="450" d:DesignWidth="1800" Foreground="{StaticResource JobFieldForeground}">
<UserControl.Resources>
<sharedConverters:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />
+ <sharedConverters:BooleanToYesNoConverter x:Key="BooleanToYesNoConverter"/>
<sharedConverters:EnumToDescriptionConverter x:Key="EnumToDescriptionConverter" />
+ <sharedConverters:EnumToItemsSourceConverter x:Key="EnumToItemsSourceConverter" />
+ <sharedConverters:TimeSpanToTwoDigitsTimeConverter x:Key="TimeSpanToTwoDigitsTimeConverter" />
<sharedConverters:DateTimeUTCToShortDateTimeConverter x:Key="DateTimeUTCToShortDateTimeConverter"/>
+ <sharedConverters:ColorToIntegerConverter x:Key="ColorToIntegerConverter" />
<localConverters:DateIsInListToBooleanConverter x:Key="DateIsInListToBooleanConverter"/>
<localConverters:StringToBoolYesNoNullConverter x:Key="StringToBoolYesNoNullConverter"/>
+ <localConverters:LiquidTypeToColorConverter x:Key="LiquidTypeToColorConverter"/>
+ <localConverters:CollectionConverter x:Key="CollectionConverter"/>
<ResourceDictionary x:Key="SelectAllTextBoxResource">
<Style TargetType="TextBox">
@@ -26,169 +33,304 @@
</Style>
</ResourceDictionary>
- <Style x:Key="CustomCalendarDayButtonStyle" TargetType="{x:Type CalendarDayButton}" BasedOn="{StaticResource MaterialDesignCalendarDayButton}">
- <Style.Triggers>
- <DataTrigger Value="True">
- <DataTrigger.Binding>
- <MultiBinding Converter="{StaticResource DateIsInListToBooleanConverter}">
- <Binding />
- <Binding RelativeSource="{RelativeSource AncestorType=UserControl}" Path="DataContext.Dates" />
- <Binding RelativeSource="{RelativeSource AncestorType=DatePicker}" Path="IsDropDownOpen" ></Binding>
- </MultiBinding>
- </DataTrigger.Binding>
- <Setter Property="Foreground" Value="{StaticResource AccentColorBrush}" />
- </DataTrigger>
- </Style.Triggers>
+ <Style TargetType="{x:Type TextBlock}" x:Key="WrapText">
+ <Setter Property="TextWrapping" Value="Wrap"/>
</Style>
- <Style x:Key="HighlightDatePickerStyle" TargetType="{x:Type Calendar}" BasedOn="{StaticResource {x:Type Calendar}}">
- <Setter Property="CalendarDayButtonStyle" Value="{StaticResource CustomCalendarDayButtonStyle}" />
- </Style>
-
- <ObjectDataProvider x:Key="JobSource" MethodName="GetValues" ObjectType="{x:Type sys:Enum}">
- <ObjectDataProvider.MethodParameters>
- <x:Type TypeName="enumerations:JobSource"/>
- </ObjectDataProvider.MethodParameters>
- </ObjectDataProvider>
-
- <ObjectDataProvider x:Key="JobRunStatus" MethodName="GetValues" ObjectType="{x:Type sys:Enum}">
- <ObjectDataProvider.MethodParameters>
- <x:Type TypeName="enumerations:JobRunStatus"/>
- </ObjectDataProvider.MethodParameters>
- </ObjectDataProvider>
-
</UserControl.Resources>
- <Grid IsEnabled="{Binding IsFree}">
+ <Grid IsEnabled="{Binding IsFree}" >
<Grid.ColumnDefinitions>
<ColumnDefinition Width="3*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
- <RowDefinition Height="100"/>
+ <RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
- <materialDesign:Card Grid.Row="0" Background="{StaticResource WhiteBackgroundBrush}" Foreground="{StaticResource JobFieldForeground}" Width="Auto" Margin="10 10 0 0" >
+ <Grid Grid.Row="0" Background="{StaticResource WhiteBackgroundBrush}" Width="Auto" Margin="20 0 0 1" >
+ <Border Padding="14 14 12 14" BorderBrush="DimGray" BorderThickness="0" Background="{StaticResource Logging.Background}" HorizontalAlignment="Stretch" CornerRadius="2" >
+ <Border.Effect>
+ <DropShadowEffect ShadowDepth="4" BlurRadius="10" Opacity="0.5"/>
+ </Border.Effect>
+ <Grid>
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="*"/>
+ <ColumnDefinition Width="120"/>
+ </Grid.ColumnDefinitions>
- <DockPanel>
- <StackPanel Orientation="Horizontal" DockPanel.Dock="Left">
- <StackPanel Margin="30 5 0 20" Orientation="Vertical" >
- <TextBlock DockPanel.Dock="Top" Text="Machine:" VerticalAlignment="Center" FontSize="10"></TextBlock>
- <ToggleButton Width="200" Margin="0 10 0 0" x:Name="selectMachineButton" HorizontalAlignment="Left" FontSize="16" VerticalAlignment="Center">
- <ToggleButton.Template>
- <ControlTemplate>
- <Grid>
- <Border CornerRadius="3" BorderBrush="{StaticResource borderBrush}" BorderThickness="1" TextElement.Foreground="Black" >
- <DockPanel>
- <Button Width="18" Padding="0" Height="16" DockPanel.Dock="Right" BorderBrush="{x:Null}" HorizontalAlignment="Left" Click="Button_Click" Style="{StaticResource MaterialDesignFlatButton}" Foreground="{StaticResource MainWindow.Foreground}">
- <materialDesign:PackIcon Width="16" Height="16" Kind="ChevronDown" VerticalAlignment="Center" Foreground="{StaticResource MainWindow.Foreground}" HorizontalAlignment="Right"/>
- </Button>
- <TextBlock VerticalAlignment="Center" Foreground="{StaticResource MainWindow.Foreground}">
- <Run Text=" Select Machines"></Run>
- <Run>(</Run><Run Text="{Binding SelectedMachines.SynchedSource.Count,Mode=OneWay}"></Run><Run>)</Run>
- </TextBlock>
- </DockPanel>
- </Border>
- <Popup StaysOpen="False" IsOpen="{Binding RelativeSource={RelativeSource AncestorType=ToggleButton},Path=IsChecked }" >
- <Border Padding="5" Background="{DynamicResource ComboBox.Floating.Background}" BorderBrush="{StaticResource AutoCompleteTextBox.Popup.BorderBrush}">
- <ScrollViewer MaxHeight="600" Background="{DynamicResource ComboBox.Floating.Background}">
- <ItemsControl ItemsSource="{Binding SelectedMachines}" Foreground="{StaticResource MainWindow.Foreground}">
- <ItemsControl.ItemTemplate>
- <DataTemplate>
- <DockPanel Margin="2">
- <CheckBox VerticalAlignment="Center" DockPanel.Dock="Left" IsChecked="{Binding IsSelected}" />
- <TextBlock Margin="5 0 0 0" VerticalAlignment="Center" Text="{Binding Data.SerialNumber}"></TextBlock>
- </DockPanel>
- </DataTemplate>
- </ItemsControl.ItemTemplate>
- </ItemsControl>
- </ScrollViewer>
- </Border>
- </Popup>
- </Grid>
- </ControlTemplate>
- </ToggleButton.Template>
- </ToggleButton>
+ <Grid >
+ <Grid.RowDefinitions>
+ <RowDefinition Height="1*"/>
+ <RowDefinition Height="1*"/>
+ </Grid.RowDefinitions>
+ <StackPanel Orientation="Horizontal" Grid.Row="0">
+ <StackPanel Margin="10 5 0 0" Orientation="Vertical" HorizontalAlignment="Center">
+ <TextBlock Text="Machine:" VerticalAlignment="Center" FontSize="11"></TextBlock>
+ <ToggleButton Width="130" Margin="0 10 0 0" x:Name="selectMachineButton" HorizontalAlignment="Left" FontSize="16" VerticalAlignment="Center">
+ <ToggleButton.Template>
+ <ControlTemplate>
+ <Grid>
+ <Border CornerRadius="3" BorderBrush="{StaticResource borderBrush}" BorderThickness="1" TextElement.Foreground="Black" Height="24">
+ <DockPanel>
+ <Button x:Name="selectMachineButton" Width="18" Padding="0" Height="16" DockPanel.Dock="Right" BorderBrush="{x:Null}" HorizontalAlignment="Left" Click="Button_Click" Style="{StaticResource MaterialDesignFlatButton}" Foreground="{StaticResource MainWindow.Foreground}">
+ <materialDesign:PackIcon Width="16" Height="16" Kind="ChevronDown" VerticalAlignment="Center" Foreground="{StaticResource MainWindow.Foreground}" HorizontalAlignment="Right"/>
+ </Button>
+ <TextBlock VerticalAlignment="Center" Foreground="{StaticResource MainWindow.Foreground}" FontSize="11" Margin="5">
+ <TextBlock.Style>
+ <Style TargetType="{x:Type TextBlock}">
+ <Setter Property="Text" Value="{Binding SelectedMachines.SynchedSource.Count, StringFormat={}Selected Machines({0})}">
+ </Setter>
+ <Style.Triggers>
+ <DataTrigger Binding="{Binding SelectedMachines.SynchedSource.Count}" Value="0">
+ <Setter Property="Text" Value="All machines"/>
+ </DataTrigger>
+ </Style.Triggers>
+ </Style>
+ </TextBlock.Style>
+ </TextBlock>
+ </DockPanel>
+ </Border>
+ <Popup StaysOpen="False" IsOpen="{Binding RelativeSource={RelativeSource AncestorType=ToggleButton},Path=IsChecked }" Width="{Binding RelativeSource={RelativeSource AncestorType=ToggleButton},Path=Width}" >
+ <Border Background="{StaticResource Logging.Background}" BorderBrush="{StaticResource AutoCompleteTextBox.Popup.BorderBrush}" CornerRadius="3" BorderThickness="0.5" Padding="2">
+ <ScrollViewer MaxHeight="600" Background="{DynamicResource ComboBox.Floating.Background}">
+ <ItemsControl ItemsSource="{Binding SelectedMachines}" Foreground="{StaticResource MainWindow.Foreground}">
+ <ItemsControl.ItemTemplate>
+ <DataTemplate>
+ <CheckBox VerticalAlignment="Center" DockPanel.Dock="Left" IsChecked="{Binding IsSelected}" >
+ <CheckBox.Content>
+ <TextBlock Margin="5 0 0 0" VerticalAlignment="Center" Text="{Binding Data.SerialNumber}" ToolTip="{Binding Data.SerialNumber}"></TextBlock>
+ </CheckBox.Content>
+ </CheckBox>
+ </DataTemplate>
+ </ItemsControl.ItemTemplate>
+ </ItemsControl>
+ </ScrollViewer>
+ </Border>
+ </Popup>
+ </Grid>
+ </ControlTemplate>
+ </ToggleButton.Template>
+ </ToggleButton>
+ </StackPanel>
- </StackPanel>
- <Border Margin="30 10 0 20" Padding="5" BorderBrush="#38696969" BorderThickness="1" >
- <StackPanel Orientation="Horizontal">
- <materialDesign:PackIcon Kind="Calendar" Width="24" Height="24" VerticalAlignment="Bottom" Margin="0 0 0 5" />
- <DatePicker x:Name="datePicker" DisplayDateStart="{Binding MinDate}" DisplayDateEnd="{Binding MaxDate}" CalendarStyle="{StaticResource HighlightDatePickerStyle}" SelectedDate="{Binding SelectedDate}" materialDesign:HintAssist.Hint="Pick Date" Margin="10 0 0 5" Width="100" VerticalAlignment="Bottom" FontSize="16">
- </DatePicker>
- </StackPanel>
- </Border>
- <StackPanel Margin="30 5 20 20" Orientation="Vertical">
- <TextBlock Text="Job Name:" VerticalAlignment="Center" FontSize="10"></TextBlock>
- <TextBox Text="{Binding JobName}" VerticalAlignment="Center" FontSize="16" Margin="0 5 0 0" Width="100"></TextBox>
- </StackPanel>
- <StackPanel Margin="30 5 20 0" Orientation="Vertical">
- <TextBlock Text="Source:" VerticalAlignment="Center" FontSize="10"></TextBlock>
- <ComboBox Width="100" FontSize="14" Margin="0 5 0 0" ItemsSource="{Binding Source={StaticResource JobSource}}" SelectedItem="{Binding JobRunSource, UpdateSourceTrigger=PropertyChanged}">
- <ComboBox.ItemContainerStyle>
- <Style TargetType="ComboBoxItem" BasedOn="{StaticResource {x:Type ComboBoxItem}}">
- <Setter Property="Background" Value="{StaticResource WhiteBrush100}"></Setter>
- </Style>
- </ComboBox.ItemContainerStyle>
- <ComboBox.ItemTemplate>
- <DataTemplate>
- <TextBlock Text="{Binding Converter={StaticResource EnumToDescriptionConverter}}"></TextBlock>
- </DataTemplate>
- </ComboBox.ItemTemplate>
- </ComboBox>
- </StackPanel>
- <StackPanel Margin="30 5 20 0" Orientation="Vertical">
- <TextBlock Text="Gradient:" VerticalAlignment="Center" FontSize="10"></TextBlock>
- <ComboBox Width="100" FontSize="14" Margin="0 5 0 0" SelectedItem="{Binding IsGradient, Converter={StaticResource StringToBoolYesNoNullConverter}, UpdateSourceTrigger=PropertyChanged, Mode=OneWayToSource}">
- <ComboBox.ItemContainerStyle>
- <Style TargetType="ComboBoxItem" BasedOn="{StaticResource {x:Type ComboBoxItem}}">
- <Setter Property="Background" Value="{StaticResource WhiteBrush100}"></Setter>
- </Style>
- </ComboBox.ItemContainerStyle>
- <ComboBoxItem Content="Yes" />
- <ComboBoxItem Content="No" />
- <ComboBoxItem Content="Null" />
- </ComboBox>
- </StackPanel>
- <StackPanel Margin="30 5 20 0" Orientation="Vertical">
- <TextBlock Text="Length:" VerticalAlignment="Center" FontSize="10"></TextBlock>
- <mahapps:NumericUpDown Width="100" Margin="0 8.5 0 0" x:Name="numLength" FontSize="21" HideUpDownButtons="True" HorizontalAlignment="Left" FontFamily="{StaticResource digital-7}" StringFormat="{}{0:N1} m" Minimum="0" Maximum="5000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0 0 0 1" BorderBrush="{StaticResource DimGrayBrush}" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding Length,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}">
- <mahapps:NumericUpDown.Resources>
- <StaticResource ResourceKey="SelectAllTextBoxResource"></StaticResource>
- </mahapps:NumericUpDown.Resources>
- </mahapps:NumericUpDown>
- </StackPanel>
- <StackPanel Margin="30 5 20 0" Orientation="Vertical">
- <TextBlock Text="Status:" VerticalAlignment="Center" FontSize="10"></TextBlock>
- <ComboBox Width="100" FontSize="14" Margin="0 5 0 0" ItemsSource="{Binding Source={StaticResource JobRunStatus}}" SelectedItem="{Binding JobRunStatus, UpdateSourceTrigger=PropertyChanged}">
- <ComboBox.ItemContainerStyle>
- <Style TargetType="ComboBoxItem" BasedOn="{StaticResource {x:Type ComboBoxItem}}">
- <Setter Property="Background" Value="{StaticResource WhiteBrush100}"></Setter>
- </Style>
- </ComboBox.ItemContainerStyle>
- <ComboBox.ItemTemplate>
- <DataTemplate>
- <TextBlock Text="{Binding Converter={StaticResource EnumToDescriptionConverter}}"></TextBlock>
- </DataTemplate>
- </ComboBox.ItemTemplate>
- </ComboBox>
- </StackPanel>
-
- </StackPanel>
- <Button HorizontalAlignment="Right" Command="{Binding LoadJobRunsCommand}" DockPanel.Dock="Right" Margin="10">GO</Button>
- </DockPanel>
- </materialDesign:Card>
+ <StackPanel Margin="50 10 0 0" HorizontalAlignment="Center">
+ <TextBlock FontSize="11">Start Date:</TextBlock>
+ <DatePicker x:Name="startdatePicker" Margin="0 5 0 0" SelectedDate="{Binding StartSelectedDate}" materialDesign:HintAssist.Hint="Pick start date" Width="130" VerticalAlignment="Center" FontSize="11" />
+ </StackPanel>
+ <StackPanel Margin="50 10 0 0" HorizontalAlignment="Center">
+ <TextBlock FontSize="11">End Date:</TextBlock>
+ <DatePicker x:Name="endDatePicker" Margin="0 5 0 0" SelectedDate="{Binding EndSelectedDate}" materialDesign:HintAssist.Hint="Pick end date" Width="130" VerticalAlignment="Center" FontSize="11" />
+ </StackPanel>
+ </StackPanel>
+
+ <StackPanel Orientation="Horizontal" Grid.Row="1">
+ <StackPanel Margin="10 20 0 0" Orientation="Vertical" HorizontalAlignment="Center">
+ <!--<TextBlock Text="Job Name:" VerticalAlignment="Center" FontSize="11"></TextBlock>-->
+ <!--<TextBox Text="{Binding JobName}" VerticalAlignment="Center" FontSize="11" Margin="0 5 0 0" Width="130"></TextBox>-->
+ <autoComplete:AutoCompleteTextBox Provider="{Binding JobRunsProvider}" Width="130" FontSize="11" LoadingContent="Loading..." SelectedItem="{Binding JobRun,Mode=TwoWay}" materialDesign:HintAssist.Hint="Job Name" DisplayMember="JobName" materialDesign:HintAssist.IsFloating="True">
+ <autoComplete:AutoCompleteTextBox.ItemTemplate>
+ <DataTemplate>
+ <StackPanel>
+ <TextBlock Text="{Binding JobName}" FontWeight="Bold" FontStyle="Italic"></TextBlock>
+ <!--<TextBlock FontSize="11" Text="{Binding Name}" Foreground="Gray"></TextBlock>-->
+ </StackPanel>
+ </DataTemplate>
+ </autoComplete:AutoCompleteTextBox.ItemTemplate>
+ </autoComplete:AutoCompleteTextBox>
+ </StackPanel>
+ <StackPanel Margin="40 10 0 0" Orientation="Vertical" HorizontalAlignment="Center">
+ <TextBlock Text="Source:" VerticalAlignment="Center" FontSize="11"></TextBlock>
+ <ToggleButton Width="130" Height="24" Margin="0 10 0 0" x:Name="selectJobRunSources" HorizontalAlignment="Left" FontSize="16" VerticalAlignment="Center">
+ <ToggleButton.Template>
+ <ControlTemplate>
+ <Grid>
+ <Border CornerRadius="3" BorderBrush="{StaticResource borderBrush}" BorderThickness="1" TextElement.Foreground="Black" >
+ <DockPanel>
+ <Button x:Name="jobRunSourcesButton" Width="18" Padding="0" Height="16" DockPanel.Dock="Right" BorderBrush="{x:Null}" HorizontalAlignment="Left" Click="JobRunSourcesButton_Click" Style="{StaticResource MaterialDesignFlatButton}" Foreground="{StaticResource MainWindow.Foreground}">
+ <materialDesign:PackIcon Width="16" Height="16" Kind="ChevronDown" VerticalAlignment="Center" Foreground="{StaticResource MainWindow.Foreground}" HorizontalAlignment="Right"/>
+ </Button>
+ <TextBlock VerticalAlignment="Center" Foreground="{StaticResource MainWindow.Foreground}" FontSize="11" Margin="5" Text="{Binding JobRunSelectedSources.SynchedSource, Converter={StaticResource CollectionConverter}}"/>
+ </DockPanel>
+ </Border>
+ <Popup StaysOpen="False" IsOpen="{Binding RelativeSource={RelativeSource AncestorType=ToggleButton},Path=IsChecked }" Width="{Binding RelativeSource={RelativeSource AncestorType=ToggleButton},Path=Width}">
+ <Border Background="{DynamicResource ComboBox.Floating.Background}" BorderBrush="{StaticResource AutoCompleteTextBox.Popup.BorderBrush}" >
+ <ItemsControl ItemsSource="{Binding JobRunSelectedSources}" Foreground="{StaticResource MainWindow.Foreground}">
+ <ItemsControl.ItemTemplate>
+ <DataTemplate>
+ <CheckBox VerticalAlignment="Center" DockPanel.Dock="Left" IsChecked="{Binding IsSelected}">
+ <CheckBox.Content>
+ <TextBlock Margin="5 0 0 0" VerticalAlignment="Center" Text="{Binding Data}"></TextBlock>
+ </CheckBox.Content>
+ </CheckBox>
+ </DataTemplate>
+ </ItemsControl.ItemTemplate>
+ </ItemsControl>
+ </Border>
+ </Popup>
+ </Grid>
+ </ControlTemplate>
+ </ToggleButton.Template>
+ </ToggleButton>
+ </StackPanel>
+ <StackPanel Margin="40 10 0 0" Orientation="Vertical" HorizontalAlignment="Center">
+ <TextBlock Text="Gradient:" VerticalAlignment="Center" FontSize="11"></TextBlock>
+ <ToggleButton Height="24" Width="130" Margin="0 10 0 0" x:Name="selectIsGradient" HorizontalAlignment="Left" FontSize="16" VerticalAlignment="Center">
+ <ToggleButton.Template>
+ <ControlTemplate>
+ <Grid>
+ <Border CornerRadius="3" BorderBrush="{StaticResource borderBrush}" BorderThickness="1" TextElement.Foreground="Black" >
+ <DockPanel>
+ <Button x:Name="isGradientButton" Width="18" Padding="0" Height="16" DockPanel.Dock="Right" BorderBrush="{x:Null}" HorizontalAlignment="Left" Click="IsGradientButton_Click" Style="{StaticResource MaterialDesignFlatButton}" Foreground="{StaticResource MainWindow.Foreground}">
+ <materialDesign:PackIcon Width="16" Height="16" Kind="ChevronDown" VerticalAlignment="Center" Foreground="{StaticResource MainWindow.Foreground}" HorizontalAlignment="Right"/>
+ </Button>
+ <TextBlock VerticalAlignment="Center" Foreground="{StaticResource MainWindow.Foreground}" FontSize="11" Margin="5 0 2 0">
+ <Run Text="{Binding IsGradientSelection.SynchedSource, Converter={StaticResource CollectionConverter}}"></Run>
+ </TextBlock>
+ </DockPanel>
+ </Border>
+ <Popup StaysOpen="False" IsOpen="{Binding RelativeSource={RelativeSource AncestorType=ToggleButton},Path=IsChecked }" Width="{Binding RelativeSource={RelativeSource AncestorType=ToggleButton},Path=Width}">
+ <Border Padding="5" Background="{DynamicResource ComboBox.Floating.Background}" BorderBrush="{StaticResource AutoCompleteTextBox.Popup.BorderBrush}">
+ <ItemsControl ItemsSource="{Binding IsGradientSelection}" Foreground="{StaticResource MainWindow.Foreground}">
+ <ItemsControl.ItemTemplate>
+ <DataTemplate>
+ <CheckBox VerticalAlignment="Center" DockPanel.Dock="Left" IsChecked="{Binding IsSelected}">
+ <CheckBox.Content>
+ <TextBlock Margin="5 0 0 0" VerticalAlignment="Center" Text="{Binding Data, Converter={StaticResource BooleanToYesNoConverter}}"/>
+ </CheckBox.Content>
+ </CheckBox>
+ </DataTemplate>
+ </ItemsControl.ItemTemplate>
+ </ItemsControl>
+ </Border>
+ </Popup>
+ </Grid>
+ </ControlTemplate>
+ </ToggleButton.Template>
+ </ToggleButton>
+ </StackPanel>
+ <StackPanel Margin="40 10 0 0" Orientation="Vertical" HorizontalAlignment="Center">
+ <TextBlock Text="Length:" VerticalAlignment="Center" FontSize="11"></TextBlock>
+ <Border MinWidth="200" BorderThickness="1" CornerRadius="3" BorderBrush="{StaticResource borderBrush}" Margin="0 5 0 0" Height="40">
+ <StackPanel Orientation="Horizontal" Width="200" Margin="2 0 2 0">
+ <TextBlock Text="{Binding LengthLowerValue, UpdateSourceTrigger=PropertyChanged}" VerticalAlignment="Center" FontSize="11"></TextBlock>
+ <mahapps:RangeSlider Height="40" Margin="5 5 5 5" Minimum="0" Maximum="5000" Width="140"
+ LowerValue="{Binding LengthLowerValue, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, Delay=100}"
+ UpperValue="{Binding LengthUpperValue, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, Delay=100}"
+ VerticalAlignment="Center" IsSnapToTickEnabled="True" FontSize="8"/>
+ <TextBlock Text="{Binding LengthUpperValue}" VerticalAlignment="Center" FontSize="11"></TextBlock>
+ </StackPanel>
+ </Border>
+ </StackPanel>
+ <StackPanel Margin="40 10 0 0" Orientation="Vertical" HorizontalAlignment="Center">
+ <TextBlock Text="Status:" VerticalAlignment="Center" FontSize="11"></TextBlock>
+ <ToggleButton Height="24" Width="170" Margin="0 10 0 0" x:Name="selectJobRunStatus" HorizontalAlignment="Left" FontSize="16" VerticalAlignment="Center">
+ <ToggleButton.Template>
+ <ControlTemplate>
+ <Grid>
+ <Border CornerRadius="3" BorderBrush="{StaticResource borderBrush}" BorderThickness="1" TextElement.Foreground="Black" >
+ <DockPanel>
+ <Button x:Name="jobRunStatusButton" Width="18" Padding="0" Height="16" DockPanel.Dock="Right" BorderBrush="{x:Null}" HorizontalAlignment="Left" Click="JobRunStatusButton_Click" Style="{StaticResource MaterialDesignFlatButton}" Foreground="{StaticResource MainWindow.Foreground}">
+ <materialDesign:PackIcon Width="16" Height="16" Kind="ChevronDown" VerticalAlignment="Center" Foreground="{StaticResource MainWindow.Foreground}" HorizontalAlignment="Right"/>
+ </Button>
+ <TextBlock VerticalAlignment="Center" Foreground="{StaticResource MainWindow.Foreground}" FontSize="11" Margin="5" Text="{Binding JobRunSelectedStatuses.SynchedSource, Converter={StaticResource CollectionConverter}}"/>
+ </DockPanel>
+ </Border>
+ <Popup StaysOpen="False" IsOpen="{Binding RelativeSource={RelativeSource AncestorType=ToggleButton},Path=IsChecked }" Width="{Binding RelativeSource={RelativeSource AncestorType=ToggleButton},Path=Width}">
+ <Border Padding="5" Background="{DynamicResource ComboBox.Floating.Background}" BorderBrush="{StaticResource AutoCompleteTextBox.Popup.BorderBrush}" >
+ <ItemsControl ItemsSource="{Binding JobRunSelectedStatuses}" Foreground="{StaticResource MainWindow.Foreground}">
+ <ItemsControl.ItemTemplate>
+ <DataTemplate>
+ <CheckBox VerticalAlignment="Center" DockPanel.Dock="Left" IsChecked="{Binding IsSelected}">
+ <CheckBox.Content>
+ <TextBlock Margin="5 0 0 0" VerticalAlignment="Center" Text="{Binding Data}"/>
+ </CheckBox.Content>
+ </CheckBox>
+ </DataTemplate>
+ </ItemsControl.ItemTemplate>
+ </ItemsControl>
+ </Border>
+ </Popup>
+ </Grid>
+ </ControlTemplate>
+ </ToggleButton.Template>
+ </ToggleButton>
+ </StackPanel>
+ <StackPanel Margin="40 10 0 0" Orientation="Vertical" HorizontalAlignment="Center">
+ <TextBlock Text="Threads:" VerticalAlignment="Center" FontSize="11"></TextBlock>
+ <ToggleButton Width="130" Margin="0 10 0 0" x:Name="selectThreadsButton" HorizontalAlignment="Left" FontSize="16" VerticalAlignment="Center">
+ <ToggleButton.Template>
+ <ControlTemplate>
+ <Grid>
+ <Border CornerRadius="3" BorderBrush="{StaticResource borderBrush}" BorderThickness="1" TextElement.Foreground="Black" Height="24">
+ <DockPanel>
+ <Button x:Name="selectThreadButton" Width="18" Padding="0" Height="16" DockPanel.Dock="Right" BorderBrush="{x:Null}" HorizontalAlignment="Left" Click="SelectMachineButton_Click" Style="{StaticResource MaterialDesignFlatButton}" Foreground="{StaticResource MainWindow.Foreground}">
+ <materialDesign:PackIcon Width="16" Height="16" Kind="ChevronDown" VerticalAlignment="Center" Foreground="{StaticResource MainWindow.Foreground}" HorizontalAlignment="Right"/>
+ </Button>
+ <TextBlock VerticalAlignment="Center" Foreground="{StaticResource MainWindow.Foreground}" FontSize="11" Margin="5">
+ <TextBlock.Style>
+ <Style TargetType="{x:Type TextBlock}">
+ <Setter Property="Text" Value="{Binding SelectedThreads.SynchedSource.Count, StringFormat={}Selected Machines({0})}">
+ </Setter>
+ <Style.Triggers>
+ <DataTrigger Binding="{Binding SelectedThreads.SynchedSource.Count}" Value="0">
+ <Setter Property="Text" Value="All threads"/>
+ </DataTrigger>
+ </Style.Triggers>
+ </Style>
+ </TextBlock.Style>
+ </TextBlock>
+ </DockPanel>
+ </Border>
+ <Popup StaysOpen="False" IsOpen="{Binding RelativeSource={RelativeSource AncestorType=ToggleButton},Path=IsChecked }" Width="{Binding RelativeSource={RelativeSource AncestorType=ToggleButton},Path=Width}" >
+ <Border Background="{DynamicResource ComboBox.Floating.Background}" BorderBrush="{StaticResource AutoCompleteTextBox.Popup.BorderBrush}" CornerRadius="3" BorderThickness="0.5" Padding="2">
+ <ScrollViewer MaxHeight="600" Background="{DynamicResource ComboBox.Floating.Background}">
+ <ItemsControl ItemsSource="{Binding SelectedThreads}" Foreground="{StaticResource MainWindow.Foreground}">
+ <ItemsControl.ItemTemplate>
+ <DataTemplate>
+ <CheckBox VerticalAlignment="Center" DockPanel.Dock="Left" IsChecked="{Binding IsSelected}" >
+ <CheckBox.Content>
+ <TextBlock Margin="5 0 0 0" VerticalAlignment="Center" Text="{Binding Data.Name}" ToolTip="{Binding Data.Name}"></TextBlock>
+ </CheckBox.Content>
+ </CheckBox>
+ </DataTemplate>
+ </ItemsControl.ItemTemplate>
+ </ItemsControl>
+ </ScrollViewer>
+ </Border>
+ </Popup>
+ </Grid>
+ </ControlTemplate>
+ </ToggleButton.Template>
+ </ToggleButton>
+ </StackPanel>
+ </StackPanel>
+ </Grid>
+ <Button Grid.Column="1" HorizontalAlignment="Right" Command="{Binding LoadJobRunsCommand}" Margin="10" Width="100" VerticalAlignment="Center">GO</Button>
+ </Grid>
+ </Border>
+ </Grid>
- <DataGrid Grid.Row="1" Margin="20 0 0 10" SelectionMode="Single" SelectionUnit="FullRow" RowHeight="40" BorderBrush="{StaticResource borderBrush}" IsReadOnly="True" BorderThickness="1"
+ <DataGrid Grid.Row="1" Margin="20 0 0 10" SelectionMode="Single" SelectionUnit="FullRow" BorderBrush="{StaticResource borderBrush}" IsReadOnly="True" BorderThickness="1" RowHeight="60"
Background="{StaticResource TransparentBackgroundBrush}" AlternatingRowBackground="{StaticResource Transparent200}" AutoGenerateColumns="False" CanUserReorderColumns="True"
- CanUserAddRows="False" CanUserDeleteRows="False" ItemsSource="{Binding JobRuns}"
+ CanUserAddRows="False" CanUserDeleteRows="False" ItemsSource="{Binding JobRuns}" HorizontalScrollBarVisibility="Disabled"
SelectedItem="{Binding SelectedJobRun}" HorizontalAlignment="Stretch" HorizontalContentAlignment="Stretch" FontSize="11">
+
<DataGrid.CellStyle>
<Style TargetType="DataGridCell" BasedOn="{StaticResource {x:Type DataGridCell}}">
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
<Setter Property="VerticalContentAlignment" Value="Center"></Setter>
+ <Setter Property="VerticalAlignment" Value="Stretch"/>
+ <Setter Property="HorizontalAlignment" Value="Left"/>
+ <!--<Setter Property="Template">
+ <Setter.Value>
+ <ControlTemplate TargetType="{x:Type DataGridCell}">
+ <ContentPresenter VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
+ </ControlTemplate>
+ </Setter.Value>
+ </Setter>-->
<Style.Triggers>
<Trigger Property="IsSelected" Value="True">
<Setter Property="Background" Value="Transparent"></Setter>
@@ -199,6 +341,7 @@
</DataGrid.CellStyle>
<DataGrid.RowStyle>
<Style TargetType="DataGridRow" BasedOn="{StaticResource {x:Type DataGridRow}}">
+
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="Transparent"></Setter>
@@ -216,11 +359,83 @@
</DataGrid.RowStyle>
<DataGrid.Columns>
- <DataGridTextColumn Header="START DATE" Binding="{Binding JobRun.StartDate, Converter={StaticResource DateTimeUTCToShortDateTimeConverter}}" Width="Auto" />
- <DataGridTextColumn Header="LENGTH" Binding="{Binding JobRun.JobLength}" Width="Auto" />
- <DataGridTextColumn Header="STATUS" Binding="{Binding JobRun.JobRunStatus, Converter={StaticResource EnumToDescriptionConverter}}" Width="Auto"/>
- <DataGridTextColumn Header="DESIGNATION" Binding="{Binding JobRun.Designation, Converter={StaticResource EnumToDescriptionConverter}}" Width="Auto"/>
- <DataGridTextColumn Header="SOURCE" Binding="{Binding JobRun.Source, Converter={StaticResource EnumToDescriptionConverter}}" Width="Auto" />
+ <DataGridTemplateColumn Header="#">
+ <DataGridTemplateColumn.CellTemplate>
+ <DataTemplate>
+ <materialDesign:PackIcon Width="24" Height="24" Margin="3 -5 0 0">
+ <materialDesign:PackIcon.Style>
+ <Style TargetType="materialDesign:PackIcon">
+ <Setter Property="Kind" Value="Check"></Setter>
+ <Style.Triggers>
+ <DataTrigger Binding="{Binding JobRun.JobRunStatus}" Value="Completed">
+ <Setter Property="Kind" Value="Check"></Setter>
+ <Setter Property="Foreground" Value="{StaticResource GreenOpenFileBrush}"></Setter>
+ </DataTrigger>
+ <DataTrigger Binding="{Binding JobRun.JobRunStatus}" Value="Aborted">
+ <Setter Property="Kind" Value="Alert"></Setter>
+ <Setter Property="Foreground" Value="{StaticResource OrangeBrush}"></Setter>
+ </DataTrigger>
+ <DataTrigger Binding="{Binding JobRun.JobRunStatus}" Value="Failed">
+ <Setter Property="Kind" Value="AlertOctagon"></Setter>
+ <Setter Property="Foreground" Value="{StaticResource RedBrush100}"></Setter>
+ </DataTrigger>
+ </Style.Triggers>
+ </Style>
+ </materialDesign:PackIcon.Style>
+ </materialDesign:PackIcon>
+ </DataTemplate>
+ </DataGridTemplateColumn.CellTemplate>
+ </DataGridTemplateColumn>
+ <DataGridTextColumn Header="ID" Binding="{Binding JobRun.ID}" MaxWidth="100" ElementStyle="{StaticResource WrapText}"/>
+ <DataGridTextColumn Header="Machine" Binding="{Binding Machine.SerialNumber}" Width="Auto" />
+ <DataGridTextColumn Header="User" Binding="{Binding User.Contact.FullName}" Width="80" ElementStyle="{StaticResource WrapText}"/>
+ <DataGridTextColumn Header="Job Name" Binding="{Binding JobRun.JobName}" MaxWidth="100" ElementStyle="{StaticResource WrapText}"/>
+ <DataGridTextColumn Header="Length" Binding="{Binding JobRun.JobLength, StringFormat={}{0:0.00}}" Width="Auto" />
+ <DataGridTextColumn Header="Source" Binding="{Binding JobRun.Source, Converter={StaticResource EnumToDescriptionConverter}}" Width="Auto" />
+ <DataGridTextColumn Header="Upload &#10;Duration" Binding="{Binding UploadDuration, Converter={StaticResource TimeSpanToTwoDigitsTimeConverter}, FallbackValue=5}" Width="Auto"/>
+ <DataGridTextColumn Header="Heating &#10;Duration" Binding="{Binding HeatingDuration, Converter={StaticResource TimeSpanToTwoDigitsTimeConverter}, FallbackValue=5}" Width="Auto" />
+ <DataGridTextColumn Header="Start Time" Binding="{Binding JobRun.ActualStartDate, Converter={StaticResource DateTimeUTCToShortDateTimeConverter}}" Width="Auto" />
+ <DataGridTextColumn Header="IsGradient" Binding="{Binding JobRun.IsGradient}" Width="Auto" />
+ <DataGridTextColumn Header="GR" Binding="{Binding JobRun.GradientResolutionCm}" Width="Auto" />
+ <DataGridTextColumn Header="Status" Binding="{Binding JobRun.JobRunStatus, Converter={StaticResource EnumToDescriptionConverter}}" Width="Auto"/>
+ <DataGridTextColumn Header="End Time" Binding="{Binding JobRun.EndDate, Converter={StaticResource DateTimeUTCToShortDateTimeConverter}}" Width="Auto" />
+ <DataGridTextColumn Header="End &#10;Position" Binding="{Binding JobRun.EndPosition, StringFormat={}{0:0.00}}" Width="Auto" />
+ <DataGridTemplateColumn Header="Liquid Quantities" Width="1*">
+ <DataGridTemplateColumn.CellTemplate>
+ <DataTemplate>
+ <ItemsControl ItemsSource="{Binding JobRun.LiquidQuantities,Mode=OneWay}" Margin="0 0 0 0" Height="60">
+ <ItemsControl.ItemContainerStyle>
+ <Style TargetType="ContentPresenter">
+ <Setter Property="Visibility" Value="Visible"></Setter>
+ <Style.Triggers>
+ <DataTrigger Binding="{Binding Quantity}" Value="0">
+ <Setter Property="Visibility" Value="Collapsed"></Setter>
+ </DataTrigger>
+ </Style.Triggers>
+ </Style>
+ </ItemsControl.ItemContainerStyle>
+ <ItemsControl.ItemsPanel>
+ <ItemsPanelTemplate>
+ <WrapPanel ></WrapPanel>
+ </ItemsPanelTemplate>
+ </ItemsControl.ItemsPanel>
+ <ItemsControl.ItemTemplate>
+ <DataTemplate>
+ <StackPanel Orientation="Vertical" ToolTip="{Binding Quantity}">
+ <!--<TextBlock VerticalAlignment="Center" Margin="10 0 0 0" Text="{Binding LiquidType,Converter={StaticResource EnumToDescriptionConverter}}"/>-->
+ <Rectangle Height="30" Width="20" Margin="0 0 0 0">
+ <Rectangle.Fill>
+ <SolidColorBrush Color="{Binding LiquidType,Converter={StaticResource LiquidTypeToColorConverter}}" />
+ </Rectangle.Fill>
+ </Rectangle>
+ <TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" Margin="2" Text="{Binding LiquidType,Converter={StaticResource EnumToDescriptionConverter}}" Foreground="Gray"/>
+ </StackPanel>
+ </DataTemplate>
+ </ItemsControl.ItemTemplate>
+ </ItemsControl>
+ </DataTemplate>
+ </DataGridTemplateColumn.CellTemplate>
+ </DataGridTemplateColumn>
</DataGrid.Columns>
</DataGrid>
<Border Grid.Row="1" Grid.Column="1" Margin="20, 0, 20, 10" BorderBrush="{StaticResource borderBrush}" Background="{StaticResource TransparentBackgroundBrush}" BorderThickness="1">