aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineStatusView.xaml
diff options
context:
space:
mode:
authorVictoria Plitt <Victoria.Plitt@twine-s.com>2023-04-24 13:46:46 +0300
committerVictoria Plitt <Victoria.Plitt@twine-s.com>2023-04-24 13:46:46 +0300
commit9f900ab8d1c25e8c62ded7b56cd3991d4cd14248 (patch)
tree54fe3b39e2a4bd765daa407202cd22e2c1f5ae6d /Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineStatusView.xaml
parentbadb781019975dae252b6f48c757897c4f07b150 (diff)
downloadTango-9f900ab8d1c25e8c62ded7b56cd3991d4cd14248.tar.gz
Tango-9f900ab8d1c25e8c62ded7b56cd3991d4cd14248.zip
InkLevels converters. Bug in progress bar.
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.xaml32
1 files changed, 25 insertions, 7 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 49e18edf5..234af2312 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineStatusView.xaml
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineStatusView.xaml
@@ -3,6 +3,7 @@
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:sys="clr-namespace:System;assembly=mscorlib"
xmlns:shapes="clr-namespace:Tango.SharedUI.Shapes;assembly=Tango.SharedUI"
xmlns:touch="clr-namespace:Tango.Touch.Controls;assembly=Tango.Touch"
xmlns:vm="clr-namespace:Tango.PPC.UI.ViewModels"
@@ -20,6 +21,8 @@
<localConverters:CollectionToCountConverter x:Key="CollectionToCountConverter"/>
<localConverters:ProgressLengthSpoolConverter x:Key="ProgressLengthSpoolConverter"/>
<localConverters:ProgressWeightSpoolConverter x:Key="ProgressWeightSpoolConverter"/>
+ <localConverters:LiquidTypeToBrushConverter x:Key="LiquidTypeToBrushConverter"/>
+ <localConverters:MidTankLevelToElementRectConverter x:Key="MidTankLevelToElementRectConverter"/>
<Style x:Key="LinkRoundButtonStyle" TargetType="{x:Type touch:TouchButton}">
<Setter Property="Background" Value="{StaticResource TangoMidAccentBrush}"></Setter>
@@ -123,15 +126,28 @@
<TextBlock DockPanel.Dock="Bottom" Text="{Binding IDSPack.LiquidType.ShortName}" HorizontalAlignment="Center" Margin="0 8 0 0"></TextBlock>
<Grid>
<Grid ClipToBounds="True" HorizontalAlignment="Center">
- <Path Fill="#4F81BD" >
+ <Path Fill="{Binding Path=IDSPack.LiquidType, Converter={StaticResource LiquidTypeToBrushConverter}}">
+ <Path.Resources>
+ <sys:Double x:Key="RectWidth">30</sys:Double>
+ <sys:Double x:Key="RectHeight">88</sys:Double>
+ </Path.Resources>
<Path.Data>
<CombinedGeometry GeometryCombineMode="Intersect">
<CombinedGeometry.Geometry1>
<StaticResource ResourceKey="InkContainerPath"/>
</CombinedGeometry.Geometry1>
<CombinedGeometry.Geometry2>
- <RectangleGeometry Rect="1,30 30,88" />
- </CombinedGeometry.Geometry2>
+ <!--Rect="1,30 30,88"-->
+ <RectangleGeometry >
+ <RectangleGeometry.Rect>
+ <MultiBinding Converter="{StaticResource MidTankLevelToElementRectConverter}">
+ <Binding Source="{StaticResource RectHeight}"/>
+ <Binding Source="{StaticResource RectWidth}"/>
+ <Binding Path="Level" />
+ </MultiBinding>
+ </RectangleGeometry.Rect>
+ </RectangleGeometry>
+ </CombinedGeometry.Geometry2>
</CombinedGeometry>
</Path.Data>
</Path>
@@ -499,8 +515,9 @@
<Run Text="x"></Run><Run Text="{Binding RunningJobStatus.RemainingUnits}"></Run>
</TextBlock>-->
</Grid>
- <touch:MultiRangeSlider x:Name="PART_LowerSlider" Height="30" Margin="0 0 0 0" Minimum="0" Foreground="{StaticResource TangoDarkForegroundBrush}"
- IsSnapToTickEnabled="True" TickFrequency="1" VerticalAlignment="Center" IsEnabled="False" Maximum="{Binding RunningJobStatus.TotalProgressMinusSettingUp}"
+ <touch:MultiRangeSlider x:Name="PART_LowerSlider" Height="30" Margin="0 0 0 0" Foreground="{StaticResource TangoDarkForegroundBrush}"
+ IsSnapToTickEnabled="True" TickFrequency="1" VerticalAlignment="Center" Maximum="{Binding RunningJobStatus.TotalProgressMinusSettingUp}" Minimum="0" IsEnabled="False"
+ MaximumValue ="{Binding RunningJobStatus.TotalProgressMinusSettingUp}"
Value ="{Binding RunningJobStatus.ProgressMinusSettingUp}"/>
<UniformGrid DockPanel.Dock="Bottom" Columns="4" Rows="1" HorizontalAlignment="Left" Margin="0 35 0 0" Height="Auto" VerticalAlignment="Top" Width="1200">
@@ -746,8 +763,9 @@
<StackPanel Orientation="Vertical" Margin="30 8 30 0" >
<locaControls:RunningJobViewerEureka Height="16" DisplayMarkers="False" IsActive="True" Job="{Binding Job}" RunningJobStatus="{Binding RunningJobStatus}" />
- <touch:MultiRangeSlider x:Name="PART_LowerSlider1" Height="26" Margin="0 0 0 0" Minimum="0" Foreground="{StaticResource TangoDarkForegroundBrush}"
- IsSnapToTickEnabled="True" TickFrequency="1" VerticalAlignment="Center" IsEnabled="False" Maximum="{Binding RunningJobStatus.TotalProgressMinusSettingUp}" Value ="{Binding RunningJobStatus.ProgressMinusSettingUp}"/>
+ <touch:MultiRangeSlider x:Name="PART_LowerSlider1" Height="26" Margin="0 0 0 0" Foreground="{StaticResource TangoDarkForegroundBrush}"
+ IsSnapToTickEnabled="True" TickFrequency="1" VerticalAlignment="Center" Maximum="{Binding RunningJobStatus.TotalProgressMinusSettingUp}" Minimum="0" IsEnabled="False"
+ MaximumValue ="{Binding RunningJobStatus.TotalProgressMinusSettingUp}" Value ="{Binding RunningJobStatus.ProgressMinusSettingUp}"/>
</StackPanel>
</DockPanel>