From ebcd646d565cc251d808048fc7ffa2bacbeaeca2 Mon Sep 17 00:00:00 2001 From: Victoria Plitt Date: Thu, 14 Nov 2019 11:38:18 +0200 Subject: Changed color of text and format in InsufficientLiquidQuantityException dialog --- .../Tango.Integration/Operation/MachineOperator.cs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs') 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) -- cgit v1.3.1