diff options
| author | Victoria Plitt <Victoria.Plitt@twine-s.com> | 2023-05-14 16:45:03 +0300 |
|---|---|---|
| committer | Victoria Plitt <Victoria.Plitt@twine-s.com> | 2023-05-14 16:45:03 +0300 |
| commit | 7d54607a2a61b9a99376b385c40e94257365eb18 (patch) | |
| tree | 282168fa8e1f602d9e61877aae3968682b2a490e /Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineStatusView.xaml | |
| parent | 963f8c4fa2b4da7d875dc223cd70c55e0d5390c1 (diff) | |
| download | Tango-7d54607a2a61b9a99376b385c40e94257365eb18.tar.gz Tango-7d54607a2a61b9a99376b385c40e94257365eb18.zip | |
Working on Jerrican Levels Twine X4.
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineStatusView.xaml')
| -rw-r--r-- | Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineStatusView.xaml | 57 |
1 files changed, 41 insertions, 16 deletions
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineStatusView.xaml b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineStatusView.xaml index 383ce77e6..b6541df1f 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineStatusView.xaml +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineStatusView.xaml @@ -11,6 +11,7 @@ xmlns:locaControls="clr-namespace:Tango.PPC.UI.Controls" xmlns:localConverters="clr-namespace:Tango.PPC.UI.Converters" xmlns:global="clr-namespace:Tango.PPC.UI" + xmlns:models="clr-namespace:Tango.PPC.UI.Models" xmlns:local="clr-namespace:Tango.PPC.UI.Views" mc:Ignorable="d" d:DesignHeight="1280" d:DesignWidth="932" d:DataContext="{d:DesignInstance Type=vm:MachineStatusViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.MachineStatusViewVM}"> @@ -121,10 +122,11 @@ </DataTemplate> <PathGeometry x:Key="InkContainerPath" Figures="M16.000001,0.5 C24.560414,0.5 31.500001,6.9918714 31.500001,15 31.500001,15.500508 31.472893,15.995093 31.419976,16.48254 L31.417605,16.5 31.500001,16.5 31.500001,71 31.500001,71.5 31.486487,71.5 31.479832,71.74617 C31.064694,79.407524 24.292901,85.5 16.000001,85.5 7.7070995,85.5 0.9353075,79.407524 0.52016807,71.74617 L0.51351446,71.5 0.5,71.5 0.5,71 0.5,16.5 0.58239609,16.5 0.58002502,16.48254 C0.52710831,15.995093 0.50000054,15.500508 0.5,15 0.50000054,6.9918714 7.4395867,0.5 16.000001,0.5 z"/> - <DataTemplate x:Key="LiquidBox"> + <DataTemplate x:Key="LiquidBox" DataType="{x:Type models:JerricanLevelModel}"> <DockPanel> <TextBlock DockPanel.Dock="Bottom" Text="{Binding IDSPack.LiquidType.ShortName}" HorizontalAlignment="Center" Margin="0 8 0 0"></TextBlock> - <Grid> + <TextBlock DockPanel.Dock="Top" Height="15" VerticalAlignment="Top" TextAlignment="Center" Visibility="{Binding HasRemainingTimeoutError,Converter={StaticResource BooleanToVisibilityConverter}}" Text="{Binding RemainingTimeoutError, StringFormat='{}{0:hh}:{0:mm}m', FallbackValue=00:00}" HorizontalAlignment="Center" FontSize="{StaticResource TangoSmallFontSizeBar}" ></TextBlock> + <Grid > <Grid ClipToBounds="True" HorizontalAlignment="Center"> <Path Fill="{Binding Path=IDSPack.LiquidType, Converter={StaticResource LiquidTypeToBrushConverter}}" StrokeThickness="1.5" > <Path.Resources> @@ -163,9 +165,30 @@ <Rectangle Width="10" Height="2" Stroke="{StaticResource TangoTextWatermarkBrush}"></Rectangle> <Rectangle Width="10" Height="2" Stroke="{StaticResource TangoTextWatermarkBrush}"></Rectangle> </UniformGrid> - <Image Source="../Images/Overview Icons/error.png" Stretch="Fill" VerticalAlignment="Top" Width="24" Height="24" Margin="0 4 0 0" Visibility="{Binding MidTankEmpty, Converter={StaticResource BooleanToVisibilityConverter}}"/> - <Image Source="../Images/Overview Icons/Warning.png" Stretch="Fill" VerticalAlignment="Top" Width="24" Height="24" Visibility="Collapsed"/> - <Image Source="../Images/Overview Icons/UpdateInk.png" Stretch="Fill" VerticalAlignment="Top" Width="24" Height="24" Visibility="Collapsed"/> + <Image Stretch="Fill" VerticalAlignment="Top" Width="24" Height="24" Margin="0 4 0 0"> + <Image.Style> + <Style TargetType="{x:Type Image}" > + <Setter Property="Source" Value="{x:Null}"/> + <Style.Triggers> + <DataTrigger Binding="{Binding IsMidTankLow}" Value="True"> + <Setter Property="Source" Value="../Images/Overview Icons/Warning.png"/> + </DataTrigger> + <DataTrigger Binding="{Binding FillingTimeoutError}" Value="True"> + <Setter Property="Source" Value="../Images/Overview Icons/Error.png"/> + </DataTrigger> + <DataTrigger Binding="{Binding MidTankEmpty}" Value="True"> + <Setter Property="Source" Value="../Images/Overview Icons/Error.png"/> + </DataTrigger> + <DataTrigger Binding="{Binding MidTankRefillPumpActive}" Value="True" > + <Setter Property="Source" Value="../Images/Overview Icons/UpdateInk.png"/> + </DataTrigger> + <DataTrigger Binding="{Binding JerricanPresent}" Value="False" > + <Setter Property="Source" Value="../Images/Overview Icons/JericanRemoved.png"/> + </DataTrigger> + </Style.Triggers> + </Style> + </Image.Style> + </Image> </Grid> </DockPanel> </DataTemplate> @@ -173,7 +196,8 @@ <DataTemplate x:Key="WasteBox"> <DockPanel> <TextBlock DockPanel.Dock="Bottom" Text="Waste" HorizontalAlignment="Center" Margin="0 8 0 0"></TextBlock> - <Grid> + <TextBlock DockPanel.Dock="Top" Height="15" VerticalAlignment="Top" TextAlignment="Center" Text="" HorizontalAlignment="Center" FontSize="{StaticResource TangoSmallFontSizeBar}" ></TextBlock> + <Grid DockPanel.Dock="Top"> <Grid ClipToBounds="True" HorizontalAlignment="Center"> <Path Fill="#CCCCCC"> <Path.Resources> @@ -212,10 +236,11 @@ </DockPanel> </DataTemplate> - <DataTemplate x:Key="LubBox"> - <DockPanel> + <!--<DataTemplate x:Key="LubBox"> + <DockPanel > <TextBlock DockPanel.Dock="Bottom" Text="Lub" HorizontalAlignment="Center" Margin="0 8 0 0"></TextBlock> - <Grid> + <TextBlock DockPanel.Dock="Top" Height="15" VerticalAlignment="Top" TextAlignment="Center" Text="" HorizontalAlignment="Center" FontSize="{StaticResource TangoSmallFontSizeBar}" ></TextBlock> + <Grid DockPanel.Dock="Top"> <Grid ClipToBounds="True" HorizontalAlignment="Center"> <Path Fill="#CCCCCC"> <Path.Resources> @@ -230,13 +255,13 @@ <CombinedGeometry.Geometry2> <RectangleGeometry Rect="1,0 30,88"> - <!--<RectangleGeometry.Rect> + --><!--<RectangleGeometry.Rect> <MultiBinding Converter="{StaticResource MidTankLevelToElementRectConverter}"> <Binding Source="{StaticResource RectHeight}"/> <Binding Source="{StaticResource RectWidth}"/> <Binding Path="Level" /> </MultiBinding> - </RectangleGeometry.Rect>--> + </RectangleGeometry.Rect>--><!-- </RectangleGeometry> </CombinedGeometry.Geometry2> </CombinedGeometry> @@ -252,7 +277,7 @@ </UniformGrid> </Grid> </DockPanel> - </DataTemplate> + </DataTemplate>--> </UserControl.Resources> <Grid Width="960" Height="1080"> @@ -1053,8 +1078,8 @@ <TextBlock Margin="12 0 0 0 " VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="{StaticResource TangoComboBoxItemFontSize}">Waste</TextBlock> </StackPanel> <StackPanel Orientation="Horizontal" Margin="-25 24 0 0"> - <Rectangle Height="88" Width="2" Fill="{StaticResource TangoColumnDividerBrush}" VerticalAlignment="Top" Margin="-15 0 0 0"/> - <ContentControl Margin="20 0 0 0" ContentTemplate="{StaticResource WasteBox}" Content="{Binding}" IsTabStop="False"/> + <Rectangle Height="88" Width="2" Fill="{StaticResource TangoColumnDividerBrush}" VerticalAlignment="Top" Margin="-15 15 0 0"/> + <ContentControl Margin="20 0 0 0" ContentTemplate="{StaticResource WasteBox}" Content="{Binding}" IsTabStop="False"/> </StackPanel> </StackPanel> @@ -1072,8 +1097,8 @@ </ItemsControl.ItemsPanel> </ItemsControl> - <Rectangle Height="88" Width="2" Fill="{StaticResource TangoColumnDividerBrush}" VerticalAlignment="Top" Margin="12 0 0 0"/> - <ContentControl Margin="45 0 0 0" ContentTemplate="{StaticResource LubBox}" Content="{Binding}" IsTabStop="False"/> + <!--<Rectangle Height="88" Width="2" Fill="{StaticResource TangoColumnDividerBrush}" VerticalAlignment="Top" Margin="12 15 0 0"/> + <ContentControl Margin="45 0 0 0" ContentTemplate="{StaticResource LubBox}" Content="{Binding}" IsTabStop="False"/>--> </StackPanel> </StackPanel> </DockPanel> |
