aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LayoutViewVM.cs
diff options
context:
space:
mode:
authorRoy Ben Shabat <Roy.mail.net@gmail.com>2021-01-18 09:58:49 +0200
committerRoy Ben Shabat <Roy.mail.net@gmail.com>2021-01-18 09:58:49 +0200
commite8cef1fd48f56027384ae163c33bce36f8b79b31 (patch)
tree83c8c4aec2fcb7de6f6786aaedc66a9f1cee23eb /Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LayoutViewVM.cs
parent2436ece5b22ee656bb0ec66c23fa890972bf912b (diff)
downloadTango-e8cef1fd48f56027384ae163c33bce36f8b79b31.tar.gz
Tango-e8cef1fd48f56027384ae163c33bce36f8b79b31.zip
Fixed ink filling colors.
Improved ink filling message.
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LayoutViewVM.cs')
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LayoutViewVM.cs31
1 files changed, 30 insertions, 1 deletions
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