From d7a0d5e8d6804f5f739c223c123b4b2780af4e11 Mon Sep 17 00:00:00 2001 From: Victoria Plitt Date: Wed, 24 May 2023 11:16:50 +0300 Subject: Added Lo error in case when WindersInErrors and... array is less then 4. --- .../Models/MachineOverviewErrorStates.cs | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) (limited to 'Software/Visual_Studio/PPC/Tango.PPC.UI/Models/MachineOverviewErrorStates.cs') diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Models/MachineOverviewErrorStates.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/Models/MachineOverviewErrorStates.cs index d293c4418..1863b01e1 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Models/MachineOverviewErrorStates.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Models/MachineOverviewErrorStates.cs @@ -31,18 +31,27 @@ namespace Tango.PPC.UI.Models public void UpdateWinders(List updates) { - UpdateCollection(Winders, updates); + if(!UpdateCollection(Winders, updates)) + { + LogManager.Log("Error in display Winders Errors. Number of Winders In Error is less then 4!"); + } } public void UpdateDancers(List updates) { - UpdateCollection(Dancers, updates); + if(!UpdateCollection(Dancers, updates)) + { + LogManager.Log("Error in display Dancers Errors. Number of Dancers In Error is less then 4!"); + } } public void UpdateBTSRs(List updates) { - UpdateCollection(BTSRs, updates); + if(!UpdateCollection(BTSRs, updates)) + { + LogManager.Log("Error in display BTSRs Errors. Number of BTSRs In Error is less then 4!"); + } } - private void UpdateCollection(ObservableCollection collection, List updates ) + private bool UpdateCollection(ObservableCollection collection, List updates ) { if (collection.Count == updates.Count) { @@ -50,7 +59,10 @@ namespace Tango.PPC.UI.Models { collection[i].IsErrorState = updates[i]; } + return true; } + return false; + } } } -- cgit v1.3.1