diff options
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels')
| -rw-r--r-- | Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineStatusViewVM.cs | 15 |
1 files changed, 10 insertions, 5 deletions
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 f153b3636..1491b79c9 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineStatusViewVM.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineStatusViewVM.cs @@ -33,6 +33,7 @@ using Tango.PPC.Common.Printing; using Tango.PPC.Common.RemoteJob; using Tango.PPC.UI.Dialogs; using Tango.ColorConversion; +using Tango.Logging; namespace Tango.PPC.UI.ViewModels { @@ -173,7 +174,7 @@ namespace Tango.PPC.UI.ViewModels if (_isDyeingProcess != value) { _isDyeingProcess = value; - RaisePropertyChangedAuto(); + RaisePropertyChangedAuto(); } } } @@ -456,7 +457,7 @@ namespace Tango.PPC.UI.ViewModels JerricanPresent = true, }).ToList(); - var LubLevel = MachineProvider.Machine.Configuration.NoneEmptyIdsPacks.Where(x => x.MidTankType.Type == MidTankTypes.LubricantMidTank).FirstOrDefault(); + var LubLevel = MachineProvider.Machine.Configuration.NoneEmptyIdsPacks.Where(x => x.MidTankType.Type == MidTankTypes.LubricantMidTank || x.LiquidType.Type == LiquidTypes.Lubricant).FirstOrDefault(); MidTankLubLevel = new JerricanLevelModel() { JerricanPresent = true }; if (LubLevel != null) @@ -464,7 +465,11 @@ namespace Tango.PPC.UI.ViewModels MidTankLubLevel.Max = LubLevel.MidTankType.LiterCapacity; MidTankLubLevel.IDSPack = LubLevel; MidTankLubLevel.JerricanPresent = true; - }; + } + else + { + LogManager.Log("Error finding lubricant IDS Pack. Please check your machine configuration.", LogCategory.Error); + } MidTankLubLevel.PressedEvent += MidTankLevel_PressedEvent; @@ -505,7 +510,7 @@ namespace Tango.PPC.UI.ViewModels foreach (var item in status.IDSPacksLevels) { JerricanLevelModel model = null; - if (item.Index == MidTankLubLevel.IDSPack.PackIndex)//lub + if (MidTankLubLevel.IDSPack != null && item.Index == MidTankLubLevel.IDSPack.PackIndex)//lub { model = MidTankLubLevel; } @@ -608,7 +613,7 @@ namespace Tango.PPC.UI.ViewModels _totalProductionDataMeters += (delta * 4); } else - { + { _totalProductionDataMeters += delta; } |
