using Aitex.Core.RT.Log; using Aitex.Core.RT.Routine; using Aitex.Core.UI.MVVM; using CyberX8_Core; using CyberX8_MainPages.Model; using CyberX8_Themes.CustomControls; using MECF.Framework.Common.CommonData.Metal; using MECF.Framework.Common.CommonData.Reservoir; using MECF.Framework.Common.DataCenter; using MECF.Framework.Common.OperationCenter; using MECF.Framework.Common.Persistent.Reservoirs; using MECF.Framework.Common.RecipeCenter; using MECF.Framework.Common.Utilities; using Prism.Mvvm; using System; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Input; using System.Windows.Threading; namespace CyberX8_MainPages.ViewModels { public class ReservoirsAnolyteViewModel : BindableBase { #region 常量 private const string RESERVOIRS_DATA = "ReservoirsData"; private const string RESERVOIRS = "reservoirs"; private const string PERSISTENT_VALUE = "PersistentValue"; #endregion #region 变量 private bool m_IsAutoMode; private bool m_IsManualMode; private string _module; private string _recipeContent; private string _operatingMode; private string _state; private string _recipeMode; private List _rtDataKeys = new List(); DispatcherTimer _timer; private Dictionary _rtDataValueDic = new Dictionary(); private ObservableCollection _recipeNodes; private string _currentRecipeFileName; private string _recipeType; private bool _aNpumpEnable = false; private bool _aNADrainpumpEnable = false; private bool _aNBDrainpumpEnable = false; private double _maxFlowDelta; private bool _isHighLevel; private bool _isLowLevel; private double _avgANLevel; private double _inputANBaselineLevel; private double _flowAdjustDelta; private bool _isFolwDeltaUnBlance = false; private double _inputCrossDoseRequest; private bool _isLeakDetected; private bool _isDIReplenFault; private bool _isError; //用于当作参数传给device判断是否进行leaktest(reservoir是否初始化,阳极是否有flow) private bool _isInitialized = false; private bool _isHasANFlow = false; /// /// 是否正在手动注水 /// private bool _isManualReplen; /// /// 手动注水时长(秒) /// private int _manualFillSeconds; /// /// DIValveMaxOnTime /// private double _diValveMaxOnTime; /// CellModuleName集合 /// private ObservableCollection _cellModuleNameCollection = new ObservableCollection(); /// /// Cell A面Flow集合 /// private ObservableCollection _cellModuleNameSideAFlowCollection = new ObservableCollection(); /// /// Cell A面Flow状态集合 /// private ObservableCollection _cellModuleNameSideAFlowStatusCollection = new ObservableCollection(); /// /// Cell B面Flow集合 /// private ObservableCollection _cellModuleNameSideBFlowCollection = new ObservableCollection(); /// /// Cell B面Flow状态集合 /// private ObservableCollection _cellModuleNameSideBFlowStatusCollection = new ObservableCollection(); /// /// Persistent /// private ReservoirsPersistentValue _reservoirsPersistent; /// /// Reservoir数据 /// private CompactMembranReservoirData _reservoirData; #region Valve Flag /// /// ANDiReplenValveIsOpen /// private bool _ANDiReplenValveIsOpen; /// /// AN Pump Speed /// private double _anPumpSpped; /// /// MetalData /// private ObservableCollection _metalDatas = new ObservableCollection(); /// /// MetalData的CellFlow集合 /// private ObservableCollection _metalCellFlowDatas = new ObservableCollection(); /// /// 页面功能启用 /// private bool _isEnabled; /// /// AutoMode页面功能启用 /// private bool _isAutoEnabled; /// /// Meatl UI数据 /// private ObservableCollection _reservoirsUIDatas = new ObservableCollection(); #endregion /// /// CrossDose是否Enabled /// private bool _isCrossDoseEnabled; #region CrossDose /// /// AN Transfer Flow /// private double _anTransferFlow; /// /// Calibrate是否启用 /// private bool _isCalibrateEnable; /// /// 是否有CrossDoseType /// private bool _isCroseDoseTypeConfig; #endregion #endregion #region 属性 /// /// 是否有CrossDoseType /// public bool IsCrossDoseTypeConfig { get { return _isCroseDoseTypeConfig; } set { SetProperty(ref _isCroseDoseTypeConfig, value); } } public double AvgANLevel { get { return _avgANLevel; } set { SetProperty(ref _avgANLevel, value); } } public bool IsAutoMode { get { return m_IsAutoMode; } set { SetProperty(ref m_IsAutoMode, value); } } public bool IsManualMode { get { return m_IsManualMode; } set { SetProperty(ref m_IsManualMode, value); } } public bool IsError { get { return _isError; } set { SetProperty(ref _isError, value); } } public bool ANPumpEnable { get { return _aNpumpEnable; } set { SetProperty(ref _aNpumpEnable, value); } } public bool ANADrainPumpEnable { get { return _aNADrainpumpEnable; } set { SetProperty(ref _aNADrainpumpEnable, value); } } public bool ANBDrainPumpEnable { get { return _aNBDrainpumpEnable; } set { SetProperty(ref _aNBDrainpumpEnable, value); } } public string CurrentRecipeFileName { get { return _currentRecipeFileName; } set { SetProperty(ref _currentRecipeFileName, value); } } public ObservableCollection RecipeNodes { get { return _recipeNodes; } set { SetProperty(ref _recipeNodes, value); } } public string Module { get { return _module; } set { SetProperty(ref _module, value); } } public string ReservoirRecipeContent { get { return _recipeContent; } set { SetProperty(ref _recipeContent, value); } } public string OperatingMode { get { return _operatingMode; } set { SetProperty(ref _operatingMode, value); } } public string State { get { return _state; } set { SetProperty(ref _state, value); } } public string RecipeMode { get { return _recipeMode; } set { SetProperty(ref _recipeMode, value); } } public string RecipeType { get { return _recipeType; } set { SetProperty(ref _recipeType, value); } } /// /// CellModuleName集合 /// public ObservableCollection CellModuleNameCollection { get { return _cellModuleNameCollection; } set { SetProperty(ref _cellModuleNameCollection, value); } } /// /// 模块A面Flow集合 /// public ObservableCollection CellModuleNameSideAFlowCollection { get { return _cellModuleNameSideAFlowCollection; } set { SetProperty(ref _cellModuleNameSideAFlowCollection, value); } } /// /// 模块A面Flow状态集合 /// public ObservableCollection CellModuleNameSideAFlowStatusCollection { get { return _cellModuleNameSideAFlowStatusCollection; } set { SetProperty(ref _cellModuleNameSideAFlowStatusCollection, value); } } /// /// 模块B面Flow集合 /// public ObservableCollection CellModuleNameSideBFlowCollection { get { return _cellModuleNameSideBFlowCollection; } set { SetProperty(ref _cellModuleNameSideBFlowCollection, value); } } /// /// 模块B面Flow状态集合 /// public ObservableCollection CellModuleNameSideBFlowStatusCollection { get { return _cellModuleNameSideBFlowStatusCollection; } set { SetProperty(ref _cellModuleNameSideBFlowStatusCollection, value); } } /// /// Threshold /// public ReservoirsPersistentValue ReservoirsPersistent { get { return _reservoirsPersistent; } set { SetProperty(ref _reservoirsPersistent, value); } } /// /// Reservoir 数据 /// public CompactMembranReservoirData ReservoirData { get { return _reservoirData; } set { SetProperty(ref _reservoirData, value); } } public double ANPumpSpeed { get { return _anPumpSpped; } set { SetProperty(ref _anPumpSpped, value); } } public bool IsHighLevel { get { return _isHighLevel; } set { SetProperty(ref _isHighLevel, value); } } public bool IsLowLevel { get { return _isLowLevel; } set { SetProperty(ref _isLowLevel, value); } } #region Valve Flag public bool ANDiReplenValveIsOpen { get { return _ANDiReplenValveIsOpen; } set { SetProperty(ref _ANDiReplenValveIsOpen, value); } } #endregion /// /// MetalData /// public ObservableCollection MetalDatas { get { return _metalDatas; } set { SetProperty(ref _metalDatas, value); } } /// /// MetalDataCellFlow /// public ObservableCollection MetalCellFlowDatas { get { return _metalCellFlowDatas; } set { SetProperty(ref _metalCellFlowDatas, value); } } /// /// 正在手动注水 /// public bool IsManualReplen { get { return _isManualReplen; } set { SetProperty(ref _isManualReplen, value); } } /// /// 手动注水时长 /// public int ManualFillSeconds { get { return _manualFillSeconds; } set { SetProperty(ref _manualFillSeconds, value); } } /// /// 单次注水最大时长 /// public double DIValveMaxOnTime { get { return _diValveMaxOnTime; } set { SetProperty(ref _diValveMaxOnTime, value); } } /// /// Input Fast Leak test Baseline /// public double InputANBaselineLevel { get { return _inputANBaselineLevel; } set { SetProperty(ref _inputANBaselineLevel, value); } } /// /// 不同cell流量差值 /// public double FlowAdjustDelta { get { return _flowAdjustDelta; } set { SetProperty(ref _flowAdjustDelta, value); } } /// /// 流量误差是否超过0.5 /// public bool IsFolwDeltaUnBlance { get { return _isFolwDeltaUnBlance; } set { SetProperty(ref _isFolwDeltaUnBlance, value); } } /// /// Input Cross Dose Request /// public double InputCrossDoseRequest { get { return _inputCrossDoseRequest; } set { SetProperty(ref _inputCrossDoseRequest, value); } } /// /// 是否检测到泄露 /// public bool IsLeakDetected { get { return _isLeakDetected; } set { SetProperty(ref _isLeakDetected, value); } } /// /// 是否补水异常 /// public bool IsDIReplenFault { get { return _isDIReplenFault; } set { SetProperty(ref _isDIReplenFault, value); } } /// /// 页面功能启用 /// public bool IsEnabled { get { return _isEnabled; } set { SetProperty(ref _isEnabled, value); } } /// /// AutoMode页面功能启用 /// public bool IsAutoEnabled { get { return _isAutoEnabled; } set { SetProperty(ref _isAutoEnabled, value); } } /// /// metal ui数据 /// public ObservableCollection ReservoirsUIDatas { get { return _reservoirsUIDatas; } set { SetProperty(ref _reservoirsUIDatas, value); } } /// /// CrossDose是否Enabled /// public bool IsCrossDoseEnabled { get { return _isCrossDoseEnabled; } set { SetProperty(ref _isCrossDoseEnabled, value); } } #region CrossDose /// /// AN Transfer Flow /// public double ANTransferFlow { get { return _anTransferFlow; } set { SetProperty(ref _anTransferFlow, value); } } /// /// Calibrate是否启用 /// public bool IsCalibrateEnable { get { return _isCalibrateEnable; } set { SetProperty(ref _isCalibrateEnable, value); } } #endregion #endregion #region 命令 public ICommand ControlValveCommand { get; private set; } public ICommand AnPumpSpeedCommand { get; private set; } public ICommand ManualDireplenCommand { get; set; } public ICommand ResetTotalCommand { get; set; } public ICommand ClearSlowLeakCommand { get; set; } public ICommand NavigatetoPumpCartCommand { get; set; } public ICommand CrossDoseStartCommand { get; set; } public ICommand CrossDoseHaltCommand { get; set; } public ICommand CalibrateCommand { get; set; } public ICommand BaseLineKeyDownCommand { get; set; } public ICommand StartLeakTestCommand { get; set; } public ICommand BackCommand { get; set; } #endregion #region 构造函数 /// /// 构造函数 /// public ReservoirsAnolyteViewModel() { IsAutoMode = false; ControlValveCommand = new DelegateCommand(OnControlValve); AnPumpSpeedCommand = new DelegateCommand(AnPumpSpeedAction); ManualDireplenCommand = new DelegateCommand(ManualDireplenAction); ResetTotalCommand = new DelegateCommand(ResetTotalAction); ClearSlowLeakCommand = new DelegateCommand(ClearSlowLeakAction); NavigatetoPumpCartCommand = new DelegateCommand(NavigatetoPumpCartAction); BaseLineKeyDownCommand = new DelegateCommand(BaseLineKeyDownAction); StartLeakTestCommand = new DelegateCommand(StartLeakTestAction); BackCommand = new DelegateCommand(BackAction); } #endregion #region 命令方法 /// /// 回到Reservoir主页面 /// /// private void BackAction(object param) { GlobalEvents.OnSwitchFixedChildSubItem(Module, Module); } /// /// Control Valve /// /// private void OnControlValve(object obj) { CommonValveControl commonValveControl = (CommonValveControl)obj; if (commonValveControl.IsCanEdit == true) { string cmd = commonValveControl.OperationName; if (!commonValveControl.Status) { commonValveControl.Status = !commonValveControl.Status; InvokeClient.Instance.Service.DoOperation($"{cmd}On"); } else { commonValveControl.Status = !commonValveControl.Status; InvokeClient.Instance.Service.DoOperation($"{cmd}Off"); } } } /// /// AN Pump调速 /// /// private void AnPumpSpeedAction(object obj) { object[] objects = (object[])obj; if (objects.Length >= 2) { InvokeClient.Instance.Service.DoOperation($"{Module}.ANPumpSpeed", objects[1]); } } /// /// 手动注水 /// /// private void ManualDireplenAction(object param) { InvokeClient.Instance.Service.DoOperation($"{Module}.ManualANDiReplen", ManualFillSeconds); } /// /// 重置TotalTime /// private void ResetTotalAction(object param) { InvokeClient.Instance.Service.DoOperation($"{Module}.ResetTotalTime"); } /// /// clear slow leak /// private void ClearSlowLeakAction(object param) { InvokeClient.Instance.Service.DoOperation($"{Module}.ClearSlowLeak"); } private void NavigatetoPumpCartAction(object param) { } private void BaseLineKeyDownAction(object[] param) { if (param.Length >= 2) { if (double.TryParse(param[1].ToString(), out double result)) { InvokeClient.Instance.Service.DoOperation($"{Module}.BaseLineKeyDown", param[0].ToString(), result); } } } private void StartLeakTestAction(object[] param) { InvokeClient.Instance.Service.DoOperation($"{Module}.StartLeakTest",_isInitialized, _isHasANFlow); } #endregion /// /// 进入UI加载数据 /// /// public void LoadData(string systemName) { RecipeType = "res"; Module = systemName; _isHasANFlow = false; _rtDataKeys.Clear(); CellModuleNameSideAFlowCollection.Clear(); CellModuleNameSideBFlowCollection.Clear(); CellModuleNameSideAFlowStatusCollection.Clear(); CellModuleNameSideBFlowStatusCollection.Clear(); MetalDatas.Clear(); MetalCellFlowDatas.Clear(); ReservoirsUIDatas.Clear(); _rtDataKeys.Add($"{Module}.Metals"); Dictionary tmpMetals = QueryDataClient.Instance.Service.PollData(_rtDataKeys); if (tmpMetals != null) { List strMetals = CommonFunction.GetValue>(tmpMetals, $"{Module}.Metals"); int cellsCount = strMetals.Count; if (strMetals != null) { CellModuleNameCollection.Clear(); for (int i = 0; i < cellsCount; i++) { CellModuleNameCollection.Add(strMetals[i]); CellModuleNameSideAFlowCollection.Add(0); CellModuleNameSideBFlowCollection.Add(0); CellModuleNameSideAFlowStatusCollection.Add(""); CellModuleNameSideBFlowStatusCollection.Add(""); MetalDatas.Add(null); MetalCellFlowDatas.Add(0); ReservoirsUIData reservoirsUIData = new ReservoirsUIData(); reservoirsUIData.Name = strMetals[i]; ReservoirsUIDatas.Add(reservoirsUIData); } } } _rtDataKeys.Clear(); for (int i = 0; i < CellModuleNameCollection.Count; i++) { _rtDataKeys.Add($"{CellModuleNameCollection[i]}.SideAFlow"); _rtDataKeys.Add($"{CellModuleNameCollection[i]}.SideAFlowStatus"); _rtDataKeys.Add($"{CellModuleNameCollection[i]}.SideBFlow"); _rtDataKeys.Add($"{CellModuleNameCollection[i]}.SideBFlowStatus"); _rtDataKeys.Add($"{CellModuleNameCollection[i]}.MetalData"); } _rtDataKeys.Add($"{Module}.{PERSISTENT_VALUE}"); _rtDataKeys.Add($"{Module}.ReservoirData"); _rtDataKeys.Add($"{Module}.ANPumpSpeed"); _rtDataKeys.Add($"{Module}.IsManualANReplen"); _rtDataKeys.Add($"{Module}.DIValveMaxOnTime"); _rtDataKeys.Add($"{Module}.IsANHighLevel"); _rtDataKeys.Add($"{Module}.IsANLowLevel"); _rtDataKeys.Add($"{Module}.IsLeakDetected"); _rtDataKeys.Add($"{Module}.FsmState"); _rtDataKeys.Add($"{Module}.IsCrossDoseInstalled"); _rtDataKeys.Add($"{Module}.ANTransferFlow"); _rtDataKeys.Add($"{Module}.ANBypassCounterFlow"); _rtDataKeys.Add($"{Module}.IsCalibrateEnable"); _rtDataKeys.Add($"{Module}.ReservoirAverageANLevel"); _rtDataKeys.Add($"{Module}.CroseDoseType"); if (_timer == null) { _timer = new DispatcherTimer(); _timer.Interval = TimeSpan.FromMilliseconds(200); _timer.Tick += Timer_Tick; } _timer.Start(); } /// /// 定时器执行 /// /// /// private void Timer_Tick(object sender, EventArgs e) { if (_rtDataKeys.Count != 0) { _rtDataValueDic = QueryDataClient.Instance.Service.PollData(_rtDataKeys); if (_rtDataValueDic != null) { ReservoirData = CommonFunction.GetValue(_rtDataValueDic, $"{Module}.ReservoirData"); if(ReservoirData.ANBypassFlow == 0) { ReservoirData.ANBypassFlow = CommonFunction.GetValue(_rtDataValueDic, $"{Module}.ANBypassCounterFlow"); } AvgANLevel = CommonFunction.GetValue(_rtDataValueDic, $"{Module}.ReservoirAverageANLevel"); IsCrossDoseEnabled = CommonFunction.GetValue(_rtDataValueDic, $"{Module}.IsCrossDoseInstalled"); IsCrossDoseTypeConfig = CommonFunction.GetValue(_rtDataValueDic, $"{Module}.CroseDoseType"); IsCalibrateEnable = CommonFunction.GetValue(_rtDataValueDic, $"{Module}.IsCalibrateEnable"); State = CommonFunction.GetValue(_rtDataValueDic, $"{Module}.FsmState"); if ("Idle".Equals(State)) { _isInitialized = true; } IsError = "Error".Equals(State) ? true : false; if (ReservoirData != null) { //ANPump状态 ANPumpEnable = ReservoirData.ANPump > 0 ? true : false; //ANADrainPump状态 ANADrainPumpEnable = ReservoirData.ANADrainPump > 0 ? true : false; //ANBDrainPump状态 ANBDrainPumpEnable = ReservoirData.ANBDrainPump > 0 ? true : false; } IsManualReplen = CommonFunction.GetValue(_rtDataValueDic, $"{Module}.IsManualANReplen"); DIValveMaxOnTime = CommonFunction.GetValue(_rtDataValueDic, $"{Module}.DIValveMaxOnTime"); ANPumpSpeed = CommonFunction.GetValue(_rtDataValueDic, $"{Module}.ANPumpSpeed"); ReservoirsPersistent = CommonFunction.GetValue(_rtDataValueDic, $"{Module}.{PERSISTENT_VALUE}"); InputANBaselineLevel = ReservoirsPersistent.ANBaseLineLevel; IsManualMode = "Manual".Equals(ReservoirsPersistent.OperatingMode) ? true : false; for (int i = 0; i < CellModuleNameCollection.Count; i++) { CellModuleNameSideAFlowCollection[i] = CommonFunction.GetValue(_rtDataValueDic, $"{CellModuleNameCollection[i]}.SideAFlow"); CellModuleNameSideAFlowStatusCollection[i] = CommonFunction.GetValue(_rtDataValueDic, $"{CellModuleNameCollection[i]}.SideAFlowStatus"); CellModuleNameSideBFlowCollection[i] = CommonFunction.GetValue(_rtDataValueDic, $"{CellModuleNameCollection[i]}.SideBFlow"); CellModuleNameSideBFlowStatusCollection[i] = CommonFunction.GetValue(_rtDataValueDic, $"{CellModuleNameCollection[i]}.SideBFlowStatus"); MetalDatas[i] = CommonFunction.GetValue(_rtDataValueDic, $"{CellModuleNameCollection[i]}.MetalData"); MetalCellFlowDatas[i] = MetalDatas[i].CellFlow; if (CellModuleNameSideAFlowCollection[i] > 0 || CellModuleNameSideBFlowCollection[i] > 0) { _isHasANFlow = true; } ReservoirsUIDatas[i].IsEnable = IsEnabled; ReservoirsUIDatas[i].ANPumpEnable = ANPumpEnable; ReservoirsUIDatas[i].MetalSideAFlow = CellModuleNameSideAFlowCollection[i]; ReservoirsUIDatas[i].MetalSideBFlow = CellModuleNameSideBFlowCollection[i]; ReservoirsUIDatas[i].MetalSideAStatus = CellModuleNameSideAFlowStatusCollection[i]; ReservoirsUIDatas[i].MetalSideBStatus = CellModuleNameSideBFlowStatusCollection[i]; ReservoirsUIDatas[i].MetalDatas = MetalDatas[i]; if ("Full".Equals(CellModuleNameSideAFlowStatusCollection[i]) && MetalDatas[i].ANAPinEnable) { ReservoirsUIDatas[i].IsSideAFull = true; } else { ReservoirsUIDatas[i].IsSideAFull = false; } if ("Full".Equals(CellModuleNameSideBFlowStatusCollection[i]) && MetalDatas[i].ANBPinEnable) { ReservoirsUIDatas[i].IsSideBFull = true; } else { ReservoirsUIDatas[i].IsSideBFull = false; } ReservoirsUIDatas[i].IsManualOperationMode = IsManualMode; } //list记录参与循环的metal的A/B面的流量情况 List list = new List(); for (int i = 0; i < CellModuleNameSideAFlowCollection.Count; i++) { if (MetalDatas[i].ANAPinEnable) { list.Add(CellModuleNameSideAFlowCollection[i]); } } for (int i = 0; i < CellModuleNameSideBFlowCollection.Count; i++) { if (MetalDatas[i].ANBPinEnable) { list.Add(CellModuleNameSideBFlowCollection[i]); } } //如果参与循环的流量全是0或者没有参与循环的metal,直接跳过流量差相关判断逻辑 if (list.All(num => num == 0) || list.Count == 0) { for (int i = 0; i < CellModuleNameCollection.Count; i++) { ReservoirsUIDatas[i].IsMetalCellSideAHigh = false; ReservoirsUIDatas[i].IsMetalCellSideALow = false; ReservoirsUIDatas[i].IsMetalCellSideBHigh = false; ReservoirsUIDatas[i].IsMetalCellSideBLow = false; } } else { FlowAdjustDelta = list.Max() - list.Min(); IsFolwDeltaUnBlance = FlowAdjustDelta > 0.3 ? true : false; if (IsFolwDeltaUnBlance) { for (int i = 0; i < CellModuleNameSideAFlowCollection.Count; i++) { if (ReservoirsUIDatas[i].MetalSideAFlow == list.Max() && MetalDatas[i].ANAPinEnable) { ReservoirsUIDatas[i].IsMetalCellSideAHigh = true; } else { ReservoirsUIDatas[i].IsMetalCellSideAHigh = false; } if (ReservoirsUIDatas[i].MetalSideAFlow == list.Min() && MetalDatas[i].ANAPinEnable) { ReservoirsUIDatas[i].IsMetalCellSideALow = true; } else { ReservoirsUIDatas[i].IsMetalCellSideALow = false; } } for (int i = 0; i < CellModuleNameSideBFlowCollection.Count; i++) { if (ReservoirsUIDatas[i].MetalSideBFlow == list.Max() && MetalDatas[i].ANBPinEnable) { ReservoirsUIDatas[i].IsMetalCellSideBHigh = true; } else { ReservoirsUIDatas[i].IsMetalCellSideBHigh = false; } if (ReservoirsUIDatas[i].MetalSideBFlow == list.Min() && MetalDatas[i].ANBPinEnable) { ReservoirsUIDatas[i].IsMetalCellSideBLow = true; } else { ReservoirsUIDatas[i].IsMetalCellSideBLow = false; } } } else { for (int i = 0; i < CellModuleNameCollection.Count; i++) { ReservoirsUIDatas[i].IsMetalCellSideAHigh = false; ReservoirsUIDatas[i].IsMetalCellSideALow = false; ReservoirsUIDatas[i].IsMetalCellSideBHigh = false; ReservoirsUIDatas[i].IsMetalCellSideBLow = false; } } } list.Clear(); IsHighLevel = CommonFunction.GetValue(_rtDataValueDic, $"{Module}.IsANHighLevel"); IsLowLevel = CommonFunction.GetValue(_rtDataValueDic, $"{Module}.IsANLowLevel"); IsLeakDetected = CommonFunction.GetValue(_rtDataValueDic, $"{Module}.IsLeakDetected"); if ("Manual".Equals(ReservoirsPersistent.OperatingMode)) { IsEnabled = true; IsAutoEnabled = true; IsAutoMode = false; } else if ("Auto".Equals(ReservoirsPersistent.OperatingMode)) { IsAutoEnabled = true; IsEnabled = false; IsAutoMode = true; } else { State = "Stopped"; IsEnabled = false; IsAutoEnabled = false; IsAutoMode = false; } //CrossDose ANTransferFlow = CommonFunction.GetValue(_rtDataValueDic, $"{Module}.ANTransferFlow"); } } } } }