aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs
diff options
context:
space:
mode:
authorVictoria Plitt <Victoria.Plitt@twine-s.com>2019-11-14 11:38:18 +0200
committerVictoria Plitt <Victoria.Plitt@twine-s.com>2019-11-14 11:38:18 +0200
commitebcd646d565cc251d808048fc7ffa2bacbeaeca2 (patch)
tree271bbe112725a35d67ebac6845cfd79ff1d13fd8 /Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs
parent07083f3615d3c0d8badcf9e41ef740afc5e9442e (diff)
downloadTango-ebcd646d565cc251d808048fc7ffa2bacbeaeca2.tar.gz
Tango-ebcd646d565cc251d808048fc7ffa2bacbeaeca2.zip
Changed color of text and format in InsufficientLiquidQuantityException dialog
Diffstat (limited to 'Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs')
-rw-r--r--Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs11
1 files changed, 7 insertions, 4 deletions
diff --git a/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs b/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs
index ebbf520c3..9a5c7ff9b 100644
--- a/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs
+++ b/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs
@@ -40,6 +40,7 @@ using Tango.Integration.Emergency;
using Tango.PMR.MachineStatus;
using Newtonsoft.Json;
using Tango.PMR.Integration;
+using System.Globalization;
namespace Tango.Integration.Operation
{
@@ -1484,12 +1485,13 @@ namespace Tango.Integration.Operation
if (idsLevel.Required > idsLevel.Current)
{
shouldThrow = true;
-
- idsLevel.Message = $"Missing {idsLevel.Required - idsLevel.Current} nanoliters to complete the job.";
+ string display_value = (((double)(idsLevel.Required - idsLevel.Current)/ 1000000000)).ToString("N2", CultureInfo.InvariantCulture);
+ idsLevel.Message = $"Missing {display_value} liters to complete the job.";
if (idsLevel.Required > idsLevel.Maximum)
{
- idsLevel.Message = $"Required ink exceeds the maximum capacity of the dispenser by {idsLevel.Required - idsLevel.Maximum} nanoliters. Please reduce the segment length.";
+ display_value = (((double)(idsLevel.Required - idsLevel.Maximum))/ 1000000000).ToString("N2", CultureInfo.InvariantCulture);
+ idsLevel.Message = $"Required ink exceeds the maximum capacity of the dispenser by {display_value} liters. Please reduce the segment length.";
}
}
@@ -1569,7 +1571,8 @@ namespace Tango.Integration.Operation
{
IdsPack = idsPack,
Current = packLevel.DispenserLevel,
- Required = (int)liquidQuantities[index]
+ Required = (int)liquidQuantities[index],
+ Maximum = MAX_DISPENSER_NANOLITER,
};
if (liquidQuantities[index] > packLevel.DispenserLevel)