aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/FSE/Tango.FSE.UI
diff options
context:
space:
mode:
authorRoy <Roy.mail.net@gmail.com>2023-05-14 15:40:06 +0300
committerRoy <Roy.mail.net@gmail.com>2023-05-14 15:40:06 +0300
commitb605553a75d7a9d860123a0c759387039b666ff8 (patch)
treef9b722a41b4889c578bcca29fddbd3b0eeaf0d54 /Software/Visual_Studio/FSE/Tango.FSE.UI
parent9f19a398394adf03f212e68746c099a59caca8e7 (diff)
parent963f8c4fa2b4da7d875dc223cd70c55e0d5390c1 (diff)
downloadTango-b605553a75d7a9d860123a0c759387039b666ff8.tar.gz
Tango-b605553a75d7a9d860123a0c759387039b666ff8.zip
Merge branch 'eureka' of https://twinetfs.visualstudio.com/Tango/_git/Tango into eureka
Diffstat (limited to 'Software/Visual_Studio/FSE/Tango.FSE.UI')
-rw-r--r--Software/Visual_Studio/FSE/Tango.FSE.UI/Converters/MidTankLevelToElementHeightConverter.cs6
-rw-r--r--Software/Visual_Studio/FSE/Tango.FSE.UI/Tiles/MidTankLevels/MidTankLevelsTile.cs2
-rw-r--r--Software/Visual_Studio/FSE/Tango.FSE.UI/Tiles/MidTankLevels/MidTankLevelsTileView.xaml1
3 files changed, 5 insertions, 4 deletions
diff --git a/Software/Visual_Studio/FSE/Tango.FSE.UI/Converters/MidTankLevelToElementHeightConverter.cs b/Software/Visual_Studio/FSE/Tango.FSE.UI/Converters/MidTankLevelToElementHeightConverter.cs
index 88a90484d..f96725816 100644
--- a/Software/Visual_Studio/FSE/Tango.FSE.UI/Converters/MidTankLevelToElementHeightConverter.cs
+++ b/Software/Visual_Studio/FSE/Tango.FSE.UI/Converters/MidTankLevelToElementHeightConverter.cs
@@ -16,9 +16,9 @@ namespace Tango.FSE.UI.Converters
try
{
double parentActualHeight = (double)values[0];
- double midTankLevel = Math.Min((double)values[1], MachineOperator.MAX_MIDTANK_LITERS);
- //var test = (parentActualHeight - (midTankLevel / MachineOperator.MAX_MIDTANK_LITERS) * parentActualHeight);
- return (parentActualHeight - (midTankLevel / MachineOperator.MAX_MIDTANK_LITERS) * parentActualHeight);
+ double max = (double)values[2];
+ double midTankLevel = Math.Min((double)values[1], max);
+ return (parentActualHeight - (midTankLevel / max) * parentActualHeight);
}
catch
{
diff --git a/Software/Visual_Studio/FSE/Tango.FSE.UI/Tiles/MidTankLevels/MidTankLevelsTile.cs b/Software/Visual_Studio/FSE/Tango.FSE.UI/Tiles/MidTankLevels/MidTankLevelsTile.cs
index d8165d8aa..730055872 100644
--- a/Software/Visual_Studio/FSE/Tango.FSE.UI/Tiles/MidTankLevels/MidTankLevelsTile.cs
+++ b/Software/Visual_Studio/FSE/Tango.FSE.UI/Tiles/MidTankLevels/MidTankLevelsTile.cs
@@ -142,7 +142,7 @@ namespace Tango.FSE.UI.Tiles.MidTankLevels
{
MidTankLevels = MachineProvider.Machine.Configuration.NoneEmptyIdsPacks.Where(x => x.MidTankType.HasLevelMeasure).OrderBy(x => x.PackIndex).Select(x => new MidTankLevelModel()
{
- Max = MachineOperator.MAX_MIDTANK_LITERS,
+ Max = x.MidTankType.LiterCapacity,
IDSPack = x,
}).ToList();
}
diff --git a/Software/Visual_Studio/FSE/Tango.FSE.UI/Tiles/MidTankLevels/MidTankLevelsTileView.xaml b/Software/Visual_Studio/FSE/Tango.FSE.UI/Tiles/MidTankLevels/MidTankLevelsTileView.xaml
index 7465f41c0..5e4f8ed9a 100644
--- a/Software/Visual_Studio/FSE/Tango.FSE.UI/Tiles/MidTankLevels/MidTankLevelsTileView.xaml
+++ b/Software/Visual_Studio/FSE/Tango.FSE.UI/Tiles/MidTankLevels/MidTankLevelsTileView.xaml
@@ -58,6 +58,7 @@
<MultiBinding Converter="{StaticResource MidTankLevelToElementHeightConverter}">
<Binding ElementName="pathBorder" Path="ActualHeight" />
<Binding Path="Level" />
+ <Binding Path="Max" />
</MultiBinding>
</Setter.Value>
</Setter>