StandardHotReservoirsViewModel.cs 45 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182
  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 _hedFlowIsOn, 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. if (_timer == null)
  775. {
  776. _timer = new DispatcherTimer();
  777. _timer.Interval = TimeSpan.FromMilliseconds(200);
  778. _timer.Tick += Timer_Tick;
  779. }
  780. _timer.Start();
  781. //加载Config
  782. _reservoirCMMFlowHighWarning = Convert.ToDouble(QueryDataClient.Instance.Service.GetConfig($"Reservoir.{Module}.CMMFlowHighWarning"));
  783. _reservoirCMMFlowHighError = Convert.ToDouble(QueryDataClient.Instance.Service.GetConfig($"Reservoir.{Module}.CMMFlowHighFault"));
  784. _reservoirCMMFlowLowWarning = Convert.ToDouble(QueryDataClient.Instance.Service.GetConfig($"Reservoir.{Module}.CMMFlowLowWarning"));
  785. _reservoirCMMFlowLowError = Convert.ToDouble(QueryDataClient.Instance.Service.GetConfig($"Reservoir.{Module}.CMMFlowLowFault"));
  786. CMMAnodeLifeTimeAHrs = Convert.ToDouble(QueryDataClient.Instance.Service.GetConfig($"Reservoir.{Module}.CMMAnodeLifeTimeAHrs"));
  787. CMMCathodeLifeTimeAHrs = Convert.ToDouble(QueryDataClient.Instance.Service.GetConfig($"Reservoir.{Module}.CMMCathodeLifeTimeAHrs"));
  788. _reservoirHighLevel = Convert.ToDouble(QueryDataClient.Instance.Service.GetConfig($"Reservoir.{Module}.HighLevel"));
  789. _reservoirLowLevel = Convert.ToDouble(QueryDataClient.Instance.Service.GetConfig($"Reservoir.{Module}.LowLevel"));
  790. _cmmAnodeTotalAmpHoursWarningLimit = (double)Convert.ToDouble(QueryDataClient.Instance.Service.GetConfig($"Reservoir.{Module}.CMMAnodeTotalAmpHoursWarningLimit"));
  791. _cmmAnodeTotalAmpHoursFaultLimit = (double)Convert.ToDouble(QueryDataClient.Instance.Service.GetConfig($"Reservoir.{Module}.CMMAnodeTotalAmpHoursFaultLimit"));
  792. _cmmCathodeTotalAmpHoursWarningLimit = (double)Convert.ToDouble(QueryDataClient.Instance.Service.GetConfig($"Reservoir.{Module}.CMMCathodeTotalAmpHoursWarningLimit"));
  793. _cmmCathodeTotalAmpHoursFaultLimit = (double)Convert.ToDouble(QueryDataClient.Instance.Service.GetConfig($"Reservoir.{Module}.CMMCathodeTotalAmpHoursFaultLimit"));
  794. }
  795. #region 命令方法
  796. /// <summary>
  797. /// 初始化
  798. /// </summary>
  799. /// <param name="param"></param>
  800. private void InitializeAction(object param)
  801. {
  802. InvokeClient.Instance.Service.DoOperation($"{Module}.InitializeAll");
  803. }
  804. /// <summary>
  805. /// 重置TotalTime
  806. /// </summary>
  807. private void ResetTotalAction()
  808. {
  809. InvokeClient.Instance.Service.DoOperation($"{Module}.ResetTotalTime");
  810. }
  811. /// <summary>
  812. /// Cell1三向阀开启CellFlow
  813. /// </summary>
  814. /// <param name="obj"></param>
  815. private void OnCellFlow1(object param)
  816. {
  817. if(CellModuleNameCollection[0] != "")
  818. {
  819. InvokeClient.Instance.Service.DoOperation($"{CellModuleNameCollection[0]}.CellSwitchToFlow");
  820. }
  821. }
  822. /// <summary>
  823. /// Cell1三向阀开启CellBypass
  824. /// </summary>
  825. private void OnCellBypass1(object param)
  826. {
  827. if(CellModuleNameCollection[0] != "")
  828. {
  829. InvokeClient.Instance.Service.DoOperation($"{CellModuleNameCollection[0]}.CellSwitchToBypass");
  830. }
  831. }
  832. /// <summary>
  833. /// Cell2三向阀开启CellFlow
  834. /// </summary>
  835. /// <param name="obj"></param>
  836. private void OnCellFlow2(object param)
  837. {
  838. if(CellModuleNameCollection[1] != "")
  839. {
  840. InvokeClient.Instance.Service.DoOperation($"{CellModuleNameCollection[1]}.CellSwitchToFlow");
  841. }
  842. }
  843. /// <summary>
  844. /// Cell2三向阀开启CellBypass
  845. /// </summary>
  846. private void OnCellBypass2(object param)
  847. {
  848. if (CellModuleNameCollection[1] != "")
  849. {
  850. InvokeClient.Instance.Service.DoOperation($"{CellModuleNameCollection[1]}.CellSwitchToBypass");
  851. }
  852. }
  853. /// <summary>
  854. /// Cell1 Open Clamp Valve
  855. /// </summary>
  856. private void OnOpenClampValve1(object param)
  857. {
  858. if (CellModuleNameCollection[0] != "")
  859. {
  860. InvokeClient.Instance.Service.DoOperation($"{CellModuleNameCollection[0]}.ClampOn");
  861. }
  862. }
  863. /// <summary>
  864. /// Cell1 Close Clamp Valve
  865. /// </summary>
  866. private void OnCloseClampValve1(object param)
  867. {
  868. if (CellModuleNameCollection[0] != "")
  869. {
  870. InvokeClient.Instance.Service.DoOperation($"{CellModuleNameCollection[0]}.ClampOff");
  871. }
  872. }
  873. /// <summary>
  874. /// Cell2 Open Clamp Valve
  875. /// </summary>
  876. private void OnOpenClampValve2(object param)
  877. {
  878. if (CellModuleNameCollection[1] != "")
  879. {
  880. InvokeClient.Instance.Service.DoOperation($"{CellModuleNameCollection[1]}.ClampOn");
  881. }
  882. }
  883. /// <summary>
  884. /// Cell2 Close Clamp Valve
  885. /// </summary>
  886. private void OnCloseClampValve2(object param)
  887. {
  888. if (CellModuleNameCollection[1] != "")
  889. {
  890. InvokeClient.Instance.Service.DoOperation($"{CellModuleNameCollection[1]}.ClampOff");
  891. }
  892. }
  893. /// <summary>
  894. /// Open DI Replen Valve
  895. /// </summary>
  896. private void OnOpenDIReplenValve(object param)
  897. {
  898. InvokeClient.Instance.Service.DoOperation($"{Module}.DiReplenOn");
  899. }
  900. /// <summary>
  901. /// Close DI Replen Valve
  902. /// </summary>
  903. private void OnCloseDIReplenValve(object param)
  904. {
  905. InvokeClient.Instance.Service.DoOperation($"{Module}.DiReplenOff");
  906. }
  907. /// <summary>
  908. /// Manual DireplenAction
  909. /// </summary>
  910. /// <param name="param"></param>
  911. private void ManualDireplenAction(object param)
  912. {
  913. InvokeClient.Instance.Service.DoOperation($"{Module}.ManualDiReplen",ManualFillSeconds);
  914. }
  915. /// <summary>
  916. /// 进入PMCounter页面
  917. /// </summary>
  918. /// <param name="param"></param>
  919. private void GotoPMCounterAction(object param)
  920. {
  921. GlobalEvents.OnSwitchFixedChildSubItem(Module, $"PMCounter{Module.Substring(9, 1)}");
  922. }
  923. /// <summary>
  924. /// 跳转DosingSystem
  925. /// </summary>
  926. /// <param name="param"></param>
  927. private void JumpDosingSystemAction(object param)
  928. {
  929. GlobalEvents.OnSwitchFixedChildSubItem(Module, $"DosingSystem1");
  930. }
  931. private void HedPowerOnAction(object param)
  932. {
  933. InvokeClient.Instance.Service.DoOperation($"{Module}.HedPowerOn");
  934. }
  935. private void HedPowerOffAction(object param)
  936. {
  937. InvokeClient.Instance.Service.DoOperation($"{Module}.HedPowerOff");
  938. }
  939. private void ResPowerOnAction(object param)
  940. {
  941. InvokeClient.Instance.Service.DoOperation($"{Module}.ResPowerOn");
  942. }
  943. private void ResPowerOffAction(object param)
  944. {
  945. InvokeClient.Instance.Service.DoOperation($"{Module}.ResPowerOff");
  946. }
  947. /// <summary>
  948. /// Initialize Action
  949. /// </summary>
  950. /// <param name="param"></param>
  951. private void PumpSpeedAction(object obj)
  952. {
  953. object[] objects = (object[])obj;
  954. if (objects.Length >= 2)
  955. {
  956. InvokeClient.Instance.Service.DoOperation($"{Module}.RegulatPumpSpeed", objects[1]);
  957. }
  958. }
  959. #endregion
  960. /// <summary>
  961. /// 时钟
  962. /// </summary>
  963. /// <param name="sender"></param>
  964. /// <param name="e"></param>
  965. private void Timer_Tick(object sender, EventArgs e)
  966. {
  967. if (_rtDataKeys.Count != 0)
  968. {
  969. _rtDataValueDic = QueryDataClient.Instance.Service.PollData(_rtDataKeys);
  970. if (_rtDataValueDic != null)
  971. {
  972. IsCMMConfig = CommonFunction.GetValue<bool>(_rtDataValueDic, $"{Module}.IsCMMConfig");
  973. IsRegulatePump = CommonFunction.GetValue<bool>(_rtDataValueDic, $"{Module}.IsRegulatePump");
  974. PumpSpeed = CommonFunction.GetValue<int>(_rtDataValueDic, $"{Module}.PumpSpeed");
  975. ReservoirsPersistent = CommonFunction.GetValue<ReservoirsPersistentValue>(_rtDataValueDic, $"{Module}.PersistentValue");
  976. IsManualReplen = CommonFunction.GetValue<bool>(_rtDataValueDic, $"{Module}.IsManualReplen");
  977. DIValveMaxOnTime = CommonFunction.GetValue<double>(_rtDataValueDic, $"{Module}.DIValveMaxOnTime");
  978. CurrentRecipe = CommonFunction.GetValue<ResRecipe>(_rtDataValueDic, $"{Module}.CurrentRecipe");
  979. TemperatureControlData = CommonFunction.GetValue<TemperatureControllerData>(_rtDataValueDic, $"{Module}.TemperatureControllerData");
  980. TCEnableStatus = TemperatureControlData.ControlOperationModel == 0 ? "Disable" : "Enable";
  981. CmmPowerSupplierData = CommonFunction.GetValue<PowerSupplierData>(_rtDataValueDic, $"{Module}.CmmPowerSupplierData");
  982. State = CommonFunction.GetValue<string>(_rtDataValueDic, $"{Module}.FsmState");
  983. AvgLevel = CommonFunction.GetValue<double>(_rtDataValueDic, $"{Module}.ReservoirAverageLevel");
  984. ReservoirUsage reservoirUsage = CommonFunction.GetValue<ReservoirUsage>(_rtDataValueDic, $"{Module}.ReservoirUsage");
  985. if(reservoirUsage != null)
  986. {
  987. CMMAnodeUsage = reservoirUsage.CMMAnodeUsage;
  988. CMMCathodeUsage = reservoirUsage.CMMMembranceUsage;
  989. //CMM AnodeUsage
  990. if (CMMAnodeUsage > _cmmAnodeTotalAmpHoursFaultLimit)
  991. {
  992. IsCMMAnodeTotalAmpHoursFault = true;
  993. IsCMMAnodeTotalAmpHoursWarning = false;
  994. }
  995. else if(CMMAnodeUsage > _cmmAnodeTotalAmpHoursWarningLimit)
  996. {
  997. IsCMMAnodeTotalAmpHoursWarning = true;
  998. IsCMMAnodeTotalAmpHoursFault = false;
  999. }
  1000. else
  1001. {
  1002. IsCMMAnodeTotalAmpHoursWarning = false;
  1003. IsCMMAnodeTotalAmpHoursFault = false;
  1004. }
  1005. //CMM CathodeUsage
  1006. if (CMMCathodeUsage > _cmmCathodeTotalAmpHoursFaultLimit)
  1007. {
  1008. IsCMMCathodeTotalAmpHoursFault = true;
  1009. IsCMMCathodeTotalAmpHoursWarning = false;
  1010. }
  1011. else if (CMMCathodeUsage > _cmmCathodeTotalAmpHoursWarningLimit)
  1012. {
  1013. IsCMMCathodeTotalAmpHoursWarning = true;
  1014. IsCMMCathodeTotalAmpHoursFault = false;
  1015. }
  1016. else
  1017. {
  1018. IsCMMCathodeTotalAmpHoursWarning = false;
  1019. IsCMMCathodeTotalAmpHoursFault = false;
  1020. }
  1021. }
  1022. if ("Manual".Equals(ReservoirsPersistent.OperatingMode))
  1023. {
  1024. IsEnabled = true;
  1025. IsAutoEnabled = true;
  1026. }
  1027. else if ("Auto".Equals(ReservoirsPersistent.OperatingMode))
  1028. {
  1029. IsAutoEnabled = true;
  1030. IsEnabled = false;
  1031. }
  1032. else
  1033. {
  1034. State = "Stopped";
  1035. IsEnabled = false;
  1036. IsAutoEnabled = false;
  1037. }
  1038. for (int i = 0;i < CellsCount;i++)
  1039. {
  1040. MetalDataCollection[i] = CommonFunction.GetValue<StandardHotMetalDeviceData>(_rtDataValueDic, $"{CellModuleNameCollection[i]}.MetalData");
  1041. CellModuleSignalPump[i] = CommonFunction.GetValue<bool>(_rtDataValueDic, $"{CellModuleNameCollection[i]}.IsSingalPump");
  1042. }
  1043. ReservoirData = CommonFunction.GetValue<StandardHotReservoirData>(_rtDataValueDic, $"{Module}.ReservoirData");
  1044. if (ReservoirData != null)
  1045. {
  1046. for (int i = 0; i < CellsCount; i++)
  1047. {
  1048. MetalDataCollection[i].CellPump ^= ReservoirData.RegulatePumpSignalIn; //确保管路开关正常显示
  1049. }
  1050. }
  1051. if (CurrentRecipe != null)
  1052. {
  1053. //PHLow报警灯
  1054. IsPHLowLimit = (ReservoirData != null && ReservoirData.PHValue < CurrentRecipe.PHErrorLow) ? true : false;
  1055. //PHHigh报警灯
  1056. IsPHHighLimit = (ReservoirData != null && ReservoirData.PHValue > CurrentRecipe.PHErrorHigh) ? true : false;
  1057. if(CmmPowerSupplierData != null)
  1058. {
  1059. //PowerSupply High报警灯
  1060. if (CmmPowerSupplierData.Current <= CurrentRecipe.CMMCurrentSetPoint * (1 + (double)CurrentRecipe.CMMCurrentWarningPercent/100))
  1061. {
  1062. CurrentHighStatus = "Normal";
  1063. }
  1064. else if (CmmPowerSupplierData.Current > CurrentRecipe.CMMCurrentSetPoint * (1 + (double)CurrentRecipe.CMMCurrentFaultPercent/100))
  1065. {
  1066. CurrentHighStatus = "Error";
  1067. }
  1068. else
  1069. {
  1070. CurrentHighStatus = "Warning";
  1071. }
  1072. //PowerSupply Low报警灯
  1073. if (CmmPowerSupplierData.Current >= CurrentRecipe.CMMCurrentSetPoint * (1 - (double)CurrentRecipe.CMMCurrentWarningPercent/100))
  1074. {
  1075. CurrentLowStatus = "Normal";
  1076. }
  1077. else if (CmmPowerSupplierData.Current < CurrentRecipe.CMMCurrentSetPoint * (1 - (double)CurrentRecipe.CMMCurrentFaultPercent/100))
  1078. {
  1079. CurrentLowStatus = "Error";
  1080. }
  1081. else
  1082. {
  1083. CurrentLowStatus = "Warning";
  1084. }
  1085. IsBelowMinVoltage = CmmPowerSupplierData.Voltage < CurrentRecipe.CMMMinVoltage ? true : false;
  1086. }
  1087. }
  1088. if (ReservoirData != null)
  1089. {
  1090. //CMM Flow High报警灯
  1091. if (ReservoirData.Flow <= _reservoirCMMFlowHighWarning)
  1092. {
  1093. FlowHighStatus = "Normal";
  1094. }
  1095. else if (ReservoirData.Flow > _reservoirCMMFlowHighError)
  1096. {
  1097. FlowHighStatus = "Error";
  1098. }
  1099. else
  1100. {
  1101. FlowHighStatus = "Warning";
  1102. }
  1103. //CMM Flow Low报警灯
  1104. if (ReservoirData.Flow >= _reservoirCMMFlowLowWarning)
  1105. {
  1106. FlowLowStatus = "Normal";
  1107. }
  1108. else if (ReservoirData.Flow < _reservoirCMMFlowLowError)
  1109. {
  1110. FlowLowStatus = "Error";
  1111. }
  1112. else
  1113. {
  1114. FlowLowStatus = "Warning";
  1115. }
  1116. //High Level报警灯
  1117. IsHighLevel = (ReservoirData.WaterLevel > _reservoirHighLevel) ? true : false;
  1118. //Low Level报警灯
  1119. IsLowLevel = (ReservoirData.WaterLevel < _reservoirLowLevel) ? true : false;
  1120. //HighSafety
  1121. IsHighSafety = ReservoirData.SafetyHighLevel;
  1122. //HedFlow管流
  1123. HEDFlowIsOn = (ReservoirData.HedFlow > 0) ? true : false;
  1124. //DIReplenFault
  1125. IsDiReplenFault = false;
  1126. IsError = State== "Error" ? true : false;
  1127. }
  1128. }
  1129. }
  1130. }
  1131. /// <summary>
  1132. /// 隐藏
  1133. /// </summary>
  1134. public void Hide()
  1135. {
  1136. if (_timer != null)
  1137. {
  1138. _timer.Stop();
  1139. }
  1140. }
  1141. }
  1142. }