StandardHotReservoirsViewModel.cs 45 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183
  1. using MECF.Framework.Common.CommonData.Metal;
  2. using MECF.Framework.Common.CommonData.Reservoir;
  3. using MECF.Framework.Common.DataCenter;
  4. using MECF.Framework.Common.OperationCenter;
  5. using MECF.Framework.Common.Persistent.Reservoirs;
  6. using MECF.Framework.Common.RecipeCenter;
  7. using MECF.Framework.Common.Utilities;
  8. using CyberX8_Core;
  9. using CyberX8_MainPages.PMs;
  10. using Prism.Commands;
  11. using Prism.Mvvm;
  12. using System;
  13. using System.Collections.Generic;
  14. using System.Collections.ObjectModel;
  15. using System.Windows.Input;
  16. using System.Windows.Threading;
  17. using MECF.Framework.Common.CommonData.TemperatureControl;
  18. using MECF.Framework.Common.CommonData.PowerSupplier;
  19. using MECF.Framework.Common.Device.Safety;
  20. using MECF.Framework.Common.ProcessCell;
  21. using Aitex.Core.RT.Log;
  22. namespace CyberX8_MainPages.ViewModels
  23. {
  24. public class StandardHotReservoirsViewModel : BindableBase
  25. {
  26. #region 常量
  27. private const string RESERVOIRS_DATA = "ReservoirsData";
  28. private const string RESERVOIRS = "reservoirs";
  29. private const string PERSISTENT_VALUE = "PersistentValue";
  30. private const string METALDEVICEDATA = "MetalDeviceData";
  31. private const string RESERVOIRDEVICEDATA = "ReservoirDeviceData";
  32. private const string REPLEN_PERSISTENT_VALUE = "ReplenPersistentValue";
  33. #endregion
  34. #region 内部变量
  35. #region system
  36. /// <summary>
  37. /// rt查询key
  38. /// </summary>
  39. private List<string> _rtDataKeys = new List<string>();
  40. /// <summary>
  41. /// 时钟
  42. /// </summary>
  43. DispatcherTimer _timer;
  44. /// <summary>
  45. /// rt查询数据
  46. /// </summary>
  47. private Dictionary<string, object> _rtDataValueDic = new Dictionary<string, object>();
  48. #endregion
  49. #region Common
  50. /// <summary>
  51. /// 是否为调速泵
  52. /// </summary>
  53. private bool _isRegulatePump;
  54. /// <summary>
  55. /// 泵速
  56. /// </summary>
  57. private int _pumpSpeed;
  58. /// <summary>
  59. /// 是否配备CMM
  60. /// </summary>
  61. private bool _isCMMConfig;
  62. private double _avgLevel;
  63. /// <summary>
  64. /// Module
  65. /// </summary>
  66. private string _module;
  67. /// <summary>
  68. /// Operation Mode
  69. /// </summary>
  70. private string _operatingMode;
  71. /// <summary>
  72. /// 状态
  73. /// </summary>
  74. private string _state;
  75. /// <summary>
  76. /// Reservoirs Persistent数据
  77. /// </summary>
  78. private ReservoirsPersistentValue _reservoirsPersistent;
  79. /// <summary>
  80. /// Reservoir数据
  81. /// </summary>
  82. private StandardHotReservoirData _reservoirData;
  83. /// <summary>
  84. /// Metal数据集合
  85. /// </summary>
  86. private ObservableCollection<StandardHotMetalDeviceData> _metalDataCollection = new ObservableCollection<StandardHotMetalDeviceData>();
  87. /// <summary>
  88. /// CellModuleName集合
  89. /// </summary>
  90. private ObservableCollection<string> _cellModuleNameCollection = new ObservableCollection<string>();
  91. /// <summary>
  92. /// CellModuleSignal集合
  93. /// </summary>
  94. private ObservableCollection<bool> _cellModuleSignalPump = new ObservableCollection<bool>();
  95. /// <summary>
  96. /// Cells数量
  97. /// </summary>
  98. private int _cellsCount;
  99. /// <summary>
  100. /// 手动注水时长(秒)
  101. /// </summary>
  102. private int _manualFillSeconds;
  103. /// <summary>
  104. /// 是否正在手动注水
  105. /// </summary>
  106. private bool _isManualReplen;
  107. /// <summary>
  108. /// DIValveMaxOnTime
  109. /// </summary>
  110. private double _diValveMaxOnTime;
  111. /// <summary>
  112. /// 是否超过PH值下限
  113. /// </summary>
  114. private bool _isPHLowLimit;
  115. /// <summary>
  116. /// 是否超过PH值下限
  117. /// </summary>
  118. private bool _isPHHighLimit;
  119. /// <summary>
  120. /// TemperatureControl Module Name
  121. /// </summary>
  122. private TemperatureControllerData _temperatureControlData;
  123. /// <summary>
  124. /// PowerSupply Module Name
  125. /// </summary>
  126. private PowerSupplierData _cmmPowerSupplierData;
  127. /// <summary>
  128. /// 是否超过HighLevel
  129. /// </summary>
  130. private bool _isHighLevel;
  131. /// <summary>
  132. /// 是否超过LowLevel
  133. /// </summary>
  134. private bool _isLowLevel;
  135. /// <summary>
  136. /// 是否触发highsafety
  137. /// </summary>
  138. private bool _isHighSafety;
  139. /// <summary>
  140. /// HED Flow
  141. /// </summary>
  142. private bool _hedFlowIsOn;
  143. /// <summary>
  144. /// DiReplen是否报错
  145. /// </summary>
  146. private bool _isDiReplenFault;
  147. /// <summary>
  148. /// Safety Data
  149. /// </summary>
  150. private SafetyData _safetyData;
  151. /// <summary>
  152. /// 页面功能启用
  153. /// </summary>
  154. private bool _isEnabled;
  155. /// <summary>
  156. /// AutoMode页面功能启用
  157. /// </summary>
  158. private bool _isAutoEnabled;
  159. /// <summary>
  160. /// DosingSystem是否启用
  161. /// </summary>
  162. private bool _isDosingSystemEnabled;
  163. /// <summary>
  164. /// TC Enable状态
  165. /// </summary>
  166. private string _tcEnableStatus;
  167. /// <summary>
  168. /// 是否error状态
  169. /// </summary>
  170. private bool _isError;
  171. #endregion
  172. #region Recipe
  173. /// <summary>
  174. /// 当前的recipe
  175. /// </summary>
  176. private ResRecipe _currentRecipe;
  177. /// <summary>
  178. /// Recipe Mode
  179. /// </summary>
  180. private string _recipeMode;
  181. /// <summary>
  182. /// Selected Recipe Node
  183. /// </summary>
  184. private RecipeNode _selectedRecipeNode;
  185. /// <summary>
  186. /// Recipe Type
  187. /// </summary>
  188. private string _recipeType;
  189. /// <summary>
  190. /// Recipe Manager
  191. /// </summary>
  192. private UiRecipeManager _uiRecipeManager = new UiRecipeManager();
  193. #endregion
  194. #region CMM
  195. /// <summary>
  196. /// Flow High 状态(Warning:黄色,Error:红色)
  197. /// </summary>
  198. private string _flowHighStatus = "";
  199. /// <summary>
  200. /// Flow Low 状态(Warning:黄色,Error:红色)
  201. /// </summary>
  202. private string _flowLowStatus = "";
  203. /// <summary>
  204. /// PowerSupplier High电流状态
  205. /// </summary>
  206. private string _currentHighStatus = "";
  207. /// <summary>
  208. /// PowerSupplier Low电流状态
  209. /// </summary>
  210. private string _currentLowStatus = "";
  211. /// <summary>
  212. /// 是否低于最小电压
  213. /// </summary>
  214. private bool _isBelowMinVoltage = false;
  215. /// <summary>
  216. /// CMM Anode AHrs
  217. /// </summary>
  218. private double _reservoirCMMAnodeAHrs;
  219. /// <summary>
  220. /// CMM Cathode AHrs
  221. /// </summary>
  222. private double _reservoirCMMCathodeAHrs;
  223. /// <summary>
  224. /// CMM Anode用电量
  225. /// </summary>
  226. private double _cmmAnodeUsage;
  227. /// <summary>
  228. /// CMM Cathode用电量
  229. /// </summary>
  230. private double _cmmCathodeUsage;
  231. /// <summary>
  232. /// CMM Flow High Warning
  233. /// </summary>
  234. private double _reservoirCMMFlowHighWarning;
  235. /// <summary>
  236. /// CMM Flow High Error
  237. /// </summary>
  238. private double _reservoirCMMFlowHighError;
  239. /// <summary>
  240. /// CMM Flow Low Warning
  241. /// </summary>
  242. private double _reservoirCMMFlowLowWarning;
  243. /// <summary>
  244. /// CMM Flow Low Error
  245. /// </summary>
  246. private double _reservoirCMMFlowLowError;
  247. /// <summary>
  248. /// CMM Anode LifeTime AHrs
  249. /// </summary>
  250. private double _reservoirCMMAnodeLifeTimeAHrs;
  251. /// <summary>
  252. /// CMM Cathode LifeTime AHrs
  253. /// </summary>
  254. private double _reservoirCMMCathodeLifeTimeAHrs;
  255. /// <summary>
  256. /// HighLevel
  257. /// </summary>
  258. private double _reservoirHighLevel;
  259. /// <summary>
  260. /// LowLevel
  261. /// </summary>
  262. private double _reservoirLowLevel;
  263. /// <summary>
  264. /// CMM电量limit
  265. /// </summary>
  266. private double _cmmAnodeTotalAmpHoursWarningLimit;
  267. private double _cmmAnodeTotalAmpHoursFaultLimit;
  268. private double _cmmCathodeTotalAmpHoursWarningLimit;
  269. private double _cmmCathodeTotalAmpHoursFaultLimit;
  270. /// <summary>
  271. /// CMM电量报警灯
  272. /// </summary>
  273. private bool _isCMMAnodeTotalAmpHoursWarning;
  274. private bool _isCMMAnodeTotalAmpHoursFault;
  275. private bool _isCMMCathodeTotalAmpHoursWarning;
  276. private bool _isCMMCathodeTotalAmpHoursFault;
  277. #endregion
  278. #endregion
  279. #region 属性
  280. #region Common
  281. public double AvgLevel
  282. {
  283. get { return _avgLevel; }
  284. set { SetProperty(ref _avgLevel, value); }
  285. }
  286. /// <summary>
  287. /// Module
  288. /// </summary>
  289. public string Module
  290. {
  291. get { return _module; }
  292. set { SetProperty(ref _module, value); }
  293. }
  294. /// <summary>
  295. /// Operation Mode
  296. /// </summary>
  297. public string OperatingMode
  298. {
  299. get { return _operatingMode; }
  300. set { SetProperty(ref _operatingMode, value); }
  301. }
  302. /// <summary>
  303. /// 状态
  304. /// </summary>
  305. public string State
  306. {
  307. get { return _state; }
  308. set { SetProperty(ref _state, value); }
  309. }
  310. /// <summary>
  311. /// Reservoirs Persistent数据
  312. /// </summary>
  313. public ReservoirsPersistentValue ReservoirsPersistent
  314. {
  315. get { return _reservoirsPersistent; }
  316. set { SetProperty(ref _reservoirsPersistent, value); }
  317. }
  318. /// <summary>
  319. /// Reservoir数据
  320. /// </summary>
  321. public StandardHotReservoirData ReservoirData
  322. {
  323. get { return _reservoirData; }
  324. set { SetProperty(ref _reservoirData, value); }
  325. }
  326. /// <summary>
  327. /// Metal数据集合
  328. /// </summary>
  329. public ObservableCollection<StandardHotMetalDeviceData> MetalDataCollection
  330. {
  331. get { return _metalDataCollection; }
  332. set { SetProperty(ref _metalDataCollection, value); }
  333. }
  334. /// <summary>
  335. /// CellModuleName集合
  336. /// </summary>
  337. public ObservableCollection<string> CellModuleNameCollection
  338. {
  339. get { return _cellModuleNameCollection; }
  340. set { SetProperty(ref _cellModuleNameCollection, value); }
  341. }
  342. /// <summary>
  343. /// CellModuleSignalPump集合
  344. /// </summary>
  345. public ObservableCollection<bool> CellModuleSignalPump
  346. {
  347. get { return _cellModuleSignalPump; }
  348. set { SetProperty(ref _cellModuleSignalPump, value); }
  349. }
  350. /// <summary>
  351. /// Cells数量
  352. /// </summary>
  353. public int CellsCount
  354. {
  355. get { return _cellsCount; }
  356. set { SetProperty(ref _cellsCount, value); }
  357. }
  358. /// <summary>
  359. /// 是否超过PH值下限
  360. /// </summary>
  361. public bool IsPHLowLimit
  362. {
  363. get { return _isPHLowLimit; }
  364. set { SetProperty(ref _isPHLowLimit, value); }
  365. }
  366. /// <summary>
  367. /// 是否超过PH值下限
  368. /// </summary>
  369. public bool IsPHHighLimit
  370. {
  371. get { return _isPHHighLimit; }
  372. set { SetProperty(ref _isPHHighLimit, value); }
  373. }
  374. /// <summary>
  375. /// 手动注水时长(秒)
  376. /// </summary>
  377. public int ManualFillSeconds
  378. {
  379. get { return _manualFillSeconds; }
  380. set { SetProperty(ref _manualFillSeconds, value); }
  381. }
  382. /// <summary>
  383. /// 是否正在手动注水
  384. /// </summary>
  385. public bool IsManualReplen
  386. {
  387. get { return _isManualReplen; }
  388. set { SetProperty(ref _isManualReplen, value); }
  389. }
  390. /// <summary>
  391. /// DIValveMaxOnTime
  392. /// </summary>
  393. public double DIValveMaxOnTime
  394. {
  395. get { return _diValveMaxOnTime; }
  396. set { SetProperty(ref _diValveMaxOnTime, value);}
  397. }
  398. /// <summary>
  399. /// TemperatureControl Module Name
  400. /// </summary>
  401. public TemperatureControllerData TemperatureControlData
  402. {
  403. get { return _temperatureControlData; }
  404. set { SetProperty(ref _temperatureControlData, value); }
  405. }
  406. /// <summary>
  407. /// PowerSupply Module Name
  408. /// </summary>
  409. public PowerSupplierData CmmPowerSupplierData
  410. {
  411. get { return _cmmPowerSupplierData; }
  412. set { SetProperty(ref _cmmPowerSupplierData, value); }
  413. }
  414. /// <summary>
  415. /// 是否超过HighLevel
  416. /// </summary>
  417. public bool IsHighLevel
  418. {
  419. get { return _isHighLevel; }
  420. set { SetProperty(ref _isHighLevel, value); }
  421. }
  422. /// <summary>
  423. /// 是否超过LowLevel
  424. /// </summary>
  425. public bool IsLowLevel
  426. {
  427. get { return _isLowLevel; }
  428. set { SetProperty(ref _isLowLevel, value); }
  429. }
  430. /// <summary>
  431. /// 是否触发Highsafety
  432. /// </summary>
  433. public bool IsHighSafety
  434. {
  435. get { return _isHighSafety; }
  436. set { SetProperty(ref _isHighSafety, value); }
  437. }
  438. /// <summary>
  439. /// HED Flow
  440. /// </summary>
  441. public bool HEDFlowIsOn
  442. {
  443. get { return _hedFlowIsOn; }
  444. set { SetProperty(ref _hedFlowIsOn, value); }
  445. }
  446. /// <summary>
  447. /// DI Replen是否报错
  448. /// </summary>
  449. public bool IsDiReplenFault
  450. {
  451. get { return _isDiReplenFault; }
  452. set { SetProperty(ref _isDiReplenFault, value); }
  453. }
  454. /// <summary>
  455. /// Safety数据
  456. /// </summary>
  457. public SafetyData CommonSafetyData
  458. {
  459. get { return _safetyData; }
  460. set { SetProperty(ref _safetyData, value); }
  461. }
  462. /// <summary>
  463. /// 页面功能启用
  464. /// </summary>
  465. public bool IsEnabled
  466. {
  467. get { return _isEnabled; }
  468. set { SetProperty(ref _isEnabled, value); }
  469. }
  470. /// <summary>
  471. /// AutoMode页面功能启用
  472. /// </summary>
  473. public bool IsAutoEnabled
  474. {
  475. get { return _isAutoEnabled; }
  476. set { SetProperty(ref _isAutoEnabled, value); }
  477. }
  478. /// <summary>
  479. /// DosingSystem是否启用
  480. /// </summary>
  481. public bool IsDosingSystemEnabled
  482. {
  483. get { return _isDosingSystemEnabled; }
  484. set { SetProperty(ref _isDosingSystemEnabled, value); }
  485. }
  486. /// <summary>
  487. /// TC Enable状态
  488. /// </summary>
  489. public string TCEnableStatus
  490. {
  491. get { return _tcEnableStatus; }
  492. set { SetProperty(ref _tcEnableStatus, value); }
  493. }
  494. /// <summary>
  495. /// 是否Error
  496. /// </summary>
  497. public bool IsError
  498. {
  499. get { return _isError; }
  500. set { SetProperty(ref _isError, value); }
  501. }
  502. /// <summary>
  503. /// 是否为调速泵
  504. /// </summary>
  505. public bool IsRegulatePump
  506. {
  507. get { return _isRegulatePump; }
  508. set { SetProperty(ref _isRegulatePump, value); }
  509. }
  510. /// <summary>
  511. /// 泵速
  512. /// </summary>
  513. public int PumpSpeed
  514. {
  515. get { return _pumpSpeed; }
  516. set { SetProperty(ref _pumpSpeed, value); }
  517. }
  518. #endregion
  519. #region Recipe
  520. /// <summary>
  521. /// Recipe内容
  522. /// </summary>
  523. public ResRecipe CurrentRecipe
  524. {
  525. get { return _currentRecipe; }
  526. set { SetProperty(ref _currentRecipe, value); }
  527. }
  528. /// <summary>
  529. /// Selected Recipe Node
  530. /// </summary>
  531. public RecipeNode SelectedRecipeNode
  532. {
  533. get { return _selectedRecipeNode; }
  534. set { SetProperty(ref _selectedRecipeNode, value); }
  535. }
  536. /// <summary>
  537. /// Recipe Mode
  538. /// </summary>
  539. public string RecipeMode
  540. {
  541. get { return _recipeMode; }
  542. set { SetProperty(ref _recipeMode, value); }
  543. }
  544. /// <summary>
  545. /// Recipe Type
  546. /// </summary>
  547. public string RecipeType
  548. {
  549. get { return _recipeType; }
  550. set { SetProperty(ref _recipeType, value); }
  551. }
  552. #endregion
  553. #region CMM
  554. /// <summary>
  555. /// 是否配备CMM
  556. /// </summary>
  557. public bool IsCMMConfig
  558. {
  559. get { return _isCMMConfig; }
  560. set { SetProperty(ref _isCMMConfig, value); }
  561. }
  562. /// <summary>
  563. /// Flow High 状态(Warning:黄色,Error:红色)
  564. /// </summary>
  565. public string FlowHighStatus
  566. {
  567. get { return _flowHighStatus; }
  568. set { SetProperty(ref _flowHighStatus, value); }
  569. }
  570. /// <summary>
  571. /// Flow Low 状态(Warning:黄色,Error:红色)
  572. /// </summary>
  573. public string FlowLowStatus
  574. {
  575. get { return _flowLowStatus; }
  576. set { SetProperty(ref _flowLowStatus, value); }
  577. }
  578. /// <summary>
  579. /// PowerSupplier High电流状态
  580. /// </summary>
  581. public string CurrentHighStatus
  582. {
  583. get { return _currentHighStatus; }
  584. set { SetProperty(ref _currentHighStatus, value); }
  585. }
  586. /// <summary>
  587. /// PowerSupplier Low电流状态
  588. /// </summary>
  589. public string CurrentLowStatus
  590. {
  591. get { return _currentLowStatus; }
  592. set { SetProperty(ref _currentLowStatus, value); }
  593. }
  594. /// <summary>
  595. /// 是否低于最小电压
  596. /// </summary>
  597. public bool IsBelowMinVoltage
  598. {
  599. get { return _isBelowMinVoltage; }
  600. set { SetProperty(ref _isBelowMinVoltage, value); }
  601. }
  602. /// <summary>
  603. /// CMM Anode 用电量
  604. /// </summary>
  605. public double CMMAnodeAHrs
  606. {
  607. get { return _reservoirCMMAnodeAHrs; ; }
  608. set { SetProperty(ref _reservoirCMMAnodeAHrs, value); }
  609. }
  610. /// <summary>
  611. /// CMM Cathode 用电量
  612. /// </summary>
  613. public double CMMCathodeAHrs
  614. {
  615. get { return _reservoirCMMCathodeAHrs; ; }
  616. set { SetProperty(ref _reservoirCMMCathodeAHrs, value); }
  617. }
  618. #endregion
  619. #region Config
  620. /// <summary>
  621. /// CMM Anode LifeTime用电量
  622. /// </summary>
  623. public double CMMAnodeLifeTimeAHrs
  624. {
  625. get { return _reservoirCMMAnodeLifeTimeAHrs; ; }
  626. set { SetProperty(ref _reservoirCMMAnodeLifeTimeAHrs, value); }
  627. }
  628. /// <summary>
  629. /// CMM Cathode LifeTime用电量
  630. /// </summary>
  631. public double CMMCathodeLifeTimeAHrs
  632. {
  633. get { return _reservoirCMMCathodeLifeTimeAHrs; ; }
  634. set { SetProperty(ref _reservoirCMMCathodeLifeTimeAHrs, value); }
  635. }
  636. /// <summary>
  637. /// CMM Anode用电量
  638. /// </summary>
  639. public double CMMAnodeUsage
  640. {
  641. get { return _cmmAnodeUsage; ; }
  642. set { SetProperty(ref _cmmAnodeUsage, value); }
  643. }
  644. /// <summary>
  645. /// CMM Cathode用电量
  646. /// </summary>
  647. public double CMMCathodeUsage
  648. {
  649. get { return _cmmCathodeUsage; ; }
  650. set { SetProperty(ref _cmmCathodeUsage, value); }
  651. }
  652. /// <summary>
  653. /// CMM电量报警灯
  654. /// </summary>
  655. public bool IsCMMAnodeTotalAmpHoursWarning
  656. {
  657. get { return _isCMMAnodeTotalAmpHoursWarning; }
  658. set { SetProperty(ref _isCMMAnodeTotalAmpHoursWarning, value); }
  659. }
  660. public bool IsCMMAnodeTotalAmpHoursFault
  661. {
  662. get { return _isCMMAnodeTotalAmpHoursFault; }
  663. set { SetProperty(ref _isCMMAnodeTotalAmpHoursFault, value); }
  664. }
  665. public bool IsCMMCathodeTotalAmpHoursWarning
  666. {
  667. get { return _isCMMCathodeTotalAmpHoursWarning; }
  668. set { SetProperty(ref _isCMMCathodeTotalAmpHoursWarning, value); }
  669. }
  670. public bool IsCMMCathodeTotalAmpHoursFault
  671. {
  672. get { return _isCMMCathodeTotalAmpHoursFault; }
  673. set { SetProperty(ref _isCMMCathodeTotalAmpHoursFault, value); }
  674. }
  675. #endregion
  676. #endregion
  677. #region 命令
  678. public ICommand InitializeCommand { get; set; }
  679. public ICommand OpenDIReplenValveCommand { get; set; }
  680. public ICommand CloseDIReplenValveCommand { get; set; }
  681. public ICommand OpenCellFlow1Command { get; set; }
  682. public ICommand OpenCellBypass1Command { get; set; }
  683. public ICommand OpenCellFlow2Command { get; set; }
  684. public ICommand OpenCellBypass2Command { get; set; }
  685. public ICommand OpenClampValve1Command { get; set; }
  686. public ICommand CloseClampValve1Command { get; set; }
  687. public ICommand OpenClampValve2Command { get; set; }
  688. public ICommand CloseClampValve2Command { get; set; }
  689. public ICommand ManualDireplenCommand { get; set; }
  690. public ICommand ResetTotalCommand { get; set; }
  691. public ICommand GotoPMCounterCommand { get; set; }
  692. public ICommand JumpDosingSystemCommand { get; set; }
  693. public ICommand HedPowerOnCommand { get; set; }
  694. public ICommand HedPowerOffCommand { get; set; }
  695. public ICommand ResPowerOnCommand { get; set; }
  696. public ICommand ResPowerOffCommand { get; set; }
  697. public ICommand PumpSpeedCommand { get; set; }
  698. #endregion
  699. /// <summary>
  700. /// 构造函数
  701. /// </summary>
  702. public StandardHotReservoirsViewModel()
  703. {
  704. InitializeCommand = new DelegateCommand<object>(InitializeAction);
  705. OpenDIReplenValveCommand = new DelegateCommand<object>(OnOpenDIReplenValve);
  706. CloseDIReplenValveCommand = new DelegateCommand<object>(OnCloseDIReplenValve);
  707. OpenCellFlow1Command = new DelegateCommand<object>(OnCellFlow1);
  708. OpenCellBypass1Command = new DelegateCommand<object>(OnCellBypass1);
  709. OpenCellFlow2Command = new DelegateCommand<object>(OnCellFlow2);
  710. OpenCellBypass2Command = new DelegateCommand<object>(OnCellBypass2);
  711. OpenClampValve1Command = new DelegateCommand<object>(OnOpenClampValve1);
  712. CloseClampValve1Command = new DelegateCommand<object>(OnCloseClampValve1);
  713. OpenClampValve2Command = new DelegateCommand<object>(OnOpenClampValve2);
  714. CloseClampValve2Command = new DelegateCommand<object>(OnCloseClampValve2);
  715. ManualDireplenCommand = new DelegateCommand<object>(ManualDireplenAction);
  716. ResetTotalCommand = new DelegateCommand(ResetTotalAction);
  717. GotoPMCounterCommand = new DelegateCommand<object>(GotoPMCounterAction);
  718. JumpDosingSystemCommand = new DelegateCommand<object>(JumpDosingSystemAction);
  719. HedPowerOnCommand = new DelegateCommand<object>(HedPowerOnAction);
  720. HedPowerOffCommand = new DelegateCommand<object>(HedPowerOffAction);
  721. ResPowerOnCommand = new DelegateCommand<object>(ResPowerOnAction);
  722. ResPowerOffCommand = new DelegateCommand<object>(ResPowerOffAction);
  723. PumpSpeedCommand = new DelegateCommand<object>(PumpSpeedAction);
  724. }
  725. /// <summary>
  726. /// 加载数据
  727. /// </summary>
  728. public void LoadData(string systemName)
  729. {
  730. RecipeType = "res";
  731. Module = systemName;
  732. _rtDataKeys.Clear();
  733. _rtDataKeys.Add($"{Module}.Metals");
  734. _rtDataKeys.Add($"{Module}.ReplenType");
  735. Dictionary<string,object> tmpMetals = QueryDataClient.Instance.Service.PollData(_rtDataKeys);
  736. if (tmpMetals != null)
  737. {
  738. string replenType = CommonFunction.GetValue<string>(tmpMetals, $"{Module}.ReplenType");
  739. IsDosingSystemEnabled = replenType != "" ? true : false;
  740. List<string> strMetals = CommonFunction.GetValue<List<string>>(tmpMetals, $"{Module}.Metals");
  741. CellsCount = strMetals.Count;
  742. if(strMetals!=null&& CellsCount>= 1)
  743. {
  744. CellModuleNameCollection.Clear();
  745. MetalDataCollection.Clear();
  746. CellModuleSignalPump.Clear();
  747. for (int i = 0; i < CellsCount; i++)
  748. {
  749. string metal=strMetals[i];
  750. if (!string.IsNullOrEmpty(metal))
  751. {
  752. CellModuleNameCollection.Add(metal);
  753. _rtDataKeys.Add($"{metal}.MetalData");
  754. _rtDataKeys.Add($"{metal}.IsSingalPump");
  755. }
  756. MetalDataCollection.Add(new StandardHotMetalDeviceData());
  757. CellModuleSignalPump.Add(false);
  758. }
  759. }
  760. }
  761. _rtDataKeys.Add($"{Module}.ReservoirData");
  762. _rtDataKeys.Add($"{Module}.PersistentValue");
  763. _rtDataKeys.Add($"{Module}.IsManualReplen");
  764. _rtDataKeys.Add($"{Module}.DIValveMaxOnTime");
  765. _rtDataKeys.Add($"{Module}.CurrentRecipe");
  766. _rtDataKeys.Add($"{Module}.TemperatureControllerData");
  767. _rtDataKeys.Add($"{Module}.CmmPowerSupplierData");
  768. _rtDataKeys.Add($"{Module}.FsmState");
  769. _rtDataKeys.Add($"{Module}.ReservoirAverageLevel");
  770. _rtDataKeys.Add($"{Module}.ReservoirUsage");
  771. _rtDataKeys.Add($"{Module}.PumpSpeed");
  772. _rtDataKeys.Add($"{Module}.IsRegulatePump");
  773. _rtDataKeys.Add($"{Module}.IsCMMConfig");
  774. _rtDataKeys.Add($"{Module}.IsDIReplenInFault");
  775. if (_timer == null)
  776. {
  777. _timer = new DispatcherTimer();
  778. _timer.Interval = TimeSpan.FromMilliseconds(200);
  779. _timer.Tick += Timer_Tick;
  780. }
  781. _timer.Start();
  782. //加载Config
  783. _reservoirCMMFlowHighWarning = Convert.ToDouble(QueryDataClient.Instance.Service.GetConfig($"Reservoir.{Module}.CMMFlowHighWarning"));
  784. _reservoirCMMFlowHighError = Convert.ToDouble(QueryDataClient.Instance.Service.GetConfig($"Reservoir.{Module}.CMMFlowHighFault"));
  785. _reservoirCMMFlowLowWarning = Convert.ToDouble(QueryDataClient.Instance.Service.GetConfig($"Reservoir.{Module}.CMMFlowLowWarning"));
  786. _reservoirCMMFlowLowError = Convert.ToDouble(QueryDataClient.Instance.Service.GetConfig($"Reservoir.{Module}.CMMFlowLowFault"));
  787. CMMAnodeLifeTimeAHrs = Convert.ToDouble(QueryDataClient.Instance.Service.GetConfig($"Reservoir.{Module}.CMMAnodeLifeTimeAHrs"));
  788. CMMCathodeLifeTimeAHrs = Convert.ToDouble(QueryDataClient.Instance.Service.GetConfig($"Reservoir.{Module}.CMMCathodeLifeTimeAHrs"));
  789. _reservoirHighLevel = Convert.ToDouble(QueryDataClient.Instance.Service.GetConfig($"Reservoir.{Module}.HighLevel"));
  790. _reservoirLowLevel = Convert.ToDouble(QueryDataClient.Instance.Service.GetConfig($"Reservoir.{Module}.LowLevel"));
  791. _cmmAnodeTotalAmpHoursWarningLimit = (double)Convert.ToDouble(QueryDataClient.Instance.Service.GetConfig($"Reservoir.{Module}.CMMAnodeTotalAmpHoursWarningLimit"));
  792. _cmmAnodeTotalAmpHoursFaultLimit = (double)Convert.ToDouble(QueryDataClient.Instance.Service.GetConfig($"Reservoir.{Module}.CMMAnodeTotalAmpHoursFaultLimit"));
  793. _cmmCathodeTotalAmpHoursWarningLimit = (double)Convert.ToDouble(QueryDataClient.Instance.Service.GetConfig($"Reservoir.{Module}.CMMCathodeTotalAmpHoursWarningLimit"));
  794. _cmmCathodeTotalAmpHoursFaultLimit = (double)Convert.ToDouble(QueryDataClient.Instance.Service.GetConfig($"Reservoir.{Module}.CMMCathodeTotalAmpHoursFaultLimit"));
  795. }
  796. #region 命令方法
  797. /// <summary>
  798. /// 初始化
  799. /// </summary>
  800. /// <param name="param"></param>
  801. private void InitializeAction(object param)
  802. {
  803. InvokeClient.Instance.Service.DoOperation($"{Module}.InitializeAll");
  804. }
  805. /// <summary>
  806. /// 重置TotalTime
  807. /// </summary>
  808. private void ResetTotalAction()
  809. {
  810. InvokeClient.Instance.Service.DoOperation($"{Module}.ResetTotalTime");
  811. }
  812. /// <summary>
  813. /// Cell1三向阀开启CellFlow
  814. /// </summary>
  815. /// <param name="obj"></param>
  816. private void OnCellFlow1(object param)
  817. {
  818. if(CellModuleNameCollection[0] != "")
  819. {
  820. InvokeClient.Instance.Service.DoOperation($"{CellModuleNameCollection[0]}.CellSwitchToFlow");
  821. }
  822. }
  823. /// <summary>
  824. /// Cell1三向阀开启CellBypass
  825. /// </summary>
  826. private void OnCellBypass1(object param)
  827. {
  828. if(CellModuleNameCollection[0] != "")
  829. {
  830. InvokeClient.Instance.Service.DoOperation($"{CellModuleNameCollection[0]}.CellSwitchToBypass");
  831. }
  832. }
  833. /// <summary>
  834. /// Cell2三向阀开启CellFlow
  835. /// </summary>
  836. /// <param name="obj"></param>
  837. private void OnCellFlow2(object param)
  838. {
  839. if(CellModuleNameCollection[1] != "")
  840. {
  841. InvokeClient.Instance.Service.DoOperation($"{CellModuleNameCollection[1]}.CellSwitchToFlow");
  842. }
  843. }
  844. /// <summary>
  845. /// Cell2三向阀开启CellBypass
  846. /// </summary>
  847. private void OnCellBypass2(object param)
  848. {
  849. if (CellModuleNameCollection[1] != "")
  850. {
  851. InvokeClient.Instance.Service.DoOperation($"{CellModuleNameCollection[1]}.CellSwitchToBypass");
  852. }
  853. }
  854. /// <summary>
  855. /// Cell1 Open Clamp Valve
  856. /// </summary>
  857. private void OnOpenClampValve1(object param)
  858. {
  859. if (CellModuleNameCollection[0] != "")
  860. {
  861. InvokeClient.Instance.Service.DoOperation($"{CellModuleNameCollection[0]}.ClampOn");
  862. }
  863. }
  864. /// <summary>
  865. /// Cell1 Close Clamp Valve
  866. /// </summary>
  867. private void OnCloseClampValve1(object param)
  868. {
  869. if (CellModuleNameCollection[0] != "")
  870. {
  871. InvokeClient.Instance.Service.DoOperation($"{CellModuleNameCollection[0]}.ClampOff");
  872. }
  873. }
  874. /// <summary>
  875. /// Cell2 Open Clamp Valve
  876. /// </summary>
  877. private void OnOpenClampValve2(object param)
  878. {
  879. if (CellModuleNameCollection[1] != "")
  880. {
  881. InvokeClient.Instance.Service.DoOperation($"{CellModuleNameCollection[1]}.ClampOn");
  882. }
  883. }
  884. /// <summary>
  885. /// Cell2 Close Clamp Valve
  886. /// </summary>
  887. private void OnCloseClampValve2(object param)
  888. {
  889. if (CellModuleNameCollection[1] != "")
  890. {
  891. InvokeClient.Instance.Service.DoOperation($"{CellModuleNameCollection[1]}.ClampOff");
  892. }
  893. }
  894. /// <summary>
  895. /// Open DI Replen Valve
  896. /// </summary>
  897. private void OnOpenDIReplenValve(object param)
  898. {
  899. InvokeClient.Instance.Service.DoOperation($"{Module}.DiReplenOn");
  900. }
  901. /// <summary>
  902. /// Close DI Replen Valve
  903. /// </summary>
  904. private void OnCloseDIReplenValve(object param)
  905. {
  906. InvokeClient.Instance.Service.DoOperation($"{Module}.DiReplenOff");
  907. }
  908. /// <summary>
  909. /// Manual DireplenAction
  910. /// </summary>
  911. /// <param name="param"></param>
  912. private void ManualDireplenAction(object param)
  913. {
  914. InvokeClient.Instance.Service.DoOperation($"{Module}.ManualDiReplen",ManualFillSeconds);
  915. }
  916. /// <summary>
  917. /// 进入PMCounter页面
  918. /// </summary>
  919. /// <param name="param"></param>
  920. private void GotoPMCounterAction(object param)
  921. {
  922. GlobalEvents.OnSwitchFixedChildSubItem(Module, $"PMCounter{Module.Substring(9, 1)}");
  923. }
  924. /// <summary>
  925. /// 跳转DosingSystem
  926. /// </summary>
  927. /// <param name="param"></param>
  928. private void JumpDosingSystemAction(object param)
  929. {
  930. GlobalEvents.OnSwitchFixedChildSubItem(Module, $"DosingSystem1");
  931. }
  932. private void HedPowerOnAction(object param)
  933. {
  934. InvokeClient.Instance.Service.DoOperation($"{Module}.HedPowerOn");
  935. }
  936. private void HedPowerOffAction(object param)
  937. {
  938. InvokeClient.Instance.Service.DoOperation($"{Module}.HedPowerOff");
  939. }
  940. private void ResPowerOnAction(object param)
  941. {
  942. InvokeClient.Instance.Service.DoOperation($"{Module}.ResPowerOn");
  943. }
  944. private void ResPowerOffAction(object param)
  945. {
  946. InvokeClient.Instance.Service.DoOperation($"{Module}.ResPowerOff");
  947. }
  948. /// <summary>
  949. /// Initialize Action
  950. /// </summary>
  951. /// <param name="param"></param>
  952. private void PumpSpeedAction(object obj)
  953. {
  954. object[] objects = (object[])obj;
  955. if (objects.Length >= 2)
  956. {
  957. InvokeClient.Instance.Service.DoOperation($"{Module}.RegulatPumpSpeed", objects[1]);
  958. }
  959. }
  960. #endregion
  961. /// <summary>
  962. /// 时钟
  963. /// </summary>
  964. /// <param name="sender"></param>
  965. /// <param name="e"></param>
  966. private void Timer_Tick(object sender, EventArgs e)
  967. {
  968. if (_rtDataKeys.Count != 0)
  969. {
  970. _rtDataValueDic = QueryDataClient.Instance.Service.PollData(_rtDataKeys);
  971. if (_rtDataValueDic != null)
  972. {
  973. IsCMMConfig = CommonFunction.GetValue<bool>(_rtDataValueDic, $"{Module}.IsCMMConfig");
  974. IsRegulatePump = CommonFunction.GetValue<bool>(_rtDataValueDic, $"{Module}.IsRegulatePump");
  975. PumpSpeed = CommonFunction.GetValue<int>(_rtDataValueDic, $"{Module}.PumpSpeed");
  976. ReservoirsPersistent = CommonFunction.GetValue<ReservoirsPersistentValue>(_rtDataValueDic, $"{Module}.PersistentValue");
  977. IsManualReplen = CommonFunction.GetValue<bool>(_rtDataValueDic, $"{Module}.IsManualReplen");
  978. DIValveMaxOnTime = CommonFunction.GetValue<double>(_rtDataValueDic, $"{Module}.DIValveMaxOnTime");
  979. CurrentRecipe = CommonFunction.GetValue<ResRecipe>(_rtDataValueDic, $"{Module}.CurrentRecipe");
  980. TemperatureControlData = CommonFunction.GetValue<TemperatureControllerData>(_rtDataValueDic, $"{Module}.TemperatureControllerData");
  981. TCEnableStatus = TemperatureControlData.ControlOperationModel == 0 ? "Disable" : "Enable";
  982. CmmPowerSupplierData = CommonFunction.GetValue<PowerSupplierData>(_rtDataValueDic, $"{Module}.CmmPowerSupplierData");
  983. State = CommonFunction.GetValue<string>(_rtDataValueDic, $"{Module}.FsmState");
  984. AvgLevel = CommonFunction.GetValue<double>(_rtDataValueDic, $"{Module}.ReservoirAverageLevel");
  985. ReservoirUsage reservoirUsage = CommonFunction.GetValue<ReservoirUsage>(_rtDataValueDic, $"{Module}.ReservoirUsage");
  986. if(reservoirUsage != null)
  987. {
  988. CMMAnodeUsage = reservoirUsage.CMMAnodeUsage;
  989. CMMCathodeUsage = reservoirUsage.CMMMembranceUsage;
  990. //CMM AnodeUsage
  991. if (CMMAnodeUsage > _cmmAnodeTotalAmpHoursFaultLimit)
  992. {
  993. IsCMMAnodeTotalAmpHoursFault = true;
  994. IsCMMAnodeTotalAmpHoursWarning = false;
  995. }
  996. else if(CMMAnodeUsage > _cmmAnodeTotalAmpHoursWarningLimit)
  997. {
  998. IsCMMAnodeTotalAmpHoursWarning = true;
  999. IsCMMAnodeTotalAmpHoursFault = false;
  1000. }
  1001. else
  1002. {
  1003. IsCMMAnodeTotalAmpHoursWarning = false;
  1004. IsCMMAnodeTotalAmpHoursFault = false;
  1005. }
  1006. //CMM CathodeUsage
  1007. if (CMMCathodeUsage > _cmmCathodeTotalAmpHoursFaultLimit)
  1008. {
  1009. IsCMMCathodeTotalAmpHoursFault = true;
  1010. IsCMMCathodeTotalAmpHoursWarning = false;
  1011. }
  1012. else if (CMMCathodeUsage > _cmmCathodeTotalAmpHoursWarningLimit)
  1013. {
  1014. IsCMMCathodeTotalAmpHoursWarning = true;
  1015. IsCMMCathodeTotalAmpHoursFault = false;
  1016. }
  1017. else
  1018. {
  1019. IsCMMCathodeTotalAmpHoursWarning = false;
  1020. IsCMMCathodeTotalAmpHoursFault = false;
  1021. }
  1022. }
  1023. if ("Manual".Equals(ReservoirsPersistent.OperatingMode))
  1024. {
  1025. IsEnabled = true;
  1026. IsAutoEnabled = true;
  1027. }
  1028. else if ("Auto".Equals(ReservoirsPersistent.OperatingMode))
  1029. {
  1030. IsAutoEnabled = true;
  1031. IsEnabled = false;
  1032. }
  1033. else
  1034. {
  1035. State = "Stopped";
  1036. IsEnabled = false;
  1037. IsAutoEnabled = false;
  1038. }
  1039. for (int i = 0;i < CellsCount;i++)
  1040. {
  1041. MetalDataCollection[i] = CommonFunction.GetValue<StandardHotMetalDeviceData>(_rtDataValueDic, $"{CellModuleNameCollection[i]}.MetalData");
  1042. CellModuleSignalPump[i] = CommonFunction.GetValue<bool>(_rtDataValueDic, $"{CellModuleNameCollection[i]}.IsSingalPump");
  1043. }
  1044. ReservoirData = CommonFunction.GetValue<StandardHotReservoirData>(_rtDataValueDic, $"{Module}.ReservoirData");
  1045. if (ReservoirData != null)
  1046. {
  1047. for (int i = 0; i < CellsCount; i++)
  1048. {
  1049. MetalDataCollection[i].CellPump ^= ReservoirData.RegulatePumpSignalIn; //确保管路开关正常显示
  1050. }
  1051. }
  1052. if (CurrentRecipe != null)
  1053. {
  1054. //PHLow报警灯
  1055. IsPHLowLimit = (ReservoirData != null && ReservoirData.PHValue < CurrentRecipe.PHErrorLow) ? true : false;
  1056. //PHHigh报警灯
  1057. IsPHHighLimit = (ReservoirData != null && ReservoirData.PHValue > CurrentRecipe.PHErrorHigh) ? true : false;
  1058. if(CmmPowerSupplierData != null)
  1059. {
  1060. //PowerSupply High报警灯
  1061. if (CmmPowerSupplierData.Current <= CurrentRecipe.CMMCurrentSetPoint * (1 + (double)CurrentRecipe.CMMCurrentWarningPercent/100))
  1062. {
  1063. CurrentHighStatus = "Normal";
  1064. }
  1065. else if (CmmPowerSupplierData.Current > CurrentRecipe.CMMCurrentSetPoint * (1 + (double)CurrentRecipe.CMMCurrentFaultPercent/100))
  1066. {
  1067. CurrentHighStatus = "Error";
  1068. }
  1069. else
  1070. {
  1071. CurrentHighStatus = "Warning";
  1072. }
  1073. //PowerSupply Low报警灯
  1074. if (CmmPowerSupplierData.Current >= CurrentRecipe.CMMCurrentSetPoint * (1 - (double)CurrentRecipe.CMMCurrentWarningPercent/100))
  1075. {
  1076. CurrentLowStatus = "Normal";
  1077. }
  1078. else if (CmmPowerSupplierData.Current < CurrentRecipe.CMMCurrentSetPoint * (1 - (double)CurrentRecipe.CMMCurrentFaultPercent/100))
  1079. {
  1080. CurrentLowStatus = "Error";
  1081. }
  1082. else
  1083. {
  1084. CurrentLowStatus = "Warning";
  1085. }
  1086. IsBelowMinVoltage = CmmPowerSupplierData.Voltage < CurrentRecipe.CMMMinVoltage ? true : false;
  1087. }
  1088. }
  1089. if (ReservoirData != null)
  1090. {
  1091. //CMM Flow High报警灯
  1092. if (ReservoirData.Flow <= _reservoirCMMFlowHighWarning)
  1093. {
  1094. FlowHighStatus = "Normal";
  1095. }
  1096. else if (ReservoirData.Flow > _reservoirCMMFlowHighError)
  1097. {
  1098. FlowHighStatus = "Error";
  1099. }
  1100. else
  1101. {
  1102. FlowHighStatus = "Warning";
  1103. }
  1104. //CMM Flow Low报警灯
  1105. if (ReservoirData.Flow >= _reservoirCMMFlowLowWarning)
  1106. {
  1107. FlowLowStatus = "Normal";
  1108. }
  1109. else if (ReservoirData.Flow < _reservoirCMMFlowLowError)
  1110. {
  1111. FlowLowStatus = "Error";
  1112. }
  1113. else
  1114. {
  1115. FlowLowStatus = "Warning";
  1116. }
  1117. //High Level报警灯
  1118. IsHighLevel = (ReservoirData.WaterLevel > _reservoirHighLevel) ? true : false;
  1119. //Low Level报警灯
  1120. IsLowLevel = (ReservoirData.WaterLevel < _reservoirLowLevel) ? true : false;
  1121. //HighSafety
  1122. IsHighSafety = ReservoirData.SafetyHighLevel;
  1123. //HedFlow管流
  1124. HEDFlowIsOn = (ReservoirData.HedFlow > 0) ? true : false;
  1125. //DIReplenFault
  1126. IsDiReplenFault = CommonFunction.GetValue<bool>(_rtDataValueDic, $"{Module}.IsDIReplenInFault");
  1127. IsError = State== "Error" ? true : false;
  1128. }
  1129. }
  1130. }
  1131. }
  1132. /// <summary>
  1133. /// 隐藏
  1134. /// </summary>
  1135. public void Hide()
  1136. {
  1137. if (_timer != null)
  1138. {
  1139. _timer.Stop();
  1140. }
  1141. }
  1142. }
  1143. }