aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Tango.PPC.UI/Models/JerricanLevelModel.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.UI/Models/JerricanLevelModel.cs')
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/Models/JerricanLevelModel.cs85
1 files changed, 85 insertions, 0 deletions
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Models/JerricanLevelModel.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/Models/JerricanLevelModel.cs
new file mode 100644
index 000000000..13fa455e5
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Models/JerricanLevelModel.cs
@@ -0,0 +1,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;
+ }
+ }
+}