aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineStatusViewVM.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineStatusViewVM.cs')
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineStatusViewVM.cs29
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)
{