From 238beb908fc205fd30b97894095b8f1c1a4fb50b Mon Sep 17 00:00:00 2001 From: Roy Ben Shabat Date: Thu, 19 Jun 2025 00:18:39 +0300 Subject: Added log to jerrican insertion. --- .../PPC/Tango.PPC.UI/ViewModels/MachineStatusViewVM.cs | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels') diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineStatusViewVM.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineStatusViewVM.cs index 7b0f47927..59f4d4f93 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineStatusViewVM.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineStatusViewVM.cs @@ -463,6 +463,7 @@ namespace Tango.PPC.UI.ViewModels { MidTankLubLevel.Max = LubLevel.MidTankType.LiterCapacity; MidTankLubLevel.IDSPack = LubLevel; + MidTankLubLevel.JerricanPresent = true; }; MidTankLubLevel.PressedEvent += MidTankLevel_PressedEvent; @@ -522,10 +523,17 @@ namespace Tango.PPC.UI.ViewModels { if (item.JerricanPresent && !model.JerricanPresent) { + LogManager.Log($"Jerrican insersion detected. Jerrican {model.IDSPack.LiquidType.Name} has been flagged as 'Present'. Openning Jerrican Dialog."); + #pragma warning disable CS4014 // Because this call is not awaited, execution of the current method continues before the call is completed ShowAutoJerricanDialog(model); #pragma warning restore CS4014 // Because this call is not awaited, execution of the current method continues before the call is completed } + else if (!item.JerricanPresent && model.JerricanPresent) + { + LogManager.Log($"Jerrican {model.IDSPack.LiquidType.Name} has been flagged as 'Missing'."); + } + } model.JerricanPresent = item.JerricanPresent; model.FillingTimeoutError = item.FillingTimeoutError; @@ -618,6 +626,9 @@ namespace Tango.PPC.UI.ViewModels if (!_jerricanDialogShowing) { _jerricanDialogShowing = true; + + LogManager.Log($"Jerrican {e.IDSPack.LiquidType.Name} button pressed by user. Openning Jerrican Dialog."); + await ShowAutoJerricanDialog(e, true); _jerricanDialogShowing = false; } -- cgit v1.3.1