aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Statistics/Views/JobRunsView.xaml
diff options
context:
space:
mode:
authorAvi Levkovich <avi@twine-s.com>2020-08-25 10:08:01 +0300
committerAvi Levkovich <avi@twine-s.com>2020-08-25 10:08:01 +0300
commit338edba081dba2a2aefb634811be1cc84ec93d64 (patch)
tree0021538796c254a8eab8527e8461a2e831e68c1c /Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Statistics/Views/JobRunsView.xaml
parent49ddda1cc22d6cbb72f499b37e5db32c95252dfa (diff)
downloadTango-338edba081dba2a2aefb634811be1cc84ec93d64.tar.gz
Tango-338edba081dba2a2aefb634811be1cc84ec93d64.zip
merge
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.xaml86
1 files changed, 38 insertions, 48 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 9e4a9603e..8724fcc2b 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
@@ -13,8 +13,10 @@
xmlns:tooltips="clr-namespace:Tango.MachineStudio.Statistics.Tooltips"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
xmlns:enumerations="clr-namespace:Tango.BL.Enumerations;assembly=Tango.BL"
+ xmlns:controls="clr-namespace:Tango.SharedUI.Controls;assembly=Tango.SharedUI"
xmlns:local="clr-namespace:Tango.MachineStudio.Statistics.Views"
xmlns:model="clr-namespace:Tango.MachineStudio.Statistics.Models"
+ xmlns:vs="clr-namespace:Tango.MachineStudio.Statistics.ViewModels"
xmlns:wellknowntypes="clr-namespace:Google.Protobuf.WellKnownTypes;assembly=Google.Protobuf"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="1800" Foreground="{StaticResource JobFieldForeground}">
@@ -33,7 +35,6 @@
<localConverters:NanoLiterToLiterFormatConverter x:Key="NanoLiterToLiterFormatConverter"/>
<localConverters:LiquidQuantityToFormatStringConverter x:Key="LiquidQuantityToFormatStringConverter"/>
<localConverters:TooltipLiquidQuantityFormatConverter x:Key="TooltipLiquidQuantityFormatConverter"/>
- <localConverters:HeadCleaningConverter x:Key="HeadCleaningConverter"/>
<ResourceDictionary x:Key="SelectAllTextBoxResource">
<Style TargetType="TextBox">
@@ -42,6 +43,12 @@
</Style>
</ResourceDictionary>
+ <ObjectDataProvider x:Key="HeadCleaning" MethodName="GetValues" ObjectType="{x:Type sys:Enum}">
+ <ObjectDataProvider.MethodParameters>
+ <x:Type TypeName="vs:HeadCleaningSelectionEnum"/>
+ </ObjectDataProvider.MethodParameters>
+ </ObjectDataProvider>
+
<Style TargetType="{x:Type TextBlock}" x:Key="WrapText">
<Setter Property="TextWrapping" Value="Wrap"/>
</Style>
@@ -55,7 +62,7 @@
<Setter Property="Background" Value="Transparent"/>
<Setter Property="LegendLocation" Value="None"/>
</Style>
-
+
<DataTemplate x:Key="PopUpDataTemplate">
<CheckBox VerticalAlignment="Center" FontSize="11" DockPanel.Dock="Left" IsChecked="{Binding IsSelected}">
<CheckBox.Content>
@@ -64,14 +71,6 @@
</CheckBox>
</DataTemplate>
- <DataTemplate x:Key="PopUpSNDataTemplate">
- <CheckBox VerticalAlignment="Center" FontSize="11" DockPanel.Dock="Left" IsChecked="{Binding IsSelected}" >
- <CheckBox.Content>
- <TextBlock Margin="5 0 0 0" VerticalAlignment="Center" Text="{Binding Data.SerialNumber}" ToolTip="{Binding Data.SerialNumber}" FontFamily="{StaticResource FontName}"></TextBlock>
- </CheckBox.Content>
- </CheckBox>
- </DataTemplate>
-
<DataTemplate x:Key="PopupBoolDataTemplate">
<CheckBox VerticalAlignment="Center" FontSize="11" DockPanel.Dock="Left" IsChecked="{Binding IsSelected}">
<CheckBox.Content>
@@ -80,22 +79,6 @@
</CheckBox>
</DataTemplate>
- <DataTemplate x:Key="PopupThreadDataTemplate">
- <CheckBox VerticalAlignment="Center" FontSize="11" DockPanel.Dock="Left" IsChecked="{Binding IsSelected}" >
- <CheckBox.Content>
- <TextBlock Margin="5 0 5 0" VerticalAlignment="Center" Text="{Binding Data.Name}" ToolTip="{Binding Data.Name}" FontFamily="{StaticResource FontName}" FontSize="11"></TextBlock>
- </CheckBox.Content>
- </CheckBox>
- </DataTemplate>
-
- <DataTemplate x:Key="PopupIsHeadHeatingDataTemplate">
- <CheckBox VerticalAlignment="Center" FontSize="11" DockPanel.Dock="Left" IsChecked="{Binding IsSelected}">
- <CheckBox.Content>
- <TextBlock Margin="5 0 0 0" VerticalAlignment="Center" Text="{Binding Data, Converter={StaticResource HeadCleaningConverter}}"/>
- </CheckBox.Content>
- </CheckBox>
- </DataTemplate>
-
<Style x:Key="{x:Type ToolTip}" TargetType="{x:Type ToolTip}" BasedOn="{StaticResource MaterialDesignToolTip}">
<Setter Property="Background" Value="{StaticResource Logging.Background}" />
@@ -158,13 +141,18 @@
</DockPanel>
</Border>
<Popup AllowsTransparency="True" StaysOpen="False" IsOpen="{Binding RelativeSource={RelativeSource AncestorType=ToggleButton},Path=IsChecked }">
- <Border Padding="3" CornerRadius="0 0 3 3" MinWidth="{Binding RelativeSource={RelativeSource AncestorType=ToggleButton},Path=Width}" Margin="5" Background="{StaticResource TransparentBackgroundBrush200}" BorderBrush="{StaticResource AutoCompleteTextBox.Popup.BorderBrush}" >
+ <Border Padding="3" CornerRadius="0 0 3 3" MinWidth="{Binding RelativeSource={RelativeSource AncestorType=ToggleButton},Path=Width}" Margin="5" BorderBrush="{StaticResource AutoCompleteTextBox.Popup.BorderBrush}" >
<Border.Effect>
<DropShadowEffect Opacity="0.2" />
</Border.Effect>
- <ScrollViewer MaxHeight="600" Background="{StaticResource TransparentBackgroundBrush}" >
- <ItemsControl ItemsSource="{Binding SelectedMachines}" Foreground="{StaticResource MainWindow.Foreground}" ItemTemplate="{StaticResource PopUpSNDataTemplate}"/>
- </ScrollViewer>
+ <controls:AllSelectedCheckboxList Style="{StaticResource AllSelectedCheckBoxListStyle}" MaxHeight="600" ItemsSource="{Binding SelectedMachines}" Background="{StaticResource ComboBox.Floating.Background}" Foreground="{StaticResource MainWindow.Foreground}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" SelectionMode="Multiple" AllSelected="True" >
+ <controls:AllSelectedCheckboxList.ItemTemplate>
+ <DataTemplate >
+ <TextBlock Margin="5 0 0 0" VerticalAlignment="Center" Text="{Binding Data.SerialNumber}" ToolTip="{Binding Data.SerialNumber}" FontFamily="{StaticResource FontName}" Background="{DynamicResource TransparentBackgroundBrush}" FontSize="11"></TextBlock>
+
+ </DataTemplate>
+ </controls:AllSelectedCheckboxList.ItemTemplate>
+ </controls:AllSelectedCheckboxList>
</Border>
</Popup>
</Grid>
@@ -342,10 +330,13 @@
<Border.Effect>
<DropShadowEffect Opacity="0.2" />
</Border.Effect>
- <ScrollViewer MaxHeight="600" Background="{StaticResource TransparentBackgroundBrush200}">
- <ItemsControl ItemsSource="{Binding SelectedThreads}" Foreground="{StaticResource MainWindow.Foreground}" ItemTemplate="{StaticResource PopupThreadDataTemplate}"/>
-
- </ScrollViewer>
+ <controls:AllSelectedCheckboxList Style="{StaticResource AllSelectedCheckBoxListStyle}" MaxHeight="600" ItemsSource="{Binding SelectedThreads}" Background="{StaticResource ComboBox.Floating.Background}" Foreground="{StaticResource MainWindow.Foreground}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" SelectionMode="Multiple" AllSelected="True" FontSize="11">
+ <controls:AllSelectedCheckboxList.ItemTemplate>
+ <DataTemplate >
+ <TextBlock Margin="5 0 0 0" VerticalAlignment="Center" Text="{Binding Data.Name}" ToolTip="{Binding Data.Name}" FontFamily="{StaticResource FontName}"></TextBlock>
+ </DataTemplate>
+ </controls:AllSelectedCheckboxList.ItemTemplate>
+ </controls:AllSelectedCheckboxList>
</Border>
</Popup>
</Grid>
@@ -364,18 +355,8 @@
<Button x:Name="IsHeadCleaningButton" Width="18" Padding="0" Height="16" DockPanel.Dock="Right" BorderBrush="{x:Null}" HorizontalAlignment="Left" Click="IsHeadCleaningButton_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">
- <TextBlock.Style>
- <Style TargetType="{x:Type TextBlock}">
- <Setter Property="Text" Value="{Binding IsHeadCleaningSelection.SynchedSource, Converter={StaticResource CollectionConverter}, ConverterParameter='Exclude, Only'}">
- </Setter>
- <Style.Triggers>
- <DataTrigger Binding="{Binding IsHeadCleaningSelection.SynchedSource.Count}" Value="2">
- <Setter Property="Text" Value="Include"/>
- </DataTrigger>
- </Style.Triggers>
- </Style>
- </TextBlock.Style>
+ <TextBlock VerticalAlignment="Center" Foreground="{StaticResource MainWindow.Foreground}" FontSize="11" Margin="5 0 2 0" Text="{Binding HeadCleaningSelected, Converter={StaticResource EnumToDescriptionConverter}}">
+
</TextBlock>
</DockPanel>
</Border>
@@ -384,8 +365,17 @@
<Border.Effect>
<DropShadowEffect Opacity="0.2" />
</Border.Effect>
- <ItemsControl ItemsSource="{Binding IsHeadCleaningSelection}" Foreground="{StaticResource MainWindow.Foreground}" ItemTemplate="{StaticResource PopupIsHeadHeatingDataTemplate}"/>
-
+ <ListBox x:Name="HeadCleaningListBoxItem" ItemsSource="{Binding Source={StaticResource HeadCleaning}}" Foreground="{StaticResource MainWindow.Foreground}" SelectedItem="{Binding HeadCleaningSelected, Mode=TwoWay}" SelectionMode="Single" >
+ <ListBox.ItemTemplate>
+ <DataTemplate>
+ <CheckBox x:Name="HeadCleaningCheckBox" Selector.IsSelected="True" VerticalAlignment="Center" FontSize="11" DockPanel.Dock="Left" IsChecked="{Binding IsSelected, Mode=TwoWay, RelativeSource={RelativeSource AncestorType={x:Type ListBoxItem}}, UpdateSourceTrigger=PropertyChanged}" Click="CheckBox_PreventUndoCheck">
+ <CheckBox.Content>
+ <TextBlock Margin="5 0 0 0" VerticalAlignment="Center" Text="{Binding Converter={StaticResource EnumToDescriptionConverter}}"/>
+ </CheckBox.Content>
+ </CheckBox>
+ </DataTemplate>
+ </ListBox.ItemTemplate>
+ </ListBox>
</Border>
</Popup>
</Grid>