blob: 13fa455e55aee8bc526f6a9511fda39602947202 (
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
|
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.UI.Models
{
public class JerricanLevelModel : ExtendedObject
{
public double Max { get; set; }
private double _level;
public double Level
{
get { return _level; }
set { _level = value; RaisePropertyChangedAuto(); RaisePropertyChanged(nameof(IsMidTankLow)); }
}
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 bool IsMidTankLow
{
get { return Level <= 0.5; }
}
private TimeSpan _remainingTimeoutError_;
public TimeSpan RemainingTimeoutError
{
get { return _remainingTimeoutError_; }
set { _remainingTimeoutError_ = value; RaisePropertyChangedAuto(); RaisePropertyChanged(nameof(HasRemainingTimeoutError)); }
}
public bool HasRemainingTimeoutError
{
get { return RemainingTimeoutError > TimeSpan.Zero; }
}
public IdsPack IDSPack { get; set; }
public JerricanLevelModel()
{
//RemainingTimeoutError = new TimeSpan(1,2,0);
JerricanPresent = true;
//FillingTimeoutError = MidTankEmpty = MidTankRefillPumpActive = false;
}
}
}
|