From e8cef1fd48f56027384ae163c33bce36f8b79b31 Mon Sep 17 00:00:00 2001 From: Roy Ben Shabat Date: Mon, 18 Jan 2021 09:58:49 +0200 Subject: Fixed ink filling colors. Improved ink filling message. --- .../PPC/Tango.PPC.UI/ViewModels/LayoutViewVM.cs | 31 +++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) (limited to 'Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels') diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LayoutViewVM.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LayoutViewVM.cs index a2baec8b8..7a60f2cdc 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LayoutViewVM.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LayoutViewVM.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.Diagnostics; using System.Linq; using System.Text; using System.Threading.Tasks; @@ -51,7 +52,35 @@ namespace Tango.PPC.UI.ViewModels public String Message { - get { return Status.Cartridge.Slot == PMR.Diagnostics.CartridgeSlot.Ink ? "Ink filling is in progress..." : "Waste emptying is in progress..."; } + get + { + if (Status.Cartridge.Slot == PMR.Diagnostics.CartridgeSlot.Ink) + { + try + { + int index = Status.Cartridge.Index; + var idsPack = _machineProvider.Machine.Configuration.NoneEmptyIdsPacks.FirstOrDefault(x => x.PackIndex == index); + + if (idsPack != null) + { + return $"{idsPack.LiquidType.Name} filling is in progress..."; + } + else + { + return "Ink filling is in progress..."; + } + } + catch (Exception ex) + { + Debug.WriteLine(ex); + return "Ink filling is in progress..."; + } + } + else + { + return "Waste emptying is in progress..."; + } + } } public Brush Brush -- cgit v1.3.1