diff options
| author | Victoria Plitt <Victoria.Plitt@twine-s.com> | 2023-06-05 15:11:17 +0300 |
|---|---|---|
| committer | Victoria Plitt <Victoria.Plitt@twine-s.com> | 2023-06-05 15:11:17 +0300 |
| commit | 3e46bf434c6f8ba56fe812205fd1ea20a1f9d347 (patch) | |
| tree | ac0be4e701ca49450740b32864b4857304ea829c /Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels | |
| parent | 01c810c6a391cf96f7d486b1e41d2c76ecfb51f5 (diff) | |
| download | Tango-3e46bf434c6f8ba56fe812205fd1ea20a1f9d347.tar.gz Tango-3e46bf434c6f8ba56fe812205fd1ea20a1f9d347.zip | |
Present Lubricant Ink with divider, sort the Ink level indicators.
Related Work Items: #8528
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels')
| -rw-r--r-- | Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineStatusViewVM.cs | 29 |
1 files changed, 26 insertions, 3 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 68c0f1867..52199fcca 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineStatusViewVM.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineStatusViewVM.cs @@ -186,6 +186,13 @@ namespace Tango.PPC.UI.ViewModels set { _midTankLevels = value; RaisePropertyChangedAuto(); } } + private JerricanLevelModel _midTankLubLevel; + public JerricanLevelModel MidTankLubLevel + { + get { return _midTankLubLevel; } + set { _midTankLubLevel = value; RaisePropertyChangedAuto(); } + } + public MachineOverviewModel OverviewModel { get; set; } private bool _isDisplayJobOutline; @@ -264,11 +271,19 @@ namespace Tango.PPC.UI.ViewModels { base.OnApplicationReady(); - MidTankLevels = MachineProvider.Machine.Configuration.NoneEmptyIdsPacks.Where(x => x.MidTankType.HasLevelMeasure || x.MidTankType.Type == MidTankTypes.LubricantMidTank).OrderBy(x => x.PackIndex).Select(x => new JerricanLevelModel() + MidTankLevels = MachineProvider.Machine.Configuration.NoneEmptyIdsPacks.Where(x => x.MidTankType.HasLevelMeasure ).OrderBy(x => x.PackIndex).Select(x => new JerricanLevelModel() { Max = x.MidTankType.LiterCapacity, IDSPack = x, - }).OrderBy(y => y.IDSPack.LiquidType.PreferredIndex).ToList(); + }).OrderBy(y => y.IDSPack.LiquidType.Type).ToList(); + var LubLevel = MachineProvider.Machine.Configuration.NoneEmptyIdsPacks.Where(x => x.MidTankType.Type == MidTankTypes.LubricantMidTank).FirstOrDefault(); + + MidTankLubLevel = new JerricanLevelModel(); + if(LubLevel != null) + { + MidTankLubLevel.Max = LubLevel.MidTankType.LiterCapacity; + MidTankLubLevel.IDSPack = LubLevel; + }; MachineProvider.MachineOperator.MachineStatusChanged += MachineOperator_MachineStatusChanged; @@ -287,7 +302,15 @@ namespace Tango.PPC.UI.ViewModels { foreach (var item in status.IDSPacksLevels) { - var model = MidTankLevels.SingleOrDefault(x => x.IDSPack.PackIndex == item.Index); + JerricanLevelModel model = null; + if (item.Index == 8)//lub + { + model = MidTankLubLevel; + + } + else { + model = MidTankLevels.SingleOrDefault(x => x.IDSPack.PackIndex == item.Index); + } if (model != null) { |
