aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Models/MidTankLevelModel.cs
blob: c656db8c0ddf9be090e45fea687860017e6ea8e2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Tango.BL.Entities;
using Tango.Core;
using Tango.Integration.Operation;

namespace Tango.PPC.Maintenance.Models
{
    public class MidTankLevelModel : ExtendedObject
    {
        public double Max { get; set; }

        private double _level;
        public double Level
        {
            get { return _level; }
            set { _level = value; RaisePropertyChangedAuto(); RaisePropertyChanged(nameof(IsLow)); RaisePropertyChanged(nameof(IsEmpty)); }
        }

        public bool IsLow
        {
            get { return Level <= MachineOperator.LOW_MIDTANK_LITERS; }
        }

        public bool IsEmpty
        {
            get { return Level <= MachineOperator.EMPTY_MIDTANK_LITERS; }
        }
        
        private bool _bJerricanPresent;

        public bool JerricanPresent
        {
            get { return _bJerricanPresent; }
            set {
                _bJerricanPresent = value;
                RaisePropertyChangedAuto();
            }
        }

        private bool _fillingTimeoutError;

        public bool FillingTimeoutError
        {
            get { return _fillingTimeoutError; }
            set { _fillingTimeoutError = value; RaisePropertyChangedAuto(); }
        }

        private bool _midTankEmpty;

        public bool MidTankEmpty
        {
            get { return _midTankEmpty; }
            set { _midTankEmpty = value; RaisePropertyChangedAuto();}
        }

        private bool _midTankRefillPumpActive;

        public bool MidTankRefillPumpActive
        {
            get { return _midTankRefillPumpActive; }
            set { _midTankRefillPumpActive = value; RaisePropertyChangedAuto(); }
        }
        

        public IdsPack IDSPack { get; set; }
    }
}