GasPanelViewModel.cs 57 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454
  1. using Aitex.Core.Common.DeviceData;
  2. using Aitex.Core.RT.Log;
  3. using Aitex.Core.UI.ControlDataContext;
  4. using Aitex.Core.UI.MVVM;
  5. using Aitex.Core.Util;
  6. using FurnaceGasPanelUI.Models;
  7. using MECF.Framework.Common.DataCenter;
  8. using MECF.Framework.Common.OperationCenter;
  9. using MECF.Framework.UI.Core.Control;
  10. using MECF.Framework.UI.Core.ExtendedControls;
  11. using OpenSEMI.ClientBase;
  12. using System;
  13. using System.Collections.Generic;
  14. using System.Linq;
  15. using System.Windows;
  16. using System.Windows.Input;
  17. namespace FurnaceGasPanelUI.Views.Maintenances.ELK
  18. {
  19. public class GasPanelViewModel : ThermalGasPanelUIViewModelBase
  20. {
  21. public ICommand CmdSetMfcFlow { get; set; }
  22. public ICommand CmdSetMfmFlow { get; set; }
  23. public bool _ismanagerPermission = true;
  24. public Window WinOwner { get; set; }
  25. public bool IsManagerPermission
  26. {
  27. get
  28. {
  29. return _ismanagerPermission;
  30. }
  31. set
  32. {
  33. _ismanagerPermission = value;
  34. NotifyOfPropertyChange("IsManagerPermission");
  35. }
  36. }
  37. private bool _isRecipeEdit = false;
  38. private string backGroundStr = "#FFB0D1F1";
  39. public bool ManualEnable { get; set; } = true;
  40. public string ManualEnableColor
  41. {
  42. get
  43. {
  44. if (ManualEnable)
  45. {
  46. return "Green";
  47. }
  48. return backGroundStr;
  49. }
  50. }
  51. public void SwichManualEnable()
  52. {
  53. ManualEnable = true;
  54. }
  55. public void SwichMonitor()
  56. {
  57. ManualEnable = false;
  58. }
  59. public void SwichRecipe()
  60. {
  61. IsRecipeEdit = true;
  62. }
  63. public bool MonitorChecked { get; set; } = true;
  64. public bool ManualChecked { get; set; } = false;
  65. public bool IsRecipeEdit
  66. {
  67. get
  68. {
  69. return _isRecipeEdit;
  70. }
  71. set
  72. {
  73. _isRecipeEdit = value;
  74. NotifyOfPropertyChange("IsRecipeEdit");
  75. }
  76. }
  77. public bool EditTrue { get; set; } = false;
  78. [Subscription("PM1.SensorRecipeOK")]
  79. public AITSensorData SensorRecipeOK { get; set; }
  80. [Subscription("PM1.SensorPROCManualOK")]
  81. public AITSensorData SensorPROCManualOK { get; set; }
  82. [Subscription("System.VentValve.DeviceData")]
  83. public AITValveData VentValveData { get; set; }
  84. [Subscription("System.PumpValve.DeviceData")]
  85. public AITValveData PumpValveData { get; set; }
  86. [Subscription("PM1.SensorTubeATMPressure.DeviceData")]
  87. public AITSensorData SensorTubeATMPressure { get; set; }
  88. [Subscription("System.TubePressure.DeviceData")]
  89. public AITPressureMeterData TubePressureData { get; set; }
  90. [Subscription("PM1.SensorVAC1.Value")]
  91. public bool VAC1 { get; set; }
  92. [Subscription("PM1.SensorVAC2.Value")]
  93. public bool VAC2 { get; set; }
  94. [Subscription("PM1.SensorVAC3.Value")]
  95. public bool VAC3 { get; set; }
  96. [Subscription("PM1.SensorVAC4.Value")]
  97. public bool VAC4 { get; set; }
  98. [Subscription("PM1.SensorVAC5.Value")]
  99. public bool VAC5 { get; set; }
  100. [Subscription("PM1.SensorVAC6.Value")]
  101. public bool VAC6 { get; set; }
  102. [Subscription("PM1.SensorVAC7.Value")]
  103. public bool VAC7 { get; set; }
  104. [Subscription("PM1.SensorVAC8.Value")]
  105. public bool VAC8 { get; set; }
  106. [Subscription("PM1.SensorPS13LStatus.Value")]
  107. public bool VACATM { get; set; }
  108. [Subscription("PM1.SensorVACDEPOOK.Value")]
  109. public bool DEPOOK { get; set; }
  110. [Subscription("PM1.SensorVACHFOK.Value")]
  111. public bool HFClnOK { get; set; }
  112. [Subscription("PM1.SensorVACF2OK.Value")]
  113. public bool F2ClnOK { get; set; }
  114. #region Valves
  115. [Subscription("PM1.ValveAV1.DeviceData")] public AITValveData ValveAV1 { get; set; }
  116. [Subscription("PM1.ValveAV2.DeviceData")] public AITValveData ValveAV2 { get; set; }
  117. [Subscription("PM1.ValveAV3.DeviceData")] public AITValveData ValveAV3 { get; set; }
  118. [Subscription("PM1.ValveAV4.DeviceData")] public AITValveData ValveAV4 { get; set; }
  119. [Subscription("PM1.ValveAV5.DeviceData")] public AITValveData ValveAV5 { get; set; }
  120. [Subscription("PM1.ValveAV6.DeviceData")] public AITValveData ValveAV6 { get; set; }
  121. [Subscription("PM1.ValveAV7.DeviceData")] public AITValveData ValveAV7 { get; set; }
  122. [Subscription("PM1.ValveAV8.DeviceData")] public AITValveData ValveAV8 { get; set; }
  123. [Subscription("PM1.ValveAV9.DeviceData")] public AITValveData ValveAV9 { get; set; }
  124. [Subscription("PM1.ValveAV10.DeviceData")] public AITValveData ValveAV10 { get; set; }
  125. [Subscription("PM1.ValveAV11.DeviceData")] public AITValveData ValveAV11 { get; set; }
  126. [Subscription("PM1.ValveAV12.DeviceData")] public AITValveData ValveAV12 { get; set; }
  127. [Subscription("PM1.ValveAV13.DeviceData")] public AITValveData ValveAV13 { get; set; }
  128. [Subscription("PM1.ValveAV14.DeviceData")] public AITValveData ValveAV14 { get; set; }
  129. [Subscription("PM1.ValveAV15.DeviceData")] public AITValveData ValveAV15 { get; set; }
  130. [Subscription("PM1.ValveAV16.DeviceData")] public AITValveData ValveAV16 { get; set; }
  131. [Subscription("PM1.ValveAV17.DeviceData")] public AITValveData ValveAV17 { get; set; }
  132. [Subscription("PM1.ValveAV18.DeviceData")] public AITValveData ValveAV18 { get; set; }
  133. [Subscription("PM1.ValveAV19.DeviceData")] public AITValveData ValveAV19 { get; set; }
  134. [Subscription("PM1.ValveAV20.DeviceData")] public AITValveData ValveAV20 { get; set; }
  135. [Subscription("PM1.ValveAV21.DeviceData")] public AITValveData ValveAV21 { get; set; }
  136. [Subscription("PM1.ValveAV22.DeviceData")] public AITValveData ValveAV22 { get; set; }
  137. [Subscription("PM1.ValveAV23.DeviceData")] public AITValveData ValveAV23 { get; set; }
  138. [Subscription("PM1.ValveAV24.DeviceData")] public AITValveData ValveAV24 { get; set; }
  139. [Subscription("PM1.ValveAV25.DeviceData")] public AITValveData ValveAV25 { get; set; }
  140. [Subscription("PM1.ValveAV26.DeviceData")] public AITValveData ValveAV26 { get; set; }
  141. [Subscription("PM1.ValveAV27.DeviceData")] public AITValveData ValveAV27 { get; set; }
  142. [Subscription("PM1.ValveAV28.DeviceData")] public AITValveData ValveAV28 { get; set; }
  143. [Subscription("PM1.ValveAV29.DeviceData")] public AITValveData ValveAV29 { get; set; }
  144. [Subscription("PM1.ValveAV30.DeviceData")] public AITValveData ValveAV30 { get; set; }
  145. [Subscription("PM1.ValveAV31.DeviceData")] public AITValveData ValveAV31 { get; set; }
  146. [Subscription("PM1.ValveAV32.DeviceData")] public AITValveData ValveAV32 { get; set; }
  147. [Subscription("PM1.ValveAV33.DeviceData")] public AITValveData ValveAV33 { get; set; }
  148. [Subscription("PM1.ValveAV34.DeviceData")] public AITValveData ValveAV34 { get; set; }
  149. [Subscription("PM1.ValveAV35.DeviceData")] public AITValveData ValveAV35 { get; set; }
  150. [Subscription("PM1.ValveAV36.DeviceData")] public AITValveData ValveAV36 { get; set; }
  151. [Subscription("PM1.ValveAV37.DeviceData")] public AITValveData ValveAV37 { get; set; }
  152. [Subscription("PM1.ValveAV38.DeviceData")] public AITValveData ValveAV38 { get; set; }
  153. [Subscription("PM1.ValveAV39.DeviceData")] public AITValveData ValveAV39 { get; set; }
  154. [Subscription("PM1.ValveAV40.DeviceData")] public AITValveData ValveAV40 { get; set; }
  155. [Subscription("PM1.ValveAV41.DeviceData")] public AITValveData ValveAV41 { get; set; }
  156. [Subscription("PM1.ValveAV42.DeviceData")] public AITValveData ValveAV42 { get; set; }
  157. [Subscription("PM1.ValveAV43.DeviceData")] public AITValveData ValveAV43 { get; set; }
  158. [Subscription("PM1.ValveAV44.DeviceData")] public AITValveData ValveAV44 { get; set; }
  159. [Subscription("PM1.ValveAV45.DeviceData")] public AITValveData ValveAV45 { get; set; }
  160. [Subscription("PM1.ValveAV46.DeviceData")] public AITValveData ValveAV46 { get; set; }
  161. [Subscription("PM1.ValveAV47.DeviceData")] public AITValveData ValveAV47 { get; set; }
  162. [Subscription("PM1.ValveAV48.DeviceData")] public AITValveData ValveAV48 { get; set; }
  163. [Subscription("PM1.ValveAV49.DeviceData")] public AITValveData ValveAV49 { get; set; }
  164. [Subscription("PM1.ValveAV50.DeviceData")] public AITValveData ValveAV50 { get; set; }
  165. [Subscription("PM1.ValveAV51.DeviceData")] public AITValveData ValveAV51 { get; set; }
  166. [Subscription("PM1.ValveAV52.DeviceData")] public AITValveData ValveAV52 { get; set; }
  167. [Subscription("PM1.ValveAV53.DeviceData")] public AITValveData ValveAV53 { get; set; }
  168. [Subscription("PM1.ValveAV54.DeviceData")] public AITValveData ValveAV54 { get; set; }
  169. [Subscription("PM1.ValveAV55.DeviceData")] public AITValveData ValveAV55 { get; set; }
  170. [Subscription("PM1.ValveAV56.DeviceData")] public AITValveData ValveAV56 { get; set; }
  171. [Subscription("PM1.ValveAV57.DeviceData")] public AITValveData ValveAV57 { get; set; }
  172. [Subscription("PM1.ValveAV58.DeviceData")] public AITValveData ValveAV58 { get; set; }
  173. [Subscription("PM1.ValveAV59.DeviceData")] public AITValveData ValveAV59 { get; set; }
  174. [Subscription("PM1.ValveAV60.DeviceData")] public AITValveData ValveAV60 { get; set; }
  175. [Subscription("PM1.ValveAV61.DeviceData")] public AITValveData ValveAV61 { get; set; }
  176. [Subscription("PM1.ValveAV62.DeviceData")] public AITValveData ValveAV62 { get; set; }
  177. [Subscription("PM1.ValveAV65.DeviceData")] public AITValveData ValveAV65 { get; set; }
  178. [Subscription("PM1.ValveAV66.DeviceData")] public AITValveData ValveAV66 { get; set; }
  179. [Subscription("PM1.ValveAV67.DeviceData")] public AITValveData ValveAV67 { get; set; }
  180. [Subscription("PM1.ValveAV68.DeviceData")] public AITValveData ValveAV68 { get; set; }
  181. [Subscription("PM1.ValveAV69.DeviceData")] public AITValveData ValveAV69 { get; set; }
  182. [Subscription("PM1.ValveAV70.DeviceData")] public AITValveData ValveAV70 { get; set; }
  183. [Subscription("PM1.APC.ModeFeedback")]
  184. public int APCModeFeedback { get; set; }
  185. [Subscription("PM1.ValveAV71.DeviceData")] public AITValveData ValveAV71Data { get; set; }
  186. public AITValveData ValveAV71
  187. {
  188. get
  189. {
  190. return new AITValveData()
  191. {
  192. DeviceName = ValveAV71Data.DeviceName,
  193. DisplayName = ValveAV71Data.DisplayName,
  194. UniqueName = ValveAV71Data.UniqueName,
  195. DefaultValue = ValveAV71Data.DefaultValue,
  196. SetPoint = ValveAV71Data.SetPoint,
  197. Feedback = APCModeFeedback != 5,
  198. ILKDiValue = ValveAV71Data.ILKDiValue,
  199. VirtualFeedback = ValveAV71Data.VirtualFeedback
  200. };
  201. }
  202. }
  203. [Subscription("PM1.ValveAV72.DeviceData")] public AITValveData ValveAV72 { get; set; }
  204. [Subscription("PM1.ValveAV73.DeviceData")] public AITValveData ValveAV73 { get; set; }
  205. [Subscription("PM1.ValveAV74.DeviceData")] public AITValveData ValveAV74 { get; set; }
  206. [Subscription("PM1.ValveAV75.DeviceData")] public AITValveData ValveAV75 { get; set; }
  207. [Subscription("PM1.ValveAV76.DeviceData")] public AITValveData ValveAV76 { get; set; }
  208. [Subscription("PM1.ValveAV77.DeviceData")] public AITValveData ValveAV77 { get; set; }
  209. [Subscription("PM1.ValveAV78.DeviceData")] public AITValveData ValveAV78 { get; set; }
  210. [Subscription("PM1.ValveAV79.DeviceData")] public AITValveData ValveAV79 { get; set; }
  211. [Subscription("PM1.ValveAV80.DeviceData")] public AITValveData ValveAV80 { get; set; }
  212. [Subscription("PM1.ValveAV81.DeviceData")] public AITValveData ValveAV81 { get; set; }
  213. [Subscription("PM1.ValveAV82.DeviceData")] public AITValveData ValveAV82 { get; set; }
  214. [Subscription("PM1.ValveAV83.DeviceData")] public AITValveData ValveAV83 { get; set; }
  215. [Subscription("PM1.ValveAV84.DeviceData")] public AITValveData ValveAV84 { get; set; }
  216. [Subscription("PM1.ValveAV85.DeviceData")] public AITValveData ValveAV85 { get; set; }
  217. [Subscription("PM1.ValveAV86.DeviceData")] public AITValveData ValveAV86 { get; set; }
  218. [Subscription("PM1.ValveAV87.DeviceData")] public AITValveData ValveAV87 { get; set; }
  219. [Subscription("PM1.ValveAV88.DeviceData")] public AITValveData ValveAV88 { get; set; }
  220. [Subscription("PM1.ValveAV89.DeviceData")] public AITValveData ValveAV89 { get; set; }
  221. [Subscription("PM1.ValveAV90.DeviceData")] public AITValveData ValveAV90 { get; set; }
  222. [Subscription("PM1.ValveAV91.DeviceData")] public AITValveData ValveAV91 { get; set; }
  223. [Subscription("PM1.ValveAV92.DeviceData")] public AITValveData ValveAV92 { get; set; }
  224. [Subscription("PM1.ValveAV93.DeviceData")] public AITValveData ValveAV93 { get; set; }
  225. [Subscription("PM1.ValveAV94.DeviceData")] public AITValveData ValveAV94 { get; set; }
  226. [Subscription("PM1.ValveAV95.DeviceData")] public AITValveData ValveAV95 { get; set; }
  227. [Subscription("PM1.ValveAV96.DeviceData")] public AITValveData ValveAV96 { get; set; }
  228. [Subscription("PM1.ValveAV97.DeviceData")] public AITValveData ValveAV97 { get; set; }
  229. [Subscription("PM1.ValveAV98.DeviceData")] public AITValveData ValveAV98 { get; set; }
  230. [Subscription("PM1.ValveAV99.DeviceData")] public AITValveData ValveAV99 { get; set; }
  231. [Subscription("PM1.ValveAV100.DeviceData")] public AITValveData ValveAV100 { get; set; }
  232. [Subscription("PM1.ValveAV101.DeviceData")] public AITValveData ValveAV101 { get; set; }
  233. [Subscription("PM1.ValveAV102.DeviceData")] public AITValveData ValveAV102 { get; set; }
  234. [Subscription("PM1.ValveAV103.DeviceData")] public AITValveData ValveAV103 { get; set; }
  235. [Subscription("PM1.ValveAV104.DeviceData")] public AITValveData ValveAV104 { get; set; }
  236. [Subscription("PM1.ValveAV105.DeviceData")] public AITValveData ValveAV105 { get; set; }
  237. [Subscription("PM1.ValveAV106.DeviceData")] public AITValveData ValveAV106 { get; set; }
  238. [Subscription("PM1.ValveAV107.DeviceData")] public AITValveData ValveAV107 { get; set; }
  239. [Subscription("PM1.ValveAV108.DeviceData")] public AITValveData ValveAV108 { get; set; }
  240. [Subscription("PM1.ValveAV109.DeviceData")] public AITValveData ValveAV109 { get; set; }
  241. [Subscription("PM1.ValveAV110.DeviceData")] public AITValveData ValveAV110 { get; set; }
  242. [Subscription("PM1.ValveAV111.DeviceData")] public AITValveData ValveAV111 { get; set; }
  243. [Subscription("PM1.ValveAV112.DeviceData")] public AITValveData ValveAV112 { get; set; }
  244. [Subscription("PM1.ValveAV113.DeviceData")] public AITValveData ValveAV113 { get; set; }
  245. [Subscription("PM1.ValveAV114.DeviceData")] public AITValveData ValveAV114 { get; set; }
  246. [Subscription("PM1.ValveAV115.DeviceData")] public AITValveData ValveAV115 { get; set; }
  247. [Subscription("PM1.ValveAV116.DeviceData")] public AITValveData ValveAV116 { get; set; }
  248. [Subscription("PM1.ValveAV117.DeviceData")] public AITValveData ValveAV117 { get; set; }
  249. [Subscription("PM1.ValveAV118.DeviceData")] public AITValveData ValveAV118 { get; set; }
  250. [Subscription("PM1.ValveAV119.DeviceData")] public AITValveData ValveAV119 { get; set; }
  251. [Subscription("PM1.ValveAV120.DeviceData")] public AITValveData ValveAV120 { get; set; }
  252. [Subscription("PM1.ValveAV121.DeviceData")] public AITValveData ValveAV121 { get; set; }
  253. [Subscription("PM1.ValveAV122.DeviceData")] public AITValveData ValveAV122 { get; set; }
  254. [Subscription("PM1.ValveAV123.DeviceData")] public AITValveData ValveAV123 { get; set; }
  255. [Subscription("PM1.ValveAV124.DeviceData")] public AITValveData ValveAV124 { get; set; }
  256. [Subscription("PM1.ValveAV125.DeviceData")] public AITValveData ValveAV125 { get; set; }
  257. [Subscription("PM1.ValveAV126.DeviceData")] public AITValveData ValveAV126 { get; set; }
  258. [Subscription("PM1.ValveAV127.DeviceData")] public AITValveData ValveAV127 { get; set; }
  259. [Subscription("PM1.ValveAV128.DeviceData")] public AITValveData ValveAV128 { get; set; }
  260. [Subscription("PM1.ValveAV129.DeviceData")] public AITValveData ValveAV129 { get; set; }
  261. [Subscription("PM1.ValveAV130.DeviceData")] public AITValveData ValveAV130 { get; set; }
  262. [Subscription("PM1.ValveAV131.DeviceData")] public AITValveData ValveAV131 { get; set; }
  263. [Subscription("PM1.ValveAV132.DeviceData")] public AITValveData ValveAV132 { get; set; }
  264. [Subscription("PM1.ValveAV133.DeviceData")] public AITValveData ValveAV133 { get; set; }
  265. [Subscription("PM1.ValveAV134.DeviceData")] public AITValveData ValveAV134 { get; set; }
  266. [Subscription("PM1.ValveAV135.DeviceData")] public AITValveData ValveAV135 { get; set; }
  267. [Subscription("PM1.ValveAV136.DeviceData")] public AITValveData ValveAV136 { get; set; }
  268. [Subscription("PM1.ValveAV91.DeviceData")]
  269. public AITValveData ValveDPR { get; set; }
  270. public string ValveDPRBrush
  271. {
  272. get
  273. {
  274. if (ValveDPR != null && ValveDPR.Feedback)
  275. {
  276. return "Green";
  277. }
  278. return backGroundStr;
  279. }
  280. }
  281. [Subscription("PM1.ValveBlowerPowerOn.DeviceData")]
  282. public AITValveData ValveBWR { get; set; }
  283. public string ValveBWRBrush
  284. {
  285. get
  286. {
  287. if (ValveBWR != null && ValveBWR.Feedback)
  288. {
  289. return "Green";
  290. }
  291. return backGroundStr;
  292. }
  293. }
  294. [Subscription("PM1.IsCEXHOn")]
  295. public bool IsCEXHOn { get; set; }
  296. public string CEXHBrush
  297. {
  298. get
  299. {
  300. if (IsCEXHOn)
  301. {
  302. return "Green";
  303. }
  304. return backGroundStr;
  305. }
  306. }
  307. [Subscription("PM1.IsF2ClnOn")]
  308. public bool IsF2ClnOn { get; set; }
  309. public string F2ClnBrush
  310. {
  311. get
  312. {
  313. if (IsF2ClnOn)
  314. {
  315. return "Green";
  316. }
  317. return backGroundStr;
  318. }
  319. }
  320. [Subscription("PM1.IsHFClnOn")]
  321. public bool IsHFClnOn { get; set; }
  322. public string HFClnBrush
  323. {
  324. get
  325. {
  326. if (IsHFClnOn)
  327. {
  328. return "Green";
  329. }
  330. return backGroundStr;
  331. }
  332. }
  333. [Subscription("PM1.IsDEPOOn")]
  334. public bool IsDEPOOn { get; set; }
  335. public string DEPOBrush
  336. {
  337. get
  338. {
  339. if (IsDEPOOn)
  340. {
  341. return "Green";
  342. }
  343. return backGroundStr;
  344. }
  345. }
  346. [Subscription("PM1.HTR1Enable")]
  347. public bool IsHTR1Enable { get; set; }
  348. public string HTR1Brush
  349. {
  350. get
  351. {
  352. if (IsHTR1Enable)
  353. {
  354. return "Green";
  355. }
  356. return backGroundStr;
  357. }
  358. }
  359. [Subscription("PM1.HTR2Enable")]
  360. public bool IsHTR2Enable { get; set; }
  361. public string HTR2Brush
  362. {
  363. get
  364. {
  365. if (IsHTR2Enable)
  366. {
  367. return "Green";
  368. }
  369. return backGroundStr;
  370. }
  371. }
  372. [Subscription("PM1.HTR3Enable")]
  373. public bool IsHTR3Enable { get; set; }
  374. public string HTR3Brush
  375. {
  376. get
  377. {
  378. if (IsHTR3Enable)
  379. {
  380. return "Green";
  381. }
  382. return backGroundStr;
  383. }
  384. }
  385. [Subscription("PM1.AUCPump.DeviceData")]
  386. public AITValveData AUCPump { get; set; }
  387. public string AUCPumpBrush
  388. {
  389. get
  390. {
  391. if (AUCPump != null && AUCPump.Feedback)
  392. {
  393. return "Green";
  394. }
  395. return backGroundStr;
  396. }
  397. }
  398. [Subscription("PM1.BothPump1.DeviceData")]
  399. public AITValveData BothPump1 { get; set; }
  400. public string BothPump1Brush
  401. {
  402. get
  403. {
  404. if (BothPump1 != null && BothPump1.Feedback)
  405. {
  406. return "Green";
  407. }
  408. return backGroundStr;
  409. }
  410. }
  411. [Subscription("PM1.BothPump2.DeviceData")]
  412. public AITValveData BothPump2 { get; set; }
  413. public string BothPump2Brush
  414. {
  415. get
  416. {
  417. if (BothPump2 != null && BothPump2.Feedback)
  418. {
  419. return "Green";
  420. }
  421. return backGroundStr;
  422. }
  423. }
  424. [Subscription("PM1.AGVPump.DeviceData")]
  425. public AITValveData AGVPump { get; set; }
  426. public string AGVPumpBrush
  427. {
  428. get
  429. {
  430. if (AGVPump != null && AGVPump.Feedback)
  431. {
  432. return "Green";
  433. }
  434. return backGroundStr;
  435. }
  436. }
  437. [Subscription("PM1.IsCREFOn")]
  438. public bool IsCREFOn { get; set; }
  439. public string CREFBrush
  440. {
  441. get
  442. {
  443. if (IsCREFOn)
  444. {
  445. return "Green";
  446. }
  447. return "#FFB0D1F1";
  448. }
  449. }
  450. [Subscription("PM1.IsSIREFOn")]
  451. public bool IsSIREFOn { get; set; }
  452. public string SIREFBrush
  453. {
  454. get
  455. {
  456. if (IsSIREFOn)
  457. {
  458. return "Green";
  459. }
  460. return "#FFB0D1F1";
  461. }
  462. }
  463. #endregion
  464. #region MFCs
  465. [Subscription("PM1.MFC1.DeviceData")]
  466. public AITMfcData MFC1Data { get; set; }
  467. [Subscription("PM1.MFC2.DeviceData")]
  468. public AITMfcData MFC2Data { get; set; }
  469. [Subscription("PM1.MFC3.DeviceData")]
  470. public AITMfcData MFC3Data { get; set; }
  471. [Subscription("PM1.MFC4.DeviceData")]
  472. public AITMfcData MFC4Data { get; set; }
  473. [Subscription("PM1.MFC5.DeviceData")]
  474. public AITMfcData MFC5Data { get; set; }
  475. [Subscription("PM1.MFC6.DeviceData")]
  476. public AITMfcData MFC6Data { get; set; }
  477. [Subscription("PM1.MFC7.DeviceData")]
  478. public AITMfcData MFC7Data { get; set; }
  479. [Subscription("PM1.MFC8.DeviceData")]
  480. public AITMfcData MFC8Data { get; set; }
  481. [Subscription("PM1.MFC9.DeviceData")]
  482. public AITMfcData MFC9Data { get; set; }
  483. [Subscription("PM1.MFC10.DeviceData")]
  484. public AITMfcData MFC10Data { get; set; }
  485. [Subscription("PM1.MFC11.DeviceData")]
  486. public AITMfcData MFC11Data { get; set; }
  487. [Subscription("PM1.MFC12.DeviceData")]
  488. public AITMfcData MFC12Data { get; set; }
  489. [Subscription("PM1.MFC13.DeviceData")]
  490. public AITMfcData MFC13Data { get; set; }
  491. [Subscription("PM1.MFC16.DeviceData")]
  492. public AITMfcData MFC16Data { get; set; }
  493. [Subscription("PM1.MFC17.DeviceData")]
  494. public AITMfcData MFC17Data { get; set; }
  495. [Subscription("PM1.MFC31.DeviceData")]
  496. public AITMfcData MFC31Data { get; set; }
  497. [Subscription("PM1.MFC32.DeviceData")]
  498. public AITMfcData MFC32Data { get; set; }
  499. #endregion
  500. [Subscription("PM1.MFM6.DeviceData")]
  501. public AITWaterFlowMeterData MFM6Flow { get; set; }
  502. [Subscription("PM1.MFM7.DeviceData")]
  503. public AITWaterFlowMeterData MFM7Flow { get; set; }
  504. [Subscription("PM1.MFM8.DeviceData")]
  505. public AITWaterFlowMeterData MFM8Flow { get; set; }
  506. [Subscription("PM1.MFM9.DeviceData")]
  507. public AITWaterFlowMeterData MFM9Flow { get; set; }
  508. [Subscription("PM1.MFM11.DeviceData")]
  509. public AITWaterFlowMeterData MFM11Flow { get; set; }
  510. [Subscription("PM1.MFM12.DeviceData")]
  511. public AITWaterFlowMeterData MFM12Flow { get; set; }
  512. [Subscription("PM1.MFM13.DeviceData")]
  513. public AITWaterFlowMeterData MFM13Flow { get; set; }
  514. [Subscription("PM1.MFM16.DeviceData")]
  515. public AITWaterFlowMeterData MFM16Flow { get; set; }
  516. [Subscription("PM1.RfPower.IsPowerOn")]
  517. public bool IsPowerOn { get; set; }
  518. [Subscription("PM1.RfPower.PowerSetPoint")]
  519. public float PowerSetPoint { get; set; }
  520. [Subscription("PM1.RfPower.ForwardPower")]
  521. public float ForwardPower { get; set; }
  522. [Subscription("PM1.RfMatch.Capacitance1PositionFeedBack")]
  523. public float Capacitance1PositionFeedBack { get; set; }
  524. [Subscription("PM1.RfMatch.Capacitance2PositionFeedBack")]
  525. public float Capacitance2PositionFeedBack { get; set; }
  526. [Subscription("PM1.RfMatch.VppFeedBack")]
  527. public float VppFeedBack { get; set; }
  528. public ICommand CmdSetValve { get; set; }
  529. private GasPanelStateType _selectedGasStateType = GasPanelStateType.Monitor;
  530. public GasPanelStateType SelectedGasStateType
  531. {
  532. get
  533. {
  534. return _selectedGasStateType;
  535. }
  536. set
  537. {
  538. _selectedGasStateType = value;
  539. NotifyOfPropertyChange(nameof(SelectedGasStateType));
  540. }
  541. }
  542. public AnalogDeviceDataItem MFC1
  543. {
  544. get
  545. {
  546. return new AnalogDeviceDataItem
  547. {
  548. Type = "MFC",
  549. DeviceName = MFC1Data.UniqueName,
  550. DeviceId = MFC1Data.DeviceSchematicId,
  551. DisplayName = MFC1Data.DisplayName,
  552. Scale = MFC1Data.Scale,
  553. Unit = MFC1Data.Unit,
  554. FeedBack = MFC1Data.FeedBack,
  555. SetPoint = MFC1Data.SetPoint,
  556. VirtualFeedBack = MFC1Data.VirtualFeedBack
  557. };
  558. }
  559. }
  560. public AnalogDeviceDataItem MFC2
  561. {
  562. get
  563. {
  564. return new AnalogDeviceDataItem
  565. {
  566. Type = "MFC",
  567. DeviceName = MFC2Data.UniqueName,
  568. DeviceId = MFC2Data.DeviceSchematicId,
  569. DisplayName = MFC2Data.DisplayName,
  570. Scale = MFC2Data.Scale,
  571. Unit = MFC2Data.Unit,
  572. FeedBack = MFC2Data.FeedBack,
  573. SetPoint = MFC2Data.SetPoint,
  574. VirtualFeedBack = MFC2Data.VirtualFeedBack
  575. };
  576. }
  577. }
  578. public AnalogDeviceDataItem MFC3
  579. {
  580. get
  581. {
  582. return new AnalogDeviceDataItem
  583. {
  584. Type = "MFC",
  585. DeviceName = MFC3Data.UniqueName,
  586. DeviceId = MFC3Data.DeviceSchematicId,
  587. DisplayName = MFC3Data.DisplayName,
  588. Scale = MFC3Data.Scale,
  589. Unit = MFC3Data.Unit,
  590. FeedBack = MFC3Data.FeedBack,
  591. SetPoint = MFC3Data.SetPoint,
  592. VirtualFeedBack = MFC3Data.VirtualFeedBack
  593. };
  594. }
  595. }
  596. public AnalogDeviceDataItem MFC4
  597. {
  598. get
  599. {
  600. return new AnalogDeviceDataItem
  601. {
  602. Type = "MFC",
  603. DeviceName = MFC4Data.UniqueName,
  604. DeviceId = MFC4Data.DeviceSchematicId,
  605. DisplayName = MFC4Data.DisplayName,
  606. Scale = MFC4Data.Scale,
  607. Unit = MFC4Data.Unit,
  608. FeedBack = MFC4Data.FeedBack,
  609. SetPoint = MFC4Data.SetPoint,
  610. VirtualFeedBack = MFC4Data.VirtualFeedBack
  611. };
  612. }
  613. }
  614. public AnalogDeviceDataItem MFC5
  615. {
  616. get
  617. {
  618. return new AnalogDeviceDataItem
  619. {
  620. Type = "MFC",
  621. DeviceName = MFC5Data.UniqueName,
  622. DeviceId = MFC5Data.DeviceSchematicId,
  623. DisplayName = MFC5Data.DisplayName,
  624. Scale = MFC5Data.Scale,
  625. Unit = MFC5Data.Unit,
  626. FeedBack = MFC5Data.FeedBack,
  627. SetPoint = MFC5Data.SetPoint,
  628. VirtualFeedBack = MFC5Data.VirtualFeedBack
  629. };
  630. }
  631. }
  632. public AnalogDeviceDataItem MFC6
  633. {
  634. get
  635. {
  636. return new AnalogDeviceDataItem
  637. {
  638. Type = "MFC",
  639. DeviceName = MFC6Data.UniqueName,
  640. DeviceId = MFC6Data.DeviceSchematicId,
  641. DisplayName = MFC6Data.DisplayName,
  642. Scale = MFC6Data.Scale,
  643. Unit = MFC6Data.Unit,
  644. FeedBack = MFC6Data.FeedBack,
  645. SetPoint = MFC6Data.SetPoint,
  646. VirtualFeedBack = MFC6Data.VirtualFeedBack
  647. };
  648. }
  649. }
  650. public AnalogDeviceDataItem MFC7
  651. {
  652. get
  653. {
  654. return new AnalogDeviceDataItem
  655. {
  656. Type = "MFC",
  657. DeviceName = MFC7Data.UniqueName,
  658. DeviceId = MFC7Data.DeviceSchematicId,
  659. DisplayName = MFC7Data.DisplayName,
  660. Scale = MFC7Data.Scale,
  661. Unit = MFC7Data.Unit,
  662. FeedBack = MFC7Data.FeedBack,
  663. SetPoint = MFC7Data.SetPoint,
  664. VirtualFeedBack = MFC7Data.VirtualFeedBack
  665. };
  666. }
  667. }
  668. public AnalogDeviceDataItem MFC8
  669. {
  670. get
  671. {
  672. return new AnalogDeviceDataItem
  673. {
  674. Type = "MFC",
  675. DeviceName = MFC8Data.UniqueName,
  676. DeviceId = MFC8Data.DeviceSchematicId,
  677. DisplayName = MFC8Data.DisplayName,
  678. Scale = MFC8Data.Scale,
  679. Unit = MFC8Data.Unit,
  680. FeedBack = MFC8Data.FeedBack,
  681. SetPoint = MFC8Data.SetPoint,
  682. VirtualFeedBack = MFC8Data.VirtualFeedBack
  683. };
  684. }
  685. }
  686. public AnalogDeviceDataItem MFC9
  687. {
  688. get
  689. {
  690. return new AnalogDeviceDataItem
  691. {
  692. Type = "MFC",
  693. DeviceName = MFC9Data.UniqueName,
  694. DeviceId = MFC9Data.DeviceSchematicId,
  695. DisplayName = MFC9Data.DisplayName,
  696. Scale = MFC9Data.Scale,
  697. Unit = MFC9Data.Unit,
  698. FeedBack = MFC9Data.FeedBack,
  699. SetPoint = MFC9Data.SetPoint,
  700. VirtualFeedBack = MFC9Data.VirtualFeedBack
  701. };
  702. }
  703. }
  704. public AnalogDeviceDataItem MFC10
  705. {
  706. get
  707. {
  708. return new AnalogDeviceDataItem
  709. {
  710. Type = "MFC",
  711. DeviceName = MFC10Data.UniqueName,
  712. DeviceId = MFC10Data.DeviceSchematicId,
  713. DisplayName = MFC10Data.DisplayName,
  714. Scale = MFC10Data.Scale,
  715. Unit = MFC10Data.Unit,
  716. FeedBack = MFC10Data.FeedBack,
  717. SetPoint = MFC10Data.SetPoint,
  718. VirtualFeedBack = MFC10Data.VirtualFeedBack
  719. };
  720. }
  721. }
  722. public AnalogDeviceDataItem MFC11
  723. {
  724. get
  725. {
  726. return new AnalogDeviceDataItem
  727. {
  728. Type = "MFC",
  729. DeviceName = MFC11Data.UniqueName,
  730. DeviceId = MFC11Data.DeviceSchematicId,
  731. DisplayName = MFC11Data.DisplayName,
  732. Scale = MFC11Data.Scale,
  733. Unit = MFC11Data.Unit,
  734. FeedBack = MFC11Data.FeedBack,
  735. SetPoint = MFC11Data.SetPoint,
  736. VirtualFeedBack = MFC11Data.VirtualFeedBack
  737. };
  738. }
  739. }
  740. public AnalogDeviceDataItem MFC12
  741. {
  742. get
  743. {
  744. return new AnalogDeviceDataItem
  745. {
  746. Type = "MFC",
  747. DeviceName = MFC12Data.UniqueName,
  748. DeviceId = MFC12Data.DeviceSchematicId,
  749. DisplayName = MFC12Data.DisplayName,
  750. Scale = MFC12Data.Scale,
  751. Unit = MFC12Data.Unit,
  752. FeedBack = MFC12Data.FeedBack,
  753. SetPoint = MFC12Data.SetPoint,
  754. VirtualFeedBack = MFC12Data.VirtualFeedBack
  755. };
  756. }
  757. }
  758. public AnalogDeviceDataItem MFC13
  759. {
  760. get
  761. {
  762. return new AnalogDeviceDataItem
  763. {
  764. Type = "MFC",
  765. DeviceName = MFC13Data.UniqueName,
  766. DeviceId = MFC13Data.DeviceSchematicId,
  767. DisplayName = MFC13Data.DisplayName,
  768. Scale = MFC13Data.Scale,
  769. Unit = MFC13Data.Unit,
  770. FeedBack = MFC13Data.FeedBack,
  771. SetPoint = MFC13Data.SetPoint,
  772. VirtualFeedBack = MFC13Data.VirtualFeedBack
  773. };
  774. }
  775. }
  776. public AnalogDeviceDataItem MFC16
  777. {
  778. get
  779. {
  780. return new AnalogDeviceDataItem
  781. {
  782. Type = "MFC",
  783. DeviceName = MFC16Data.UniqueName,
  784. DeviceId = MFC16Data.DeviceSchematicId,
  785. DisplayName = MFC16Data.DisplayName,
  786. Scale = MFC16Data.Scale,
  787. Unit = MFC16Data.Unit,
  788. FeedBack = MFC16Data.FeedBack,
  789. SetPoint = MFC16Data.SetPoint,
  790. VirtualFeedBack = MFC16Data.VirtualFeedBack
  791. };
  792. }
  793. }
  794. public AnalogDeviceDataItem MFC17
  795. {
  796. get
  797. {
  798. return new AnalogDeviceDataItem
  799. {
  800. Type = "MFC",
  801. DeviceName = MFC17Data.UniqueName,
  802. DeviceId = MFC17Data.DeviceSchematicId,
  803. DisplayName = MFC17Data.DisplayName,
  804. Scale = MFC17Data.Scale,
  805. Unit = MFC17Data.Unit,
  806. FeedBack = MFC17Data.FeedBack,
  807. SetPoint = MFC17Data.SetPoint,
  808. VirtualFeedBack = MFC17Data.VirtualFeedBack
  809. };
  810. }
  811. }
  812. public AnalogDeviceDataItem MFC31
  813. {
  814. get
  815. {
  816. return new AnalogDeviceDataItem
  817. {
  818. Type = "MFC",
  819. DeviceName = MFC31Data.UniqueName,
  820. DeviceId = MFC31Data.DeviceSchematicId,
  821. DisplayName = MFC31Data.DisplayName,
  822. Scale = MFC31Data.Scale,
  823. Unit = MFC31Data.Unit,
  824. FeedBack = MFC31Data.FeedBack,
  825. SetPoint = MFC31Data.SetPoint,
  826. VirtualFeedBack = MFC31Data.VirtualFeedBack
  827. };
  828. }
  829. }
  830. public AnalogDeviceDataItem MFC32
  831. {
  832. get
  833. {
  834. return new AnalogDeviceDataItem
  835. {
  836. Type = "MFC",
  837. DeviceName = MFC32Data.UniqueName,
  838. DeviceId = MFC32Data.DeviceSchematicId,
  839. DisplayName = MFC32Data.DisplayName,
  840. Scale = MFC32Data.Scale,
  841. Unit = MFC32Data.Unit,
  842. FeedBack = MFC32Data.FeedBack,
  843. SetPoint = MFC32Data.SetPoint,
  844. VirtualFeedBack = MFC32Data.VirtualFeedBack
  845. };
  846. }
  847. }
  848. public AnalogDeviceDataItem MFM6
  849. {
  850. get
  851. {
  852. return new AnalogDeviceDataItem
  853. {
  854. Type = "MFM",
  855. DeviceName = MFM6Flow.DisplayName,
  856. DeviceId = MFM6Flow.DeviceSchematicId,
  857. DisplayName = MFM6Flow.DisplayName,
  858. Scale = MFM6Flow.Scale,
  859. Unit = MFM6Flow.Unit,
  860. FeedBack = MFM6Flow.FeedBack,
  861. SetPoint = MFM6Flow.SetPoint,
  862. };
  863. }
  864. }
  865. public AnalogDeviceDataItem MFM7
  866. {
  867. get
  868. {
  869. return new AnalogDeviceDataItem
  870. {
  871. Type = "MFM",
  872. DeviceName = MFM7Flow.DisplayName,
  873. DeviceId = MFM7Flow.DeviceSchematicId,
  874. DisplayName = MFM7Flow.DisplayName,
  875. Scale = MFM7Flow.Scale,
  876. Unit = MFM7Flow.Unit,
  877. FeedBack = MFM7Flow.FeedBack,
  878. SetPoint = MFM7Flow.SetPoint,
  879. };
  880. }
  881. }
  882. public AnalogDeviceDataItem MFM8
  883. {
  884. get
  885. {
  886. return new AnalogDeviceDataItem
  887. {
  888. Type = "MFM",
  889. DeviceName = MFM8Flow.DisplayName,
  890. DeviceId = MFM8Flow.DeviceSchematicId,
  891. DisplayName = MFM8Flow.DisplayName,
  892. Scale = MFM8Flow.Scale,
  893. Unit = MFM8Flow.Unit,
  894. FeedBack = MFM8Flow.FeedBack,
  895. SetPoint = MFM8Flow.SetPoint,
  896. };
  897. }
  898. }
  899. public AnalogDeviceDataItem MFM9
  900. {
  901. get
  902. {
  903. return new AnalogDeviceDataItem
  904. {
  905. Type = "MFM",
  906. DeviceName = MFM9Flow.DisplayName,
  907. DeviceId = MFM9Flow.DeviceSchematicId,
  908. DisplayName = MFM9Flow.DisplayName,
  909. Scale = MFM9Flow.Scale,
  910. Unit = MFM9Flow.Unit,
  911. FeedBack = MFM9Flow.FeedBack,
  912. SetPoint = MFM9Flow.SetPoint,
  913. };
  914. }
  915. }
  916. public AnalogDeviceDataItem MFM11
  917. {
  918. get
  919. {
  920. return new AnalogDeviceDataItem
  921. {
  922. Type = "MFM",
  923. DeviceName = MFM11Flow.DisplayName,
  924. DeviceId = MFM11Flow.DeviceSchematicId,
  925. DisplayName = MFM11Flow.DisplayName,
  926. Scale = MFM11Flow.Scale,
  927. Unit = MFM11Flow.Unit,
  928. FeedBack = MFM11Flow.FeedBack,
  929. SetPoint = MFM11Flow.SetPoint,
  930. };
  931. }
  932. }
  933. public AnalogDeviceDataItem MFM12
  934. {
  935. get
  936. {
  937. return new AnalogDeviceDataItem
  938. {
  939. Type = "MFM",
  940. DeviceName = MFM12Flow.DisplayName,
  941. DeviceId = MFM12Flow.DeviceSchematicId,
  942. DisplayName = MFM12Flow.DisplayName,
  943. Scale = MFM12Flow.Scale,
  944. Unit = MFM12Flow.Unit,
  945. FeedBack = MFM12Flow.FeedBack,
  946. SetPoint = MFM12Flow.SetPoint,
  947. };
  948. }
  949. }
  950. public AnalogDeviceDataItem MFM13
  951. {
  952. get
  953. {
  954. return new AnalogDeviceDataItem
  955. {
  956. Type = "MFM",
  957. DeviceName = MFM13Flow.DisplayName,
  958. DeviceId = MFM13Flow.DeviceSchematicId,
  959. DisplayName = MFM13Flow.DisplayName,
  960. Scale = MFM13Flow.Scale,
  961. Unit = MFM13Flow.Unit,
  962. FeedBack = MFM13Flow.FeedBack,
  963. SetPoint = MFM13Flow.SetPoint,
  964. };
  965. }
  966. }
  967. public AnalogDeviceDataItem MFM16
  968. {
  969. get
  970. {
  971. return new AnalogDeviceDataItem
  972. {
  973. Type = "MFM",
  974. DeviceName = MFM16Flow.DisplayName,
  975. DeviceId = MFM16Flow.DeviceSchematicId,
  976. DisplayName = MFM16Flow.DisplayName,
  977. Scale = MFM16Flow.Scale,
  978. Unit = MFM16Flow.Unit,
  979. FeedBack = MFM16Flow.FeedBack,
  980. SetPoint = MFM16Flow.SetPoint,
  981. };
  982. }
  983. }
  984. public string IsRfPowerOn
  985. {
  986. get
  987. {
  988. return IsPowerOn ? "On" : "Off";
  989. }
  990. }
  991. private bool _manualCheckSelect = false;
  992. private bool _manualCheck = true;
  993. public bool ManualCheck
  994. {
  995. get => _manualCheck;
  996. set
  997. {
  998. _manualCheck = value;
  999. NotifyOfPropertyChange(nameof(ManualCheck));
  1000. }
  1001. }
  1002. private bool _manualCheckHide;
  1003. public bool ManumalCheckHide
  1004. {
  1005. get => _manualCheckHide;
  1006. set
  1007. {
  1008. _manualCheckHide = value;
  1009. NotifyOfPropertyChange(nameof(ManumalCheckHide));
  1010. }
  1011. }
  1012. public bool ValveTrue { get; set; } = true;
  1013. public bool ValveFalse { get; set; } = false;
  1014. private bool _enablePLCPointControl = false;
  1015. public bool EnablePLCPointControl
  1016. {
  1017. get => _enablePLCPointControl;
  1018. set
  1019. {
  1020. _enablePLCPointControl = value;
  1021. NotifyOfPropertyChange(nameof(EnablePLCPointControl));
  1022. }
  1023. }
  1024. public GasPanelViewModel()
  1025. {
  1026. CmdSetMfcFlow = new DelegateCommand<object>(PerformCmdSetMfcFlow);
  1027. CmdSetMfmFlow = new DelegateCommand<object>(PerformCmdSetMfmFlow);
  1028. }
  1029. public void SelectedGasStateTypeCmd(string cmd)
  1030. {
  1031. switch (cmd)
  1032. {
  1033. case "Manual":
  1034. SelectedGasStateType = GasPanelStateType.Manual;
  1035. ManualEnable = true;
  1036. break;
  1037. case "Monitor":
  1038. SelectedGasStateType = GasPanelStateType.Monitor;
  1039. ManualEnable = true;
  1040. break;
  1041. case "Recipe":
  1042. SelectedGasStateType = GasPanelStateType.Recipe;
  1043. ManualEnable = false;
  1044. break;
  1045. default:
  1046. break;
  1047. }
  1048. }
  1049. protected override void OnActivate()
  1050. {
  1051. base.OnActivate();
  1052. // EnableServiceControl = (bool)QueryDataClient.Instance.Service.GetConfig("System.IsServiceControlMode");
  1053. // IsMfcNRInstalled = (bool)QueryDataClient.Instance.Service.GetConfig("PM1.MFC.MfcNR.IsMFCInstalled");
  1054. }
  1055. public void SetEditClick()
  1056. {
  1057. IsRecipeEdit = true;
  1058. // EnableServiceControl = false;
  1059. }
  1060. protected override void OnDeactivate(bool close)
  1061. {
  1062. base.OnDeactivate(close);
  1063. //IsManagerPermission = false;
  1064. }
  1065. public void SetManual()
  1066. {
  1067. if (!_manualCheckSelect)
  1068. {
  1069. _manualCheckSelect = !_manualCheckSelect;
  1070. IsManagerPermission = true;
  1071. EnablePLCPointControl = false;
  1072. }
  1073. else
  1074. {
  1075. IsManagerPermission = true;
  1076. ManualCheck = false;
  1077. ManumalCheckHide = true;
  1078. _manualCheckSelect = !_manualCheckSelect;
  1079. EnablePLCPointControl = true;
  1080. }
  1081. }
  1082. public void OpenAll()
  1083. {
  1084. if (!VentValveData.IsOpen)
  1085. InvokeClient.Instance.Service.DoOperation($"{VentValveData.UniqueName}.{AITValveOperation.GVTurnValve}", true);
  1086. if (!PumpValveData.IsOpen)
  1087. InvokeClient.Instance.Service.DoOperation($"{PumpValveData.UniqueName}.{AITValveOperation.GVTurnValve}", true);
  1088. }
  1089. public void CloseAll()
  1090. {
  1091. if (PumpValveData.IsOpen)
  1092. InvokeClient.Instance.Service.DoOperation($"{PumpValveData.UniqueName}.{AITValveOperation.GVTurnValve}", false);
  1093. if (VentValveData.IsOpen)
  1094. InvokeClient.Instance.Service.DoOperation($"{VentValveData.UniqueName}.{AITValveOperation.GVTurnValve}", false);
  1095. }
  1096. private void PerformCmdSetMfcFlow(object param)
  1097. {
  1098. object[] args = (object[])param; //0:devicename, 1:operation, 2:args
  1099. if (args.Length == 3)
  1100. {
  1101. InvokeClient.Instance.Service.DoOperation($"{args[0]}.{args[1]}", args[2]);
  1102. }
  1103. }
  1104. private void PerformCmdSetMfmFlow(object param)
  1105. {
  1106. //object[] args = (object[])param; //0:devicename, 1:operation, 2:args
  1107. //if (args.Length == 3)
  1108. //{
  1109. // InvokeClient.Instance.Service.DoOperation($"PM1.{args[0]}.{args[1]}", args[2]);
  1110. //}
  1111. }
  1112. bool isSensorRecipeOK = false;
  1113. Dictionary<string, object> oldresult;
  1114. private Dictionary<string, object> ClearNotChangedValue(Dictionary<string, object> result)
  1115. {
  1116. Dictionary<string, object> temp = result;
  1117. if (oldresult == null)
  1118. {
  1119. oldresult = result;
  1120. }
  1121. else
  1122. {
  1123. try
  1124. {
  1125. List<string> strkeys = new List<string>();
  1126. foreach (var key in result.Keys)
  1127. {
  1128. if (_subscribedKeys.Contains(key) && oldresult.ContainsKey(key) && result.ContainsKey(key))
  1129. {
  1130. if (result[key].GetType() == typeof(AITValveData) && (((AITValveData)oldresult[key]).Feedback != ((AITValveData)result[key]).Feedback
  1131. || ((AITValveData)oldresult[key]).VirtualFeedback != ((AITValveData)result[key]).VirtualFeedback))
  1132. {
  1133. strkeys.Add(key);
  1134. }
  1135. else if (result[key].GetType() == typeof(AITSensorData) && ((AITSensorData)oldresult[key]).Value != ((AITSensorData)result[key]).Value)
  1136. {
  1137. strkeys.Add(key);
  1138. }
  1139. else if (result[key].GetType() == typeof(AITMfcData) && (((AITMfcData)oldresult[key]).FeedBack != ((AITMfcData)result[key]).FeedBack ||
  1140. ((AITMfcData)oldresult[key]).VirtualFeedBack != ((AITMfcData)result[key]).VirtualFeedBack))
  1141. {
  1142. strkeys.Add(key);
  1143. }
  1144. else if (result[key].GetType() == typeof(float) && (float)oldresult[key] == (float)result[key])
  1145. {
  1146. strkeys.Add(key);
  1147. }
  1148. else if (result[key].GetType() == typeof(int) && (int)oldresult[key] == (int)result[key])
  1149. {
  1150. strkeys.Add(key);
  1151. }
  1152. else if (result[key].GetType() == typeof(bool) && (bool)oldresult[key] == (bool)result[key])
  1153. {
  1154. strkeys.Add(key);
  1155. }
  1156. }
  1157. }
  1158. for (int i = 0; i < strkeys.Count; i++)
  1159. {
  1160. temp.Remove(strkeys[i]);
  1161. }
  1162. }
  1163. catch (Exception ex)
  1164. {
  1165. LOG.Error("由RT返回的数据更新失败" + "ClearNotChangedValue", ex);
  1166. }
  1167. }
  1168. return temp;
  1169. }
  1170. protected override void Poll()
  1171. {
  1172. if (_subscribedKeys.Count > 0)
  1173. {
  1174. Dictionary<string, object> result = QueryDataClient.Instance.Service.PollData(_subscribedKeys);
  1175. Dictionary<string, object> Tempresult = new Dictionary<string, object>(result);
  1176. if (SelectedGasStateType != GasPanelStateType.Monitor)
  1177. {
  1178. result = ClearNotChangedValue(result);
  1179. }
  1180. oldresult = Tempresult;
  1181. if (result == null)
  1182. {
  1183. LOG.Error("获取RT数据失败");
  1184. return;
  1185. }
  1186. if (result.Count != _subscribedKeys.Count)
  1187. {
  1188. string unknowKeys = string.Empty;
  1189. foreach (string key in _subscribedKeys)
  1190. {
  1191. if (!result.ContainsKey(key))
  1192. {
  1193. unknowKeys += key + "\r\n";
  1194. }
  1195. }
  1196. }
  1197. InvokeBeforeUpdateProperty(result);
  1198. UpdateValue(result);
  1199. Application.Current?.Dispatcher.Invoke(new Action(() =>
  1200. {
  1201. if (result.Count != 0)
  1202. {
  1203. InvokePropertyChanged();
  1204. }
  1205. InvokeAfterUpdateProperty(result);
  1206. }));
  1207. }
  1208. }
  1209. protected override void InvokeBeforeUpdateProperty(Dictionary<string, object> data)
  1210. {
  1211. base.InvokeBeforeUpdateProperty(data);
  1212. }
  1213. protected override void InvokeAfterUpdateProperty(Dictionary<string, object> data)
  1214. {
  1215. base.InvokeAfterUpdateProperty(data);
  1216. if (SensorRecipeOK != null && SensorRecipeOK.Value)
  1217. {
  1218. if (isSensorRecipeOK != SensorRecipeOK.Value)
  1219. {
  1220. _manualCheckSelect = false;
  1221. IsManagerPermission = true;
  1222. IsRecipeEdit = true;
  1223. // EnableServiceControl = false;
  1224. }
  1225. isSensorRecipeOK = SensorRecipeOK.Value;
  1226. }
  1227. }
  1228. public void SwichValue(string name)
  1229. {
  1230. if (SelectedGasStateType == GasPanelStateType.Monitor || SelectedGasStateType == GasPanelStateType.Recipe) return;
  1231. var dialog = new SwitchValueDialog { };
  1232. dialog.IsOpen = true;
  1233. switch (name.ToUpper())
  1234. {
  1235. case "BWR":
  1236. dialog.IsOpen = ValveBWR.Feedback;
  1237. break;
  1238. case "DPR":
  1239. dialog.IsOpen = ValveDPR.Feedback;
  1240. break;
  1241. case "CEXH":
  1242. dialog.IsOpen = IsCEXHOn;
  1243. break;
  1244. case "F2":
  1245. dialog.IsOpen = IsF2ClnOn;
  1246. break;
  1247. case "HF":
  1248. dialog.IsOpen = IsHFClnOn;
  1249. break;
  1250. case "DEPO":
  1251. dialog.IsOpen = IsDEPOOn;
  1252. break;
  1253. }
  1254. dialog.Owner = WinOwner;
  1255. dialog.Topmost = true;
  1256. dialog.WindowStartupLocation = WindowStartupLocation.CenterScreen;
  1257. dialog.DeviceName = $"Swich {name}";
  1258. dialog.ShowDialog();
  1259. if ((bool)dialog.IsSave)
  1260. {
  1261. switch (name.ToUpper())
  1262. {
  1263. case "BWR":
  1264. InvokeClient.Instance.Service.DoOperation($"{ValveBWR.UniqueName}.{AITValveOperation.GVTurnValve}", dialog.IsOpen);
  1265. break;
  1266. case "DPR":
  1267. InvokeClient.Instance.Service.DoOperation($"{ValveDPR.UniqueName}.{AITValveOperation.GVTurnValve}", dialog.IsOpen);
  1268. break;
  1269. case "CEXH":
  1270. InvokeClient.Instance.Service.DoOperation($"PM1.SetCEXHEnable", dialog.IsOpen);
  1271. break;
  1272. case "F2":
  1273. InvokeClient.Instance.Service.DoOperation($"PM1.SetF2ClnEnable", dialog.IsOpen);
  1274. break;
  1275. case "HF":
  1276. InvokeClient.Instance.Service.DoOperation($"PM1.SetHFClnEnable", dialog.IsOpen);
  1277. break;
  1278. case "DEPO":
  1279. InvokeClient.Instance.Service.DoOperation($"PM1.SetDEPOEnable", dialog.IsOpen);
  1280. break;
  1281. }
  1282. }
  1283. }
  1284. public void SetEnable(string name)
  1285. {
  1286. if (SelectedGasStateType == GasPanelStateType.Monitor || SelectedGasStateType == GasPanelStateType.Recipe) return;
  1287. var dialog = new SwitchValueDialog2 { };
  1288. dialog.IsOpen = true;
  1289. switch (name.ToUpper())
  1290. {
  1291. case "HTR1":
  1292. dialog.IsOpen = IsHTR1Enable;
  1293. break;
  1294. case "HTR2":
  1295. dialog.IsOpen = IsHTR2Enable;
  1296. break;
  1297. case "HTR3":
  1298. dialog.IsOpen = IsHTR3Enable;
  1299. break;
  1300. }
  1301. dialog.Owner = WinOwner;
  1302. dialog.Topmost = true;
  1303. dialog.WindowStartupLocation = WindowStartupLocation.CenterScreen;
  1304. dialog.DeviceName = $"Swich {name}";
  1305. dialog.ShowDialog();
  1306. if ((bool)dialog.IsSave)
  1307. {
  1308. switch (name.ToUpper())
  1309. {
  1310. case "HTR1":
  1311. InvokeClient.Instance.Service.DoOperation($"PM1.SetHTR1Enable", dialog.IsOpen);
  1312. break;
  1313. case "HTR2":
  1314. InvokeClient.Instance.Service.DoOperation($"PM1.SetHTR2Enable", dialog.IsOpen);
  1315. break;
  1316. case "HTR3":
  1317. InvokeClient.Instance.Service.DoOperation($"PM1.SetHTR3Enable", dialog.IsOpen);
  1318. break;
  1319. }
  1320. }
  1321. }
  1322. public void SelectPump(string _pumpname)
  1323. {
  1324. if (SelectedGasStateType == GasPanelStateType.Monitor || SelectedGasStateType == GasPanelStateType.Recipe) return;
  1325. if (!DialogBox.Confirm($"Are you sure change {_pumpname} status?"))
  1326. return;
  1327. if (_pumpname == "AUC")
  1328. {
  1329. InvokeClient.Instance.Service.DoOperation($"{AUCPump.UniqueName}.{AITValveOperation.GVTurnValve}", !AUCPump.Feedback);
  1330. }
  1331. if (_pumpname == "AGV")
  1332. {
  1333. InvokeClient.Instance.Service.DoOperation($"{AGVPump.UniqueName}.{AITValveOperation.GVTurnValve}", !AGVPump.Feedback);
  1334. }
  1335. if (_pumpname == "Both")
  1336. {
  1337. InvokeClient.Instance.Service.DoOperation($"{BothPump1.UniqueName}.{AITValveOperation.GVTurnValve}", !BothPump1.Feedback);
  1338. }
  1339. }
  1340. }
  1341. }