diff options
| author | Victoria Plitt <Victoria.Plitt@twine-s.com> | 2023-05-14 16:45:03 +0300 |
|---|---|---|
| committer | Victoria Plitt <Victoria.Plitt@twine-s.com> | 2023-05-14 16:45:03 +0300 |
| commit | 7d54607a2a61b9a99376b385c40e94257365eb18 (patch) | |
| tree | 282168fa8e1f602d9e61877aae3968682b2a490e /Software/Visual_Studio/PPC/Tango.PPC.UI/Models | |
| parent | 963f8c4fa2b4da7d875dc223cd70c55e0d5390c1 (diff) | |
| download | Tango-7d54607a2a61b9a99376b385c40e94257365eb18.tar.gz Tango-7d54607a2a61b9a99376b385c40e94257365eb18.zip | |
Working on Jerrican Levels Twine X4.
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.UI/Models')
| -rw-r--r-- | Software/Visual_Studio/PPC/Tango.PPC.UI/Models/JerricanLevelModel.cs | 85 |
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; + } + } +} |
