ManualSetViewModel.cs 117 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610
  1. using Aitex.Core.Common.DeviceData;
  2. using Aitex.Core.RT.IOCore;
  3. using Aitex.Core.RT.Log;
  4. using Aitex.Core.Util;
  5. using Caliburn.Micro;
  6. using Caliburn.Micro.Core;
  7. using FurnaceGasPanelUI.Views.Maintenances;
  8. using FurnaceUI.Client;
  9. using FurnaceUI.Common;
  10. using FurnaceUI.Models;
  11. using FurnaceUI.Views.Editors;
  12. using FurnaceUI.Views.Operations;
  13. using FurnaceUI.Views.Parameter;
  14. using FurnaceUI.Views.Status;
  15. using MECF.Framework.Common.DataCenter;
  16. using MECF.Framework.Common.OperationCenter;
  17. using MECF.Framework.Common.RecipeCenter;
  18. using MECF.Framework.UI.Client.CenterViews.Configs.SystemConfig;
  19. using MECF.Framework.UI.Client.CenterViews.Dialogs;
  20. using MECF.Framework.UI.Client.CenterViews.Editors.Recipe;
  21. using MECF.Framework.UI.Client.ClientBase;
  22. using OpenSEMI.ClientBase;
  23. using RecipeEditorLib.RecipeModel.Params;
  24. using System;
  25. using System.Collections.Generic;
  26. using System.Collections.ObjectModel;
  27. using System.Linq;
  28. using System.Reflection;
  29. using System.Windows;
  30. using System.Windows.Controls;
  31. namespace FurnaceUI.Views.Recipes
  32. {
  33. public class ManualSetViewModel : FurnaceUIViewModelBase
  34. {
  35. [Subscription("PM1.CurrentAuxData")]
  36. public List<AITAuxData> AUXDetailDatas { get; set; }
  37. public string DefaultUnit { get; set; }
  38. #region MFCs
  39. [Subscription("PM1.MFC1.DeviceData")]
  40. public AITMfcData MFC1Data { get; set; }
  41. [Subscription("PM1.MFC2.DeviceData")]
  42. public AITMfcData MFC2Data { get; set; }
  43. [Subscription("PM1.MFC3.DeviceData")]
  44. public AITMfcData MFC3Data { get; set; }
  45. [Subscription("PM1.MFC4.DeviceData")]
  46. public AITMfcData MFC4Data { get; set; }
  47. [Subscription("PM1.MFC5.DeviceData")]
  48. public AITMfcData MFC5Data { get; set; }
  49. [Subscription("PM1.MFC6.DeviceData")]
  50. public AITMfcData MFC6Data { get; set; }
  51. [Subscription("PM1.MFC7.DeviceData")]
  52. public AITMfcData MFC7Data { get; set; }
  53. [Subscription("PM1.MFC8.DeviceData")]
  54. public AITMfcData MFC8Data { get; set; }
  55. [Subscription("PM1.MFC9.DeviceData")]
  56. public AITMfcData MFC9Data { get; set; }
  57. [Subscription("PM1.MFC10.DeviceData")]
  58. public AITMfcData MFC10Data { get; set; }
  59. [Subscription("PM1.MFC11.DeviceData")]
  60. public AITMfcData MFC11Data { get; set; }
  61. [Subscription("PM1.MFC12.DeviceData")]
  62. public AITMfcData MFC12Data { get; set; }
  63. [Subscription("PM1.MFC13.DeviceData")]
  64. public AITMfcData MFC13Data { get; set; }
  65. [Subscription("PM1.MFC14.DeviceData")]
  66. public AITMfcData MFC14Data { get; set; }
  67. [Subscription("PM1.MFC15.DeviceData")]
  68. public AITMfcData MFC15Data { get; set; }
  69. [Subscription("PM1.MFC16.DeviceData")]
  70. public AITMfcData MFC16Data { get; set; }
  71. [Subscription("PM1.MFC17.DeviceData")]
  72. public AITMfcData MFC17Data { get; set; }
  73. [Subscription("PM1.MFC31.DeviceData")]
  74. public AITMfcData MFC31Data { get; set; }
  75. [Subscription("PM1.MFC32.DeviceData")]
  76. public AITMfcData MFC32Data { get; set; }
  77. [Subscription("PM1.MFC51.DeviceData")]
  78. public AITMfcData MFC51Data { get; set; }
  79. #endregion
  80. [Subscription("PM1.EditRecipeStepNo")]
  81. public int EditRecipeStepNo { get; set; }
  82. [Subscription("PM1.EditRecipeName")]
  83. public string EditRecipeName { get; set; }
  84. [Subscription("PM1.EditRecipeStepName")]
  85. public string EditRecipeStepName { get; set; }
  86. private int ControlMode = 1;
  87. private UIElement _parent;
  88. [Subscription("System.HeaterU.DeviceData")]
  89. public AITHeaterData HeaterUData { get; set; }
  90. [Subscription("System.HeaterCU.DeviceData")]
  91. public AITHeaterData HeaterCUData { get; set; }
  92. [Subscription("System.HeaterC.DeviceData")]
  93. public AITHeaterData HeaterCData { get; set; }
  94. [Subscription("System.HeaterCL.DeviceData")]
  95. public AITHeaterData HeaterCLData { get; set; }
  96. [Subscription("System.HeaterL.DeviceData")]
  97. public AITHeaterData HeaterLData { get; set; }
  98. public AITHeaterData BottomHeaterData => HeaterLData;
  99. public AITHeaterData CenterBottomHeaterData => HeaterCLData;
  100. public AITHeaterData CenterHeaterData => HeaterCData;
  101. public AITHeaterData TopCenterHeaterData => HeaterCUData;
  102. public AITHeaterData TopHeaterData => HeaterUData;
  103. [Subscription("PM1.APC.DeviceData")]
  104. public AITAPCData APCData { get; set; }
  105. IWindowManager wm = IoC.Get<IWindowManager>();
  106. private string _selectBtnName;
  107. public string SelectBtnName
  108. {
  109. get { return _selectBtnName; }
  110. set { _selectBtnName = value; this.NotifyOfPropertyChange(nameof(SelectBtnName)); }
  111. }
  112. private string _temperatureControlMode;
  113. public string TemperatureControlMode
  114. {
  115. get => _temperatureControlMode;
  116. set
  117. {
  118. _temperatureControlMode = value;
  119. NotifyOfPropertyChange(nameof(TemperatureControlMode));
  120. }
  121. }
  122. private string _temperatureCorrect;
  123. public string TemperatureCorrect
  124. {
  125. get => _temperatureCorrect;
  126. set
  127. {
  128. _temperatureCorrect = value;
  129. NotifyOfPropertyChange(nameof(TemperatureCorrect));
  130. }
  131. }
  132. private string _temperaturePID;
  133. public string TemperaturePID
  134. {
  135. get => _temperaturePID;
  136. set
  137. {
  138. _temperaturePID = value;
  139. NotifyOfPropertyChange(nameof(TemperaturePID));
  140. }
  141. }
  142. private string _loaderCommand = "";
  143. public string LoaderCommand
  144. {
  145. get => _loaderCommand;
  146. set
  147. {
  148. _loaderCommand = value;
  149. NotifyOfPropertyChange(nameof(LoaderCommand));
  150. NotifyOfPropertyChange(nameof(LoaderCommandIsSaved));
  151. }
  152. }
  153. public string OldLoaderCommand { get; set; } = "";
  154. public void SetParent(UIElement parent)
  155. {
  156. _parent = parent;
  157. }
  158. public bool LoaderCommandIsSaved
  159. {
  160. get => LoaderCommand == OldLoaderCommand;
  161. }
  162. #region"Loader Set Value"
  163. private Visibility _loaderSet3SpeedVisibility = Visibility.Hidden;
  164. public Visibility LoaderSet3SpeedVisibility
  165. {
  166. get => _loaderSet3SpeedVisibility;
  167. set
  168. {
  169. _loaderSet3SpeedVisibility = value;
  170. NotifyOfPropertyChange(nameof(LoaderSet3SpeedVisibility));
  171. }
  172. }
  173. private Visibility _loaderSetSpeedVisibility = Visibility.Hidden;
  174. public Visibility LoaderSetSpeedVisibility
  175. {
  176. get => _loaderSetSpeedVisibility;
  177. set
  178. {
  179. _loaderSetSpeedVisibility = value;
  180. NotifyOfPropertyChange(nameof(LoaderSetSpeedVisibility));
  181. }
  182. }
  183. private Visibility _loaderSetSpeedFloatVisibility = Visibility.Hidden;
  184. public Visibility LoaderSetSpeedFloatVisibility
  185. {
  186. get => _loaderSetSpeedFloatVisibility;
  187. set
  188. {
  189. _loaderSetSpeedFloatVisibility = value;
  190. NotifyOfPropertyChange(nameof(LoaderSetSpeedFloatVisibility));
  191. }
  192. }
  193. private string _pressCommand = "";
  194. public string PressCommand
  195. {
  196. get => _pressCommand;
  197. set
  198. {
  199. _pressCommand = value;
  200. NotifyOfPropertyChange(nameof(PressCommand));
  201. NotifyOfPropertyChange(nameof(PressCommandIsSaved));
  202. }
  203. }
  204. public string OldPressCommand { get; set; } = "";
  205. public bool PressCommandIsSaved
  206. {
  207. get => _pressCommand == OldPressCommand;
  208. }
  209. public void SetShowLoaderValuePanel(string selectedCmd)
  210. {
  211. switch (selectedCmd)
  212. {
  213. case "Boat Load":
  214. case "Boat Unload":
  215. LoaderSet3SpeedVisibility = Visibility.Visible;
  216. LoaderSetSpeedVisibility = Visibility.Hidden;
  217. LoaderSetSpeedFloatVisibility = Visibility.Hidden;
  218. break;
  219. case "Boat Rotate":
  220. LoaderSet3SpeedVisibility = Visibility.Hidden;
  221. LoaderSetSpeedVisibility = Visibility.Hidden;
  222. LoaderSetSpeedFloatVisibility = Visibility.Visible;
  223. break;
  224. case "Boat CAP2":
  225. LoaderSet3SpeedVisibility = Visibility.Hidden;
  226. LoaderSetSpeedVisibility = Visibility.Visible;
  227. LoaderSetSpeedFloatVisibility = Visibility.Hidden;
  228. break;
  229. case "Stop(Include R-axis)":
  230. case "Boat Rotate Stop":
  231. case "Boat Loader Home":
  232. case "None":
  233. case "NONE":
  234. LoaderSet3SpeedVisibility = Visibility.Hidden;
  235. LoaderSetSpeedVisibility = Visibility.Hidden;
  236. LoaderSetSpeedFloatVisibility = Visibility.Hidden;
  237. break;
  238. default:
  239. break;
  240. }
  241. }
  242. public void SetLoaderValue(string selectedCmd, string Values)
  243. {
  244. switch (selectedCmd)
  245. {
  246. case "Boat Load":
  247. case "Boat Unload":
  248. if (string.IsNullOrEmpty(Values)) return;
  249. string[] list = Values.Split(';');
  250. if (list.Length < 3) return;
  251. Loader3Speed1 = int.Parse(list[0]);
  252. Loader3Speed2 = int.Parse(list[1]);
  253. Loader3Speed3 = int.Parse(list[2]);
  254. break;
  255. case "Boat Rotate":
  256. if (string.IsNullOrEmpty(Values)) return;
  257. LoaderRPM = double.Parse(Values);
  258. break;
  259. case "Boat CAP2":
  260. if (string.IsNullOrEmpty(Values)) return;
  261. LoaderSpeed = int.Parse(Values);
  262. break;
  263. case "Stop(Include R-axis)":
  264. case "Boat Rotate Stop":
  265. case "Boat Loader Home":
  266. case "None":
  267. break;
  268. default:
  269. break;
  270. }
  271. }
  272. public string GetSaveLoaderValue(string selectedCmd)
  273. {
  274. switch (selectedCmd)
  275. {
  276. case "Boat Load":
  277. case "Boat Unload":
  278. return $"{selectedCmd};{Loader3Speed1};{Loader3Speed2};{Loader3Speed3}";
  279. case "Boat Rotate":
  280. return $"{selectedCmd};{LoaderRPM.ToString()}";
  281. case "Boat CAP2":
  282. return $"{selectedCmd};{LoaderSpeed.ToString()}";
  283. case "Stop(Include R-axis)":
  284. case "Boat Rotate Stop":
  285. case "Boat Loader Home":
  286. case "None":
  287. return $"{selectedCmd};";
  288. default:
  289. return "";
  290. }
  291. }
  292. private int loader3Speed1 = 5;
  293. public int Loader3Speed1
  294. {
  295. get => loader3Speed1;
  296. set
  297. {
  298. loader3Speed1 = value;
  299. NotifyOfPropertyChange(nameof(Loader3Speed1));
  300. }
  301. }
  302. private int loader3Speed2 = 0;
  303. public int Loader3Speed2
  304. {
  305. get => loader3Speed2;
  306. set
  307. {
  308. loader3Speed2 = value;
  309. NotifyOfPropertyChange(nameof(Loader3Speed2));
  310. }
  311. }
  312. private int loader3Speed3 = 0;
  313. public int Loader3Speed3
  314. {
  315. get => loader3Speed3;
  316. set
  317. {
  318. loader3Speed3 = value;
  319. NotifyOfPropertyChange(nameof(Loader3Speed3));
  320. }
  321. }
  322. private double _loaderRPM = 0;
  323. public double LoaderRPM
  324. {
  325. get => _loaderRPM;
  326. set
  327. {
  328. _loaderRPM = value;
  329. NotifyOfPropertyChange(nameof(LoaderRPM));
  330. }
  331. }
  332. private int loaderSpeed = 0;
  333. public int LoaderSpeed
  334. {
  335. get => loaderSpeed;
  336. set
  337. {
  338. loaderSpeed = value;
  339. NotifyOfPropertyChange(nameof(LoaderSpeed));
  340. }
  341. }
  342. private void ClearLoaderSetValue()
  343. {
  344. Loader3Speed1 = 0;
  345. Loader3Speed2 = 0;
  346. Loader3Speed3 = 0;
  347. LoaderRPM = 0;
  348. LoaderSpeed = 0;
  349. }
  350. #endregion
  351. #region"PressVisibility"
  352. private Visibility _pressVisibility = Visibility.Hidden;
  353. public Visibility PressVisibility
  354. {
  355. get => _pressVisibility;
  356. set
  357. {
  358. _pressVisibility = value;
  359. NotifyOfPropertyChange(nameof(PressVisibility));
  360. }
  361. }
  362. private Visibility _pressSlowVacVisibility = Visibility.Hidden;
  363. public Visibility PressSlowVacVisibility
  364. {
  365. get => _pressSlowVacVisibility;
  366. set
  367. {
  368. _pressSlowVacVisibility = value;
  369. NotifyOfPropertyChange(nameof(PressSlowVacVisibility));
  370. }
  371. }
  372. private Visibility _pressValveAngleVisibility = Visibility.Hidden;
  373. public Visibility PressValveAngleVisibility
  374. {
  375. get => _pressValveAngleVisibility;
  376. set
  377. {
  378. _pressValveAngleVisibility = value;
  379. NotifyOfPropertyChange(nameof(PressValveAngleVisibility));
  380. }
  381. }
  382. private Visibility _pressWaitVisibility = Visibility.Hidden;
  383. public Visibility PressWaitVisibility
  384. {
  385. get => _pressWaitVisibility;
  386. set
  387. {
  388. _pressWaitVisibility = value;
  389. NotifyOfPropertyChange(nameof(PressWaitVisibility));
  390. }
  391. }
  392. private string _pressureCommand;
  393. public string PressureCommand
  394. {
  395. get => _pressureCommand;
  396. set
  397. {
  398. _pressureCommand = value;
  399. }
  400. }
  401. public void SetShowPressPanel(string selectedCmd)
  402. {
  403. switch (selectedCmd)
  404. {
  405. case "Press":
  406. case "Press2":
  407. PressVisibility = Visibility.Visible;
  408. PressSlowVacVisibility = Visibility.Hidden;
  409. PressValveAngleVisibility = Visibility.Hidden;
  410. PressWaitVisibility = Visibility.Hidden;
  411. break;
  412. case "Slow Vac":
  413. PressVisibility = Visibility.Hidden;
  414. PressSlowVacVisibility = Visibility.Visible;
  415. PressValveAngleVisibility = Visibility.Hidden;
  416. PressWaitVisibility = Visibility.Hidden;
  417. break;
  418. case "Valve Angle":
  419. PressVisibility = Visibility.Hidden;
  420. PressSlowVacVisibility = Visibility.Hidden;
  421. PressValveAngleVisibility = Visibility.Visible;
  422. PressWaitVisibility = Visibility.Hidden;
  423. break;
  424. case "Full Open":
  425. case "Full Close":
  426. case "Hold":
  427. case "Zero Set":
  428. case "Cancel Zero":
  429. case "Home":
  430. case "None":
  431. PressVisibility = Visibility.Hidden;
  432. PressSlowVacVisibility = Visibility.Hidden;
  433. PressValveAngleVisibility = Visibility.Hidden;
  434. PressWaitVisibility = Visibility.Hidden;
  435. break;
  436. case "WaitPressUp1":
  437. case "WaitPressDown1":
  438. case "WaitPressUp2":
  439. case "WaitPressDown2":
  440. PressVisibility = Visibility.Hidden;
  441. PressSlowVacVisibility = Visibility.Hidden;
  442. PressValveAngleVisibility = Visibility.Hidden;
  443. PressWaitVisibility = Visibility.Visible;
  444. break;
  445. default:
  446. break;
  447. }
  448. }
  449. public void SetPressValue(string selectedCmd, string Values)
  450. {
  451. switch (selectedCmd)
  452. {
  453. case "Press":
  454. case "Press2":
  455. if (string.IsNullOrEmpty(Values)) return;
  456. string[] list = Values.Split(';');
  457. if (list.Length < 2) return;
  458. PressPID = list[0];
  459. PressSet = double.Parse(list[1]);
  460. break;
  461. case "Slow Vac":
  462. if (string.IsNullOrEmpty(Values)) return;
  463. PressSlowVacSet = double.Parse(Values);
  464. break;
  465. case "Valve Angle":
  466. if (string.IsNullOrEmpty(Values)) return;
  467. PressValveAngleSet = double.Parse(Values);
  468. break;
  469. case "Full Open":
  470. case "Full Close":
  471. case "Hold":
  472. case "Zero Set":
  473. case "Cancel Zero":
  474. break;
  475. case "WaitPressUp1":
  476. case "WaitPressDown1":
  477. case "WaitPressUp2":
  478. case "WaitPressDown2":
  479. if (string.IsNullOrEmpty(Values)) return;
  480. PressWait = double.Parse(Values);
  481. break;
  482. default:
  483. break;
  484. }
  485. }
  486. public string GetSavePressValue(string selectedCmd)
  487. {
  488. switch (selectedCmd)
  489. {
  490. case "Press":
  491. case "Press2":
  492. return $"{PressPID};{PressSet}";
  493. case "Slow Vac":
  494. return PressSlowVacSet.ToString();
  495. case "Valve Angle":
  496. return PressValveAngleSet.ToString();
  497. case "Full Open":
  498. case "Full Close":
  499. case "Hold":
  500. case "Zero Set":
  501. case "Cancel Zero":
  502. return "";
  503. case "WaitPressUp1":
  504. case "WaitPressDown1":
  505. case "WaitPressUp2":
  506. case "WaitPressDown2":
  507. return PressWait.ToString();
  508. default:
  509. return "";
  510. }
  511. }
  512. private string _pressPID;
  513. public string PressPID
  514. {
  515. get => _pressPID;
  516. set
  517. {
  518. _pressPID = value;
  519. NotifyOfPropertyChange(nameof(PressPID));
  520. }
  521. }
  522. private double _pressSet;
  523. public double PressSet
  524. {
  525. get => _pressSet;
  526. set
  527. {
  528. _pressSet = value;
  529. NotifyOfPropertyChange(nameof(PressSet));
  530. }
  531. }
  532. private double _pressSlowVacSet;
  533. public double PressSlowVacSet
  534. {
  535. get => _pressSlowVacSet;
  536. set
  537. {
  538. _pressSlowVacSet = value;
  539. NotifyOfPropertyChange(nameof(PressSlowVacSet));
  540. }
  541. }
  542. private double _pressValveAngleSet;
  543. public double PressValveAngleSet
  544. {
  545. get => _pressValveAngleSet;
  546. set
  547. {
  548. _pressValveAngleSet = value;
  549. NotifyOfPropertyChange(nameof(PressValveAngleSet));
  550. }
  551. }
  552. private string _lowPressWait = "None";
  553. public string LowPressWait
  554. {
  555. get => _lowPressWait;
  556. set
  557. {
  558. _lowPressWait = value;
  559. NotifyOfPropertyChange(nameof(LowPressWait));
  560. }
  561. }
  562. private double _pressWait;
  563. public double PressWait
  564. {
  565. get => _pressWait;
  566. set
  567. {
  568. _pressWait = value;
  569. NotifyOfPropertyChange(nameof(PressWait));
  570. }
  571. }
  572. private void ClearPressSetValue()
  573. {
  574. PressPID = "None";
  575. PressSet = 0;
  576. PressSlowVacSet = 0;
  577. PressValveAngleSet = 0;
  578. LowPressWait = "None";
  579. PressWait = 0;
  580. }
  581. #endregion
  582. #region AlarmRecipe Visibility
  583. public bool IsAlarmReicpe => RecipeType.ToLower() == "alarm";
  584. public bool IsAbortReicpe => RecipeType.ToLower() == "abort";
  585. public bool IsSubReicpe => RecipeType.ToLower() == "sub";
  586. public bool IsTableVisibility => IsAlarmReicpe || IsAbortReicpe || IsSubReicpe;
  587. public bool IsRecipeHeaderVisibility => !IsTableVisibility;
  588. public bool IsVPDataListVisibility => !IsTableVisibility;
  589. public bool IsCombinationVisibility => !IsTableVisibility;
  590. #endregion
  591. private bool _noStandbyIsEnabled = false;
  592. public bool NoStandbyIsEnabled
  593. {
  594. get => _noStandbyIsEnabled;
  595. set
  596. {
  597. _noStandbyIsEnabled = value;
  598. NotifyOfPropertyChange(nameof(NoStandbyIsEnabled));
  599. }
  600. }
  601. private Visibility _standbyIsVisibility = Visibility.Visible;
  602. public Visibility StandbyIsVisibility
  603. {
  604. get => _standbyIsVisibility;
  605. set
  606. {
  607. _standbyIsVisibility = value;
  608. NotifyOfPropertyChange(nameof(StandbyIsVisibility));
  609. }
  610. }
  611. private string _selectedGasSetting2;
  612. public string SelectedGasSetting2
  613. {
  614. get
  615. {
  616. return _selectedGasSetting2;
  617. }
  618. set
  619. {
  620. _selectedGasSetting2 = value;
  621. NotifyOfPropertyChange(nameof(SelectedGasSetting2));
  622. }
  623. }
  624. private string _selectedGasSetting3;
  625. public string SelectedGasSetting3
  626. {
  627. get
  628. {
  629. return _selectedGasSetting3;
  630. }
  631. set
  632. {
  633. _selectedGasSetting3 = value;
  634. NotifyOfPropertyChange(nameof(SelectedGasSetting3));
  635. }
  636. }
  637. private string _selectedGasSetting4;
  638. public string SelectedGasSetting4
  639. {
  640. get
  641. {
  642. return _selectedGasSetting4;
  643. }
  644. set
  645. {
  646. _selectedGasSetting4 = value;
  647. NotifyOfPropertyChange(nameof(SelectedGasSetting4));
  648. }
  649. }
  650. private string _selectedGasSetting5;
  651. public string SelectedGasSetting5
  652. {
  653. get
  654. {
  655. return _selectedGasSetting5;
  656. }
  657. set
  658. {
  659. _selectedGasSetting5 = value;
  660. NotifyOfPropertyChange(nameof(SelectedGasSetting5));
  661. }
  662. }
  663. private string _selectedGasSetting6;
  664. public string SelectedGasSetting6
  665. {
  666. get
  667. {
  668. return _selectedGasSetting6;
  669. }
  670. set
  671. {
  672. _selectedGasSetting6 = value;
  673. NotifyOfPropertyChange(nameof(SelectedGasSetting6));
  674. }
  675. }
  676. private List<ConfigNode> _ConfigNodes = new List<ConfigNode>();
  677. public List<ConfigNode> ConfigNodes
  678. {
  679. get { return _ConfigNodes; }
  680. set
  681. {
  682. _ConfigNodes = value;
  683. NotifyOfPropertyChange(nameof(ConfigNodes));
  684. }
  685. }
  686. public ObservableCollection<TempManualSetData> TempList { get; set; } = new ObservableCollection<TempManualSetData>();
  687. private ObservableCollection<MFCGasData> _mFCDatas = new ObservableCollection<MFCGasData>();
  688. public ObservableCollection<MFCGasData> MFCDataList
  689. {
  690. get => _mFCDatas;
  691. set
  692. {
  693. _mFCDatas = value;
  694. NotifyOfPropertyChange(nameof(MFCDataList));
  695. }
  696. }
  697. private string _pressureUnit;
  698. public string PressureUnit
  699. {
  700. get => _pressureUnit;
  701. set
  702. {
  703. _pressureUnit = value;
  704. NotifyOfPropertyChange(nameof(PressureUnit));
  705. }
  706. }
  707. public string RecipeType { get; set; }
  708. public ManualSetViewModel()
  709. {
  710. }
  711. protected override void OnViewLoaded(object view)
  712. {
  713. base.OnViewLoaded(view);
  714. }
  715. protected override void OnActivate()
  716. {
  717. base.OnActivate();
  718. //InvokeClient.Instance.Service.DoOperation($"PM1.SetSensorRecipeOK", "");
  719. LoadData();
  720. }
  721. protected override void OnDeactivate(bool close)
  722. {
  723. base.OnDeactivate(close);
  724. //InvokeClient.Instance.Service.DoOperation($"PM1.SetSensorPROCManualOK", "");
  725. }
  726. protected override void OnInitialize()
  727. {
  728. base.OnInitialize();
  729. // GetHeaderConfig();
  730. }
  731. private void LoadData()
  732. {
  733. firstUpdate = true;
  734. }
  735. //撤销修改
  736. public void RecipeIsChangeClick(object cmdName, object value)
  737. {
  738. var windowManager = IoC.Get<IWindowManager>();
  739. switch ((string)cmdName)
  740. {
  741. case "Alarm":
  742. break;
  743. case "MFC":
  744. break;
  745. case "Gas":
  746. break;
  747. case "AUX":
  748. break;
  749. case "Press":
  750. break;
  751. case "Temp":
  752. break;
  753. default:
  754. break;
  755. }
  756. }
  757. public void TempSetClick(object sender)
  758. {
  759. string stSetValue = ShowNumberKeyboard(sender as Button, "", 1);
  760. foreach (var item in TempList)
  761. {
  762. item.Value = stSetValue;
  763. item.IsSetChanged = false;
  764. }
  765. }
  766. public Dictionary<string, bool> DictValve { get; set; } = new Dictionary<string, bool>();
  767. public Dictionary<string, string> DictMFC { get; set; } = new Dictionary<string, string>();
  768. public Dictionary<string, string> DictMFCRamp { get; set; } = new Dictionary<string, string>();
  769. public Dictionary<string, bool> PumpSetValues { get; set; } = new Dictionary<string, bool>();
  770. public Dictionary<string, bool> F2HFClnOrHFCl2Values { get; set; } = new Dictionary<string, bool>();
  771. private Dictionary<string, string> ChangedDictMFC(Dictionary<string, double> oldDict)
  772. {
  773. Dictionary<string, string> rtnKeyValue = new Dictionary<string, string>();
  774. foreach (var item in oldDict.Keys)
  775. {
  776. rtnKeyValue.Add(item, oldDict[item].ToString());
  777. }
  778. return rtnKeyValue;
  779. }
  780. public void PatternCmd()
  781. {
  782. string toolType = (string)QueryDataClient.Instance.Service.GetConfig("System.SetUp.ToolType");
  783. if (!string.IsNullOrEmpty(toolType) && toolType.Equals(ConstantsCommon.ELK))
  784. {
  785. FurnaceUI.Views.Maintenances.Maintenances.ELK.GasPanelViewModel gasPanelTwoView = new Maintenances.Maintenances.ELK.GasPanelViewModel();
  786. gasPanelTwoView.MFCDataList = MFCDataList;
  787. var rtn = (wm as WindowManager)?.ShowDialogWithTitle(gasPanelTwoView, null, " Gas Panel");
  788. if ((bool)rtn)
  789. {
  790. DictValve = gasPanelTwoView.DictChangedValve;
  791. DictMFC = ChangedDictMFC(gasPanelTwoView.DictChangedMFC);
  792. DictMFCRamp = ChangedDictMFC(gasPanelTwoView.DictChangedMFCRamp);
  793. foreach (var item in DictMFC)
  794. {
  795. var tempMFC = MFCDataList.FirstOrDefault(x => x.Name == item.Key);
  796. if (tempMFC != null)
  797. {
  798. tempMFC.IsSetChanged = false;
  799. tempMFC.Value = item.Value;
  800. }
  801. }
  802. foreach (var item in DictMFCRamp)
  803. {
  804. var tempMFC = MFCDataList.FirstOrDefault(x => x.Name == item.Key);
  805. if (tempMFC != null)
  806. {
  807. tempMFC.IsRampngChanged = false;
  808. tempMFC.Rampng = item.Value;
  809. }
  810. }
  811. if (DictMFC.Count == 0 && DictMFCRamp.Count == 0)
  812. {
  813. for (int i = 0; i < MFCDataList.Count; i++)
  814. {
  815. double setLastPoint = (double)QueryDataClient.Instance.Service.GetConfig($"PM1.MFC.{MFCDataList[i].DisplayName}.SetLastPoint");
  816. double setLastRamping = (double)QueryDataClient.Instance.Service.GetConfig($"PM1.MFC.{MFCDataList[i].DisplayName}.SetLastRamping");
  817. MFCDataList[i].Value = setLastPoint.ToString("f3");
  818. MFCDataList[i].Rampng = setLastRamping.ToString("f3");
  819. MFCDataList[i].IsSetChanged = true;
  820. MFCDataList[i].IsRampngChanged = true;
  821. };
  822. }
  823. if (gasPanelTwoView.DictChangedPumpValve.Count > 0)
  824. {
  825. PumpSetValues.Clear();
  826. if (gasPanelTwoView.AGVPumpData != null && gasPanelTwoView.AGVPumpData.DefaultValue != gasPanelTwoView.AGVPumpData.Feedback)
  827. {
  828. PumpSetValues.Add(gasPanelTwoView.AGVPumpData.UniqueName, gasPanelTwoView.AGVPumpData.Feedback);
  829. // InvokeClient.Instance.Service.DoOperation($"{gasPanelTwoView.AGVPumpData.UniqueName}.{AITValveOperation.GVTurnValve}", gasPanelTwoView.AGVPumpData.Feedback);
  830. }
  831. if (gasPanelTwoView.AUCPumpData != null && gasPanelTwoView.AUCPumpData.DefaultValue != gasPanelTwoView.AUCPumpData.Feedback)
  832. {
  833. PumpSetValues.Add(gasPanelTwoView.AUCPumpData.UniqueName, gasPanelTwoView.AUCPumpData.Feedback);
  834. // InvokeClient.Instance.Service.DoOperation($"{gasPanelTwoView.AUCPumpData.UniqueName}.{AITValveOperation.GVTurnValve}", gasPanelTwoView.AUCPumpData.Feedback);
  835. }
  836. if (gasPanelTwoView.BothPump1Data != null && gasPanelTwoView.BothPump1Data.DefaultValue != gasPanelTwoView.BothPump1Data.Feedback)
  837. {
  838. PumpSetValues.Add(gasPanelTwoView.BothPump1Data.UniqueName, gasPanelTwoView.BothPump1Data.Feedback);
  839. // InvokeClient.Instance.Service.DoOperation($"{gasPanelTwoView.BothPumpData.UniqueName}.{AITValveOperation.GVTurnValve}", gasPanelTwoView.BothPumpData.Feedback);
  840. }
  841. if (gasPanelTwoView.BothPump2Data != null && gasPanelTwoView.BothPump2Data.DefaultValue != gasPanelTwoView.BothPump2Data.Feedback)
  842. {
  843. PumpSetValues.Add(gasPanelTwoView.BothPump2Data.UniqueName, gasPanelTwoView.BothPump2Data.Feedback);
  844. // InvokeClient.Instance.Service.DoOperation($"{gasPanelTwoView.BothPumpData.UniqueName}.{AITValveOperation.GVTurnValve}", gasPanelTwoView.BothPumpData.Feedback);
  845. }
  846. if (gasPanelTwoView.ValveBWRData != null && gasPanelTwoView.ValveBWRData.DefaultValue != gasPanelTwoView.ValveBWRData.Feedback)
  847. {
  848. PumpSetValues.Add(gasPanelTwoView.ValveBWRData.UniqueName, gasPanelTwoView.ValveBWRData.Feedback);
  849. // InvokeClient.Instance.Service.DoOperation($"{gasPanelTwoView.ValveBWRData.UniqueName}.{AITValveOperation.GVTurnValve}", gasPanelTwoView.ValveBWRData.Feedback);
  850. }
  851. if (gasPanelTwoView.ValveDPRData != null && gasPanelTwoView.ValveDPRData.DefaultValue != gasPanelTwoView.ValveDPRData.Feedback)
  852. {
  853. PumpSetValues.Add(gasPanelTwoView.ValveDPRData.UniqueName, gasPanelTwoView.ValveDPRData.Feedback);
  854. // InvokeClient.Instance.Service.DoOperation($"{gasPanelTwoView.ValveDPRData.UniqueName}.{AITValveOperation.GVTurnValve}", gasPanelTwoView.ValveDPRData.Feedback);
  855. }
  856. F2HFClnOrHFCl2Values.Clear();
  857. if (gasPanelTwoView.IsDEPOOn != gasPanelTwoView.IsOldDEPOOn)
  858. {
  859. F2HFClnOrHFCl2Values.Add("PM1.SetDEPOEnable", gasPanelTwoView.IsDEPOOn);
  860. // InvokeClient.Instance.Service.DoOperation($"PM1.SetF2ClnEnable", gasPanelTwoView.IsF2ClnOn);
  861. }
  862. if (gasPanelTwoView.IsF2ClnOn != gasPanelTwoView.IsOldF2ClnOn)
  863. {
  864. F2HFClnOrHFCl2Values.Add("PM1.SetF2ClnEnable", gasPanelTwoView.IsF2ClnOn);
  865. // InvokeClient.Instance.Service.DoOperation($"PM1.SetF2ClnEnable", gasPanelTwoView.IsF2ClnOn);
  866. }
  867. if (gasPanelTwoView.IsHFClnOn != gasPanelTwoView.IsOldHFClnOn)
  868. {
  869. F2HFClnOrHFCl2Values.Add("PM1.SetHFClnEnable", gasPanelTwoView.IsHFClnOn);
  870. //InvokeClient.Instance.Service.DoOperation($"PM1.SetHFClnEnable", gasPanelTwoView.IsHFClnOn);
  871. }
  872. if (gasPanelTwoView.IsHTR1Enable != gasPanelTwoView.IsOldHTR1Enable)
  873. {
  874. F2HFClnOrHFCl2Values.Add("PM1.SetHTR1Enable", gasPanelTwoView.IsHTR1Enable);
  875. // InvokeClient.Instance.Service.DoOperation($"PM1.SetHTR1Enable", gasPanelTwoView.IsHTR1Enable);
  876. }
  877. if (gasPanelTwoView.IsHTR2Enable != gasPanelTwoView.IsOldHTR2Enable)
  878. {
  879. F2HFClnOrHFCl2Values.Add("PM1.SetHTR2Enable", gasPanelTwoView.IsHTR2Enable);
  880. //InvokeClient.Instance.Service.DoOperation($"PM1.SetHTR2Enable", gasPanelTwoView.IsHTR2Enable);
  881. }
  882. if (gasPanelTwoView.IsHTR3Enable != gasPanelTwoView.IsOldHTR3Enable)
  883. {
  884. F2HFClnOrHFCl2Values.Add("PM1.SetHTR3Enable", gasPanelTwoView.IsHTR3Enable);
  885. //InvokeClient.Instance.Service.DoOperation($"PM1.SetHTR2Enable", gasPanelTwoView.IsHTR2Enable);
  886. }
  887. if (gasPanelTwoView.IsCEXHOn != gasPanelTwoView.IsOldCEXHOn)
  888. {
  889. F2HFClnOrHFCl2Values.Add("PM1.SetCEXHEnable", gasPanelTwoView.IsCEXHOn);
  890. //InvokeClient.Instance.Service.DoOperation($"PM1.SetHTR2Enable", gasPanelTwoView.IsHTR2Enable);
  891. }
  892. if (gasPanelTwoView.IsCREFOn != gasPanelTwoView.IsOldCREFOn)
  893. {
  894. F2HFClnOrHFCl2Values.Add("PM1.SetCREFEnable", gasPanelTwoView.IsCREFOn);
  895. //InvokeClient.Instance.Service.DoOperation($"PM1.SetHTR2Enable", gasPanelTwoView.IsHTR2Enable);
  896. }
  897. if (gasPanelTwoView.IsSIREFOn != gasPanelTwoView.IsOldSIREFOn)
  898. {
  899. F2HFClnOrHFCl2Values.Add("PM1.SetSIREFEnable", gasPanelTwoView.IsSIREFOn);
  900. //InvokeClient.Instance.Service.DoOperation($"PM1.SetHTR2Enable", gasPanelTwoView.IsHTR2Enable);
  901. }
  902. }
  903. }
  904. }
  905. else if (!string.IsNullOrEmpty(toolType) && toolType.Equals(ConstantsCommon.SIBCN))
  906. {
  907. FurnaceUI.Views.Maintenances.Maintenances.SiBCN.GasPanelViewModel gasPanelTwoView = new Maintenances.Maintenances.SiBCN.GasPanelViewModel();
  908. gasPanelTwoView.MFCDataList = MFCDataList;
  909. var rtn = (wm as WindowManager)?.ShowDialogWithTitle(gasPanelTwoView, null, " Gas Panel");
  910. if ((bool)rtn)
  911. {
  912. DictValve = gasPanelTwoView.DictChangedValve;
  913. DictMFC = ChangedDictMFC(gasPanelTwoView.DictChangedMFC);
  914. foreach (var item in DictMFC)
  915. {
  916. var tempMFC = MFCDataList.FirstOrDefault(x => x.Name == item.Key);
  917. if (tempMFC != null)
  918. {
  919. tempMFC.IsSetChanged = false;
  920. tempMFC.Value = item.Value;
  921. }
  922. }
  923. if (DictMFC.Count == 0)
  924. {
  925. for (int i = 0; i < MFCDataList.Count; i++)
  926. {
  927. double setLastPoint = (double)QueryDataClient.Instance.Service.GetConfig($"PM1.MFC.{MFCDataList[i].DisplayName}.SetLastPoint");
  928. double setLastRamping = (double)QueryDataClient.Instance.Service.GetConfig($"PM1.MFC.{MFCDataList[i].DisplayName}.SetLastRamping");
  929. MFCDataList[i].Value = setLastPoint.ToString("f3");
  930. MFCDataList[i].Rampng = setLastRamping.ToString("f3");
  931. MFCDataList[i].IsSetChanged = true;
  932. };
  933. }
  934. if (gasPanelTwoView.DictChangedPumpValve.Count > 0)
  935. {
  936. PumpSetValues.Clear();
  937. if (gasPanelTwoView.AGVPumpData != null && gasPanelTwoView.AGVPumpData.DefaultValue != gasPanelTwoView.AGVPumpData.Feedback)
  938. {
  939. PumpSetValues.Add(gasPanelTwoView.AGVPumpData.UniqueName, gasPanelTwoView.AGVPumpData.Feedback);
  940. // InvokeClient.Instance.Service.DoOperation($"{gasPanelTwoView.AGVPumpData.UniqueName}.{AITValveOperation.GVTurnValve}", gasPanelTwoView.AGVPumpData.Feedback);
  941. }
  942. if (gasPanelTwoView.AUCPumpData != null && gasPanelTwoView.AUCPumpData.DefaultValue != gasPanelTwoView.AUCPumpData.Feedback)
  943. {
  944. PumpSetValues.Add(gasPanelTwoView.AUCPumpData.UniqueName, gasPanelTwoView.AUCPumpData.Feedback);
  945. // InvokeClient.Instance.Service.DoOperation($"{gasPanelTwoView.AUCPumpData.UniqueName}.{AITValveOperation.GVTurnValve}", gasPanelTwoView.AUCPumpData.Feedback);
  946. }
  947. if (gasPanelTwoView.BothPumpData != null && gasPanelTwoView.BothPumpData.DefaultValue != gasPanelTwoView.BothPumpData.Feedback)
  948. {
  949. PumpSetValues.Add(gasPanelTwoView.BothPumpData.UniqueName, gasPanelTwoView.BothPumpData.Feedback);
  950. // InvokeClient.Instance.Service.DoOperation($"{gasPanelTwoView.BothPumpData.UniqueName}.{AITValveOperation.GVTurnValve}", gasPanelTwoView.BothPumpData.Feedback);
  951. }
  952. if (gasPanelTwoView.ValveBWRData != null && gasPanelTwoView.ValveBWRData.DefaultValue != gasPanelTwoView.ValveBWRData.Feedback)
  953. {
  954. PumpSetValues.Add(gasPanelTwoView.ValveBWRData.UniqueName, gasPanelTwoView.ValveBWRData.Feedback);
  955. // InvokeClient.Instance.Service.DoOperation($"{gasPanelTwoView.ValveBWRData.UniqueName}.{AITValveOperation.GVTurnValve}", gasPanelTwoView.ValveBWRData.Feedback);
  956. }
  957. if (gasPanelTwoView.ValveDPRData != null && gasPanelTwoView.ValveDPRData.DefaultValue != gasPanelTwoView.ValveDPRData.Feedback)
  958. {
  959. PumpSetValues.Add(gasPanelTwoView.ValveDPRData.UniqueName, gasPanelTwoView.ValveDPRData.Feedback);
  960. // InvokeClient.Instance.Service.DoOperation($"{gasPanelTwoView.ValveDPRData.UniqueName}.{AITValveOperation.GVTurnValve}", gasPanelTwoView.ValveDPRData.Feedback);
  961. }
  962. F2HFClnOrHFCl2Values.Clear();
  963. if (gasPanelTwoView.IsDEPOOn != gasPanelTwoView.IsOldDEPOOn)
  964. {
  965. F2HFClnOrHFCl2Values.Add("PM1.SetDEPOEnable", gasPanelTwoView.IsDEPOOn);
  966. // InvokeClient.Instance.Service.DoOperation($"PM1.SetF2ClnEnable", gasPanelTwoView.IsF2ClnOn);
  967. }
  968. if (gasPanelTwoView.IsF2ClnOn != gasPanelTwoView.IsOldF2ClnOn)
  969. {
  970. F2HFClnOrHFCl2Values.Add("PM1.SetF2ClnEnable", gasPanelTwoView.IsF2ClnOn);
  971. // InvokeClient.Instance.Service.DoOperation($"PM1.SetF2ClnEnable", gasPanelTwoView.IsF2ClnOn);
  972. }
  973. if (gasPanelTwoView.IsHFClnOn != gasPanelTwoView.IsOldHFClnOn)
  974. {
  975. F2HFClnOrHFCl2Values.Add("PM1.SetHFClnEnable", gasPanelTwoView.IsHFClnOn);
  976. //InvokeClient.Instance.Service.DoOperation($"PM1.SetHFClnEnable", gasPanelTwoView.IsHFClnOn);
  977. }
  978. if (gasPanelTwoView.IsHTR1Enable != gasPanelTwoView.IsOldHTR1Enable)
  979. {
  980. F2HFClnOrHFCl2Values.Add("PM1.SetHTR1Enable", gasPanelTwoView.IsHTR1Enable);
  981. // InvokeClient.Instance.Service.DoOperation($"PM1.SetHTR1Enable", gasPanelTwoView.IsHTR1Enable);
  982. }
  983. if (gasPanelTwoView.IsHTR2Enable != gasPanelTwoView.IsOldHTR2Enable)
  984. {
  985. F2HFClnOrHFCl2Values.Add("PM1.SetHTR2Enable", gasPanelTwoView.IsHTR2Enable);
  986. //InvokeClient.Instance.Service.DoOperation($"PM1.SetHTR2Enable", gasPanelTwoView.IsHTR2Enable);
  987. }
  988. if (gasPanelTwoView.IsHTR3Enable != gasPanelTwoView.IsOldHTR3Enable)
  989. {
  990. F2HFClnOrHFCl2Values.Add("PM1.SetHTR3Enable", gasPanelTwoView.IsHTR3Enable);
  991. //InvokeClient.Instance.Service.DoOperation($"PM1.SetHTR2Enable", gasPanelTwoView.IsHTR2Enable);
  992. }
  993. if (gasPanelTwoView.IsCEXHOn != gasPanelTwoView.IsOldCEXHOn)
  994. {
  995. F2HFClnOrHFCl2Values.Add("PM1.SetCEXHEnable", gasPanelTwoView.IsCEXHOn);
  996. //InvokeClient.Instance.Service.DoOperation($"PM1.SetHTR2Enable", gasPanelTwoView.IsHTR2Enable);
  997. }
  998. }
  999. }
  1000. }
  1001. else if (!string.IsNullOrEmpty(toolType) && toolType.Equals(ConstantsCommon.NTP02))
  1002. {
  1003. FurnaceUI.Views.Maintenances.Maintenances.NTP02.GasPanelViewModel gasPanelTwoView = new Maintenances.Maintenances.NTP02.GasPanelViewModel();
  1004. gasPanelTwoView.MFCDataList = MFCDataList;
  1005. var rtn = (wm as WindowManager)?.ShowDialogWithTitle(gasPanelTwoView, null, " Gas Panel");
  1006. if ((bool)rtn)
  1007. {
  1008. DictValve = gasPanelTwoView.DictChangedValve;
  1009. DictMFC = ChangedDictMFC(gasPanelTwoView.DictChangedMFC);
  1010. foreach (var item in DictMFC)
  1011. {
  1012. var tempMFC = MFCDataList.FirstOrDefault(x => x.Name == item.Key);
  1013. if (tempMFC != null)
  1014. {
  1015. tempMFC.IsSetChanged = false;
  1016. tempMFC.Value = item.Value;
  1017. }
  1018. }
  1019. if (DictMFC.Count == 0)
  1020. {
  1021. for (int i = 0; i < MFCDataList.Count; i++)
  1022. {
  1023. double setLastPoint = (double)QueryDataClient.Instance.Service.GetConfig($"PM1.MFC.{MFCDataList[i].DisplayName}.SetLastPoint");
  1024. double setLastRamping = (double)QueryDataClient.Instance.Service.GetConfig($"PM1.MFC.{MFCDataList[i].DisplayName}.SetLastRamping");
  1025. MFCDataList[i].Value = setLastPoint.ToString("f3");
  1026. MFCDataList[i].Rampng = setLastRamping.ToString("f3");
  1027. MFCDataList[i].IsSetChanged = true;
  1028. };
  1029. }
  1030. if (gasPanelTwoView.DictChangedPumpValve.Count > 0)
  1031. {
  1032. PumpSetValues.Clear();
  1033. if (gasPanelTwoView.AGVPumpData != null && gasPanelTwoView.AGVPumpData.DefaultValue != gasPanelTwoView.AGVPumpData.Feedback)
  1034. {
  1035. PumpSetValues.Add(gasPanelTwoView.AGVPumpData.UniqueName, gasPanelTwoView.AGVPumpData.Feedback);
  1036. // InvokeClient.Instance.Service.DoOperation($"{gasPanelTwoView.AGVPumpData.UniqueName}.{AITValveOperation.GVTurnValve}", gasPanelTwoView.AGVPumpData.Feedback);
  1037. }
  1038. if (gasPanelTwoView.AUCPumpData != null && gasPanelTwoView.AUCPumpData.DefaultValue != gasPanelTwoView.AUCPumpData.Feedback)
  1039. {
  1040. PumpSetValues.Add(gasPanelTwoView.AUCPumpData.UniqueName, gasPanelTwoView.AUCPumpData.Feedback);
  1041. // InvokeClient.Instance.Service.DoOperation($"{gasPanelTwoView.AUCPumpData.UniqueName}.{AITValveOperation.GVTurnValve}", gasPanelTwoView.AUCPumpData.Feedback);
  1042. }
  1043. if (gasPanelTwoView.BothPumpData != null && gasPanelTwoView.BothPumpData.DefaultValue != gasPanelTwoView.BothPumpData.Feedback)
  1044. {
  1045. PumpSetValues.Add(gasPanelTwoView.BothPumpData.UniqueName, gasPanelTwoView.BothPumpData.Feedback);
  1046. // InvokeClient.Instance.Service.DoOperation($"{gasPanelTwoView.BothPumpData.UniqueName}.{AITValveOperation.GVTurnValve}", gasPanelTwoView.BothPumpData.Feedback);
  1047. }
  1048. if (gasPanelTwoView.ValveBWRData != null && gasPanelTwoView.ValveBWRData.DefaultValue != gasPanelTwoView.ValveBWRData.Feedback)
  1049. {
  1050. PumpSetValues.Add(gasPanelTwoView.ValveBWRData.UniqueName, gasPanelTwoView.ValveBWRData.Feedback);
  1051. // InvokeClient.Instance.Service.DoOperation($"{gasPanelTwoView.ValveBWRData.UniqueName}.{AITValveOperation.GVTurnValve}", gasPanelTwoView.ValveBWRData.Feedback);
  1052. }
  1053. if (gasPanelTwoView.ValveDPRData != null && gasPanelTwoView.ValveDPRData.DefaultValue != gasPanelTwoView.ValveDPRData.Feedback)
  1054. {
  1055. PumpSetValues.Add(gasPanelTwoView.ValveDPRData.UniqueName, gasPanelTwoView.ValveDPRData.Feedback);
  1056. // InvokeClient.Instance.Service.DoOperation($"{gasPanelTwoView.ValveDPRData.UniqueName}.{AITValveOperation.GVTurnValve}", gasPanelTwoView.ValveDPRData.Feedback);
  1057. }
  1058. F2HFClnOrHFCl2Values.Clear();
  1059. if (gasPanelTwoView.IsDEPOOn != gasPanelTwoView.IsOldDEPOOn)
  1060. {
  1061. F2HFClnOrHFCl2Values.Add("PM1.SetDEPOEnable", gasPanelTwoView.IsDEPOOn);
  1062. // InvokeClient.Instance.Service.DoOperation($"PM1.SetF2ClnEnable", gasPanelTwoView.IsF2ClnOn);
  1063. }
  1064. if (gasPanelTwoView.IsF2ClnOn != gasPanelTwoView.IsOldF2ClnOn)
  1065. {
  1066. F2HFClnOrHFCl2Values.Add("PM1.SetF2ClnEnable", gasPanelTwoView.IsF2ClnOn);
  1067. // InvokeClient.Instance.Service.DoOperation($"PM1.SetF2ClnEnable", gasPanelTwoView.IsF2ClnOn);
  1068. }
  1069. if (gasPanelTwoView.IsHFClnOn != gasPanelTwoView.IsOldHFClnOn)
  1070. {
  1071. F2HFClnOrHFCl2Values.Add("PM1.SetHFClnEnable", gasPanelTwoView.IsHFClnOn);
  1072. //InvokeClient.Instance.Service.DoOperation($"PM1.SetHFClnEnable", gasPanelTwoView.IsHFClnOn);
  1073. }
  1074. if (gasPanelTwoView.IsHTR1Enable != gasPanelTwoView.IsOldHTR1Enable)
  1075. {
  1076. F2HFClnOrHFCl2Values.Add("PM1.SetHTR1Enable", gasPanelTwoView.IsHTR1Enable);
  1077. // InvokeClient.Instance.Service.DoOperation($"PM1.SetHTR1Enable", gasPanelTwoView.IsHTR1Enable);
  1078. }
  1079. if (gasPanelTwoView.IsHTR2Enable != gasPanelTwoView.IsOldHTR2Enable)
  1080. {
  1081. F2HFClnOrHFCl2Values.Add("PM1.SetHTR2Enable", gasPanelTwoView.IsHTR2Enable);
  1082. //InvokeClient.Instance.Service.DoOperation($"PM1.SetHTR2Enable", gasPanelTwoView.IsHTR2Enable);
  1083. }
  1084. if (gasPanelTwoView.IsHTR3Enable != gasPanelTwoView.IsOldHTR3Enable)
  1085. {
  1086. F2HFClnOrHFCl2Values.Add("PM1.SetHTR3Enable", gasPanelTwoView.IsHTR3Enable);
  1087. //InvokeClient.Instance.Service.DoOperation($"PM1.SetHTR2Enable", gasPanelTwoView.IsHTR2Enable);
  1088. }
  1089. if (gasPanelTwoView.IsCEXHOn != gasPanelTwoView.IsOldCEXHOn)
  1090. {
  1091. F2HFClnOrHFCl2Values.Add("PM1.SetCEXHEnable", gasPanelTwoView.IsCEXHOn);
  1092. //InvokeClient.Instance.Service.DoOperation($"PM1.SetHTR2Enable", gasPanelTwoView.IsHTR2Enable);
  1093. }
  1094. }
  1095. }
  1096. }
  1097. else if (!string.IsNullOrEmpty(toolType) && toolType.Equals(ConstantsCommon.TiN))
  1098. {
  1099. FurnaceUI.Views.Maintenances.Maintenances.TiN.GasPanelViewModel gasPanelTwoView = new Maintenances.Maintenances.TiN.GasPanelViewModel();
  1100. gasPanelTwoView.MFCDataList = MFCDataList;
  1101. var rtn = (wm as WindowManager)?.ShowDialogWithTitle(gasPanelTwoView, null, " Gas Panel");
  1102. if ((bool)rtn)
  1103. {
  1104. DictValve = gasPanelTwoView.DictChangedValve;
  1105. DictMFC = ChangedDictMFC(gasPanelTwoView.DictChangedMFC);
  1106. foreach (var item in DictMFC)
  1107. {
  1108. var tempMFC = MFCDataList.FirstOrDefault(x => x.Name == item.Key);
  1109. if (tempMFC != null)
  1110. {
  1111. tempMFC.IsSetChanged = false;
  1112. tempMFC.Value = item.Value;
  1113. }
  1114. }
  1115. if (DictMFC.Count == 0)
  1116. {
  1117. for (int i = 0; i < MFCDataList.Count; i++)
  1118. {
  1119. double setLastPoint = (double)QueryDataClient.Instance.Service.GetConfig($"PM1.MFC.{MFCDataList[i].DisplayName}.SetLastPoint");
  1120. double setLastRamping = (double)QueryDataClient.Instance.Service.GetConfig($"PM1.MFC.{MFCDataList[i].DisplayName}.SetLastRamping");
  1121. MFCDataList[i].Value = setLastPoint.ToString("f3");
  1122. MFCDataList[i].Rampng = setLastRamping.ToString("f3");
  1123. MFCDataList[i].IsSetChanged = true;
  1124. };
  1125. }
  1126. if (gasPanelTwoView.DictChangedPumpValve.Count > 0)
  1127. {
  1128. PumpSetValues.Clear();
  1129. if (gasPanelTwoView.AGVPumpData != null && gasPanelTwoView.AGVPumpData.DefaultValue != gasPanelTwoView.AGVPumpData.Feedback)
  1130. {
  1131. PumpSetValues.Add(gasPanelTwoView.AGVPumpData.UniqueName, gasPanelTwoView.AGVPumpData.Feedback);
  1132. // InvokeClient.Instance.Service.DoOperation($"{gasPanelTwoView.AGVPumpData.UniqueName}.{AITValveOperation.GVTurnValve}", gasPanelTwoView.AGVPumpData.Feedback);
  1133. }
  1134. if (gasPanelTwoView.AUCPumpData != null && gasPanelTwoView.AUCPumpData.DefaultValue != gasPanelTwoView.AUCPumpData.Feedback)
  1135. {
  1136. PumpSetValues.Add(gasPanelTwoView.AUCPumpData.UniqueName, gasPanelTwoView.AUCPumpData.Feedback);
  1137. // InvokeClient.Instance.Service.DoOperation($"{gasPanelTwoView.AUCPumpData.UniqueName}.{AITValveOperation.GVTurnValve}", gasPanelTwoView.AUCPumpData.Feedback);
  1138. }
  1139. if (gasPanelTwoView.BothPumpData != null && gasPanelTwoView.BothPumpData.DefaultValue != gasPanelTwoView.BothPumpData.Feedback)
  1140. {
  1141. PumpSetValues.Add(gasPanelTwoView.BothPumpData.UniqueName, gasPanelTwoView.BothPumpData.Feedback);
  1142. // InvokeClient.Instance.Service.DoOperation($"{gasPanelTwoView.BothPumpData.UniqueName}.{AITValveOperation.GVTurnValve}", gasPanelTwoView.BothPumpData.Feedback);
  1143. }
  1144. if (gasPanelTwoView.ValveBWRData != null && gasPanelTwoView.ValveBWRData.DefaultValue != gasPanelTwoView.ValveBWRData.Feedback)
  1145. {
  1146. PumpSetValues.Add(gasPanelTwoView.ValveBWRData.UniqueName, gasPanelTwoView.ValveBWRData.Feedback);
  1147. // InvokeClient.Instance.Service.DoOperation($"{gasPanelTwoView.ValveBWRData.UniqueName}.{AITValveOperation.GVTurnValve}", gasPanelTwoView.ValveBWRData.Feedback);
  1148. }
  1149. if (gasPanelTwoView.ValveDPRData != null && gasPanelTwoView.ValveDPRData.DefaultValue != gasPanelTwoView.ValveDPRData.Feedback)
  1150. {
  1151. PumpSetValues.Add(gasPanelTwoView.ValveDPRData.UniqueName, gasPanelTwoView.ValveDPRData.Feedback);
  1152. // InvokeClient.Instance.Service.DoOperation($"{gasPanelTwoView.ValveDPRData.UniqueName}.{AITValveOperation.GVTurnValve}", gasPanelTwoView.ValveDPRData.Feedback);
  1153. }
  1154. F2HFClnOrHFCl2Values.Clear();
  1155. if (gasPanelTwoView.IsDEPOOn != gasPanelTwoView.IsOldDEPOOn)
  1156. {
  1157. F2HFClnOrHFCl2Values.Add("PM1.SetDEPOEnable", gasPanelTwoView.IsDEPOOn);
  1158. // InvokeClient.Instance.Service.DoOperation($"PM1.SetF2ClnEnable", gasPanelTwoView.IsF2ClnOn);
  1159. }
  1160. if (gasPanelTwoView.IsF2ClnOn != gasPanelTwoView.IsOldF2ClnOn)
  1161. {
  1162. F2HFClnOrHFCl2Values.Add("PM1.SetF2ClnEnable", gasPanelTwoView.IsF2ClnOn);
  1163. // InvokeClient.Instance.Service.DoOperation($"PM1.SetF2ClnEnable", gasPanelTwoView.IsF2ClnOn);
  1164. }
  1165. if (gasPanelTwoView.IsHFClnOn != gasPanelTwoView.IsOldHFClnOn)
  1166. {
  1167. F2HFClnOrHFCl2Values.Add("PM1.SetHFClnEnable", gasPanelTwoView.IsHFClnOn);
  1168. //InvokeClient.Instance.Service.DoOperation($"PM1.SetHFClnEnable", gasPanelTwoView.IsHFClnOn);
  1169. }
  1170. if (gasPanelTwoView.IsHTR1Enable != gasPanelTwoView.IsOldHTR1Enable)
  1171. {
  1172. F2HFClnOrHFCl2Values.Add("PM1.SetHTR1Enable", gasPanelTwoView.IsHTR1Enable);
  1173. // InvokeClient.Instance.Service.DoOperation($"PM1.SetHTR1Enable", gasPanelTwoView.IsHTR1Enable);
  1174. }
  1175. if (gasPanelTwoView.IsHTR2Enable != gasPanelTwoView.IsOldHTR2Enable)
  1176. {
  1177. F2HFClnOrHFCl2Values.Add("PM1.SetHTR2Enable", gasPanelTwoView.IsHTR2Enable);
  1178. //InvokeClient.Instance.Service.DoOperation($"PM1.SetHTR2Enable", gasPanelTwoView.IsHTR2Enable);
  1179. }
  1180. if (gasPanelTwoView.IsHTR3Enable != gasPanelTwoView.IsOldHTR3Enable)
  1181. {
  1182. F2HFClnOrHFCl2Values.Add("PM1.SetHTR3Enable", gasPanelTwoView.IsHTR3Enable);
  1183. //InvokeClient.Instance.Service.DoOperation($"PM1.SetHTR2Enable", gasPanelTwoView.IsHTR2Enable);
  1184. }
  1185. if (gasPanelTwoView.IsCEXHOn != gasPanelTwoView.IsOldCEXHOn)
  1186. {
  1187. F2HFClnOrHFCl2Values.Add("PM1.SetCEXHEnable", gasPanelTwoView.IsCEXHOn);
  1188. //InvokeClient.Instance.Service.DoOperation($"PM1.SetHTR2Enable", gasPanelTwoView.IsHTR2Enable);
  1189. }
  1190. }
  1191. }
  1192. }
  1193. else
  1194. {
  1195. FurnaceUI.Views.Maintenances.GasPanelTwoViewModel gasPanelTwoView = new FurnaceUI.Views.Maintenances.GasPanelTwoViewModel();
  1196. gasPanelTwoView.MFCDataList = MFCDataList;
  1197. var rtn = (wm as WindowManager)?.ShowDialogWithTitle(gasPanelTwoView, null, " Gas Panel");
  1198. if ((bool)rtn)
  1199. {
  1200. DictValve = gasPanelTwoView.DictChangedValve;
  1201. DictMFC = ChangedDictMFC(gasPanelTwoView.DictChangedMFC);
  1202. foreach (var item in DictMFC)
  1203. {
  1204. var tempMFC = MFCDataList.FirstOrDefault(x => x.Name == item.Key);
  1205. if (tempMFC != null)
  1206. {
  1207. tempMFC.IsSetChanged = false;
  1208. tempMFC.Value = item.Value;
  1209. }
  1210. }
  1211. if (DictMFC.Count == 0)
  1212. {
  1213. for (int i = 0; i < MFCDataList.Count; i++)
  1214. {
  1215. double setLastPoint = (double)QueryDataClient.Instance.Service.GetConfig($"PM1.MFC.{MFCDataList[i].DisplayName}.SetLastPoint");
  1216. double setLastRamping = (double)QueryDataClient.Instance.Service.GetConfig($"PM1.MFC.{MFCDataList[i].DisplayName}.SetLastRamping");
  1217. MFCDataList[i].Value = setLastPoint.ToString("f3");
  1218. MFCDataList[i].Rampng = setLastRamping.ToString("f3");
  1219. MFCDataList[i].IsSetChanged = true;
  1220. };
  1221. }
  1222. if (gasPanelTwoView.DictChangedPumpValve.Count > 0)
  1223. {
  1224. PumpSetValues.Clear();
  1225. if (gasPanelTwoView.AGVPumpData != null && gasPanelTwoView.AGVPumpData.DefaultValue != gasPanelTwoView.AGVPumpData.Feedback)
  1226. {
  1227. PumpSetValues.Add(gasPanelTwoView.AGVPumpData.UniqueName, gasPanelTwoView.AGVPumpData.Feedback);
  1228. // InvokeClient.Instance.Service.DoOperation($"{gasPanelTwoView.AGVPumpData.UniqueName}.{AITValveOperation.GVTurnValve}", gasPanelTwoView.AGVPumpData.Feedback);
  1229. }
  1230. if (gasPanelTwoView.AUCPumpData != null && gasPanelTwoView.AUCPumpData.DefaultValue != gasPanelTwoView.AUCPumpData.Feedback)
  1231. {
  1232. PumpSetValues.Add(gasPanelTwoView.AUCPumpData.UniqueName, gasPanelTwoView.AUCPumpData.Feedback);
  1233. // InvokeClient.Instance.Service.DoOperation($"{gasPanelTwoView.AUCPumpData.UniqueName}.{AITValveOperation.GVTurnValve}", gasPanelTwoView.AUCPumpData.Feedback);
  1234. }
  1235. if (gasPanelTwoView.BothPumpData != null && gasPanelTwoView.BothPumpData.DefaultValue != gasPanelTwoView.BothPumpData.Feedback)
  1236. {
  1237. PumpSetValues.Add(gasPanelTwoView.BothPumpData.UniqueName, gasPanelTwoView.BothPumpData.Feedback);
  1238. // InvokeClient.Instance.Service.DoOperation($"{gasPanelTwoView.BothPumpData.UniqueName}.{AITValveOperation.GVTurnValve}", gasPanelTwoView.BothPumpData.Feedback);
  1239. }
  1240. if (gasPanelTwoView.ValveBWRData != null && gasPanelTwoView.ValveBWRData.DefaultValue != gasPanelTwoView.ValveBWRData.Feedback)
  1241. {
  1242. PumpSetValues.Add(gasPanelTwoView.ValveBWRData.UniqueName, gasPanelTwoView.ValveBWRData.Feedback);
  1243. // InvokeClient.Instance.Service.DoOperation($"{gasPanelTwoView.ValveBWRData.UniqueName}.{AITValveOperation.GVTurnValve}", gasPanelTwoView.ValveBWRData.Feedback);
  1244. }
  1245. if (gasPanelTwoView.ValveDPRData != null && gasPanelTwoView.ValveDPRData.DefaultValue != gasPanelTwoView.ValveDPRData.Feedback)
  1246. {
  1247. PumpSetValues.Add(gasPanelTwoView.ValveDPRData.UniqueName, gasPanelTwoView.ValveDPRData.Feedback);
  1248. // InvokeClient.Instance.Service.DoOperation($"{gasPanelTwoView.ValveDPRData.UniqueName}.{AITValveOperation.GVTurnValve}", gasPanelTwoView.ValveDPRData.Feedback);
  1249. }
  1250. F2HFClnOrHFCl2Values.Clear();
  1251. if (gasPanelTwoView.IsF2ClnOn != gasPanelTwoView.IsOldF2ClnOn)
  1252. {
  1253. F2HFClnOrHFCl2Values.Add("PM1.SetF2ClnEnable", gasPanelTwoView.IsF2ClnOn);
  1254. // InvokeClient.Instance.Service.DoOperation($"PM1.SetF2ClnEnable", gasPanelTwoView.IsF2ClnOn);
  1255. }
  1256. if (gasPanelTwoView.IsHFClnOn != gasPanelTwoView.IsOldHFClnOn)
  1257. {
  1258. F2HFClnOrHFCl2Values.Add("PM1.SetHFClnEnable", gasPanelTwoView.IsHFClnOn);
  1259. //InvokeClient.Instance.Service.DoOperation($"PM1.SetHFClnEnable", gasPanelTwoView.IsHFClnOn);
  1260. }
  1261. if (gasPanelTwoView.IsHTR1Enable != gasPanelTwoView.IsOldHTR1Enable)
  1262. {
  1263. F2HFClnOrHFCl2Values.Add("PM1.SetHTR1Enable", gasPanelTwoView.IsHTR1Enable);
  1264. // InvokeClient.Instance.Service.DoOperation($"PM1.SetHTR1Enable", gasPanelTwoView.IsHTR1Enable);
  1265. }
  1266. if (gasPanelTwoView.IsHTR2Enable != gasPanelTwoView.IsOldHTR2Enable)
  1267. {
  1268. F2HFClnOrHFCl2Values.Add("PM1.SetHTR2Enable", gasPanelTwoView.IsHTR2Enable);
  1269. //InvokeClient.Instance.Service.DoOperation($"PM1.SetHTR2Enable", gasPanelTwoView.IsHTR2Enable);
  1270. }
  1271. }
  1272. }
  1273. }
  1274. }
  1275. public void SwitchPage(string page)
  1276. {
  1277. switch (page)
  1278. {
  1279. case "Pressure":
  1280. {
  1281. ClientApp.Instance.SwitchPage("maintenance", "GasPanel", null);
  1282. }
  1283. break;
  1284. }
  1285. }
  1286. public void RampSetClick(object sender)
  1287. {
  1288. string strSetRamp = ShowNumberKeyboard(sender as Button, "", 1);
  1289. foreach (var item in TempList)
  1290. {
  1291. item.Rampng = strSetRamp;
  1292. item.IsRampngChanged = false;
  1293. }
  1294. }
  1295. private string ShowNumberKeyboard(Control control, string defaultValue, int keepDecimals = -1)
  1296. {
  1297. NumberKeyboard numberKeyboard = new NumberKeyboard("", defaultValue);
  1298. numberKeyboard.KeepDecimals = keepDecimals;
  1299. var point = control.PointFromScreen(new Point(0, 0));
  1300. double wx = SystemParameters.WorkArea.Width;
  1301. double hy = SystemParameters.WorkArea.Height;
  1302. if (-point.Y + control.ActualHeight + 5 + numberKeyboard.Height < hy)
  1303. {
  1304. numberKeyboard.Top = -point.Y + control.ActualHeight + 5;
  1305. }
  1306. else
  1307. {
  1308. numberKeyboard.Top = -point.Y - numberKeyboard.Height - 5;
  1309. }
  1310. if (-point.X + numberKeyboard.Width < wx)
  1311. {
  1312. numberKeyboard.Left = -point.X;
  1313. }
  1314. else
  1315. {
  1316. numberKeyboard.Left = -point.X - (numberKeyboard.Width - control.ActualWidth);
  1317. }
  1318. if ((bool)numberKeyboard.ShowDialog())
  1319. return numberKeyboard.ValueString;
  1320. else
  1321. return "Cancel";
  1322. }
  1323. private string SplitTemperatureControlMode(string str)
  1324. {
  1325. if (string.IsNullOrEmpty(str))
  1326. {
  1327. return str;
  1328. }
  1329. if (str.Contains("Profile("))
  1330. {
  1331. return str.Replace("Profile(", "").Replace(")", "").Replace(",", ":");
  1332. }
  1333. return str;
  1334. }
  1335. public void TempTextClick(string type, object sender)
  1336. {
  1337. switch (type)
  1338. {
  1339. case "Mode":
  1340. RecipeTempModeViewModel recipeTempModeViewModel = new RecipeTempModeViewModel();
  1341. recipeTempModeViewModel.SelectBtnName = SelectBtnName;
  1342. recipeTempModeViewModel.IsManualSet = true;
  1343. recipeTempModeViewModel.SelectProfileTable = SplitTemperatureControlMode(TemperatureControlMode);
  1344. var rtn = (wm as WindowManager)?.ShowDialogWithTitle(recipeTempModeViewModel, null, "Temp Mode");
  1345. if ((bool)rtn)
  1346. {
  1347. SelectBtnName = recipeTempModeViewModel.SelectBtnName;
  1348. if (null != recipeTempModeViewModel && !string.IsNullOrEmpty(recipeTempModeViewModel.ResultString) && recipeTempModeViewModel.ResultString.Contains("Profile"))
  1349. {
  1350. SelectBtnName = "Profile";
  1351. }
  1352. if (!string.IsNullOrEmpty(recipeTempModeViewModel.ResultString) && recipeTempModeViewModel.ResultString.Contains("Profile(,"))
  1353. {
  1354. recipeTempModeViewModel.ResultString = recipeTempModeViewModel.ResultString.Replace("Profile(,", "Profile(");
  1355. }
  1356. TemperatureControlMode = recipeTempModeViewModel.ResultString;
  1357. }
  1358. break;
  1359. case "Correct":
  1360. TempCorrectionEditViewModel tempCorrectionEditViewModel = new TempCorrectionEditViewModel();
  1361. tempCorrectionEditViewModel.ResultString = TemperatureCorrect;
  1362. tempCorrectionEditViewModel.IsManualSet = true;
  1363. //tempCorrectionEditViewModel.SelectedRecipeStep = CurrentRecipe.Steps.Where(x => x.StepNo == SelectedRecipeStep.StepNo).FirstOrDefault();
  1364. tempCorrectionEditViewModel.IsEnabledControl = false;
  1365. tempCorrectionEditViewModel.AutoSelectVisibility = Visibility.Visible;
  1366. // tempOffsetTableViewModel.SelectedRecipeStep = SelectedRecipeStep;
  1367. rtn = (wm as WindowManager)?.ShowDialogWithTitle(tempCorrectionEditViewModel, null, "Temp Correct Table");
  1368. if ((bool)rtn)
  1369. {
  1370. TemperatureCorrect = tempCorrectionEditViewModel.ResultString;
  1371. }
  1372. break;
  1373. case "PID":
  1374. TempOffsetTableViewModel tempOffsetTableViewModel1 = new TempOffsetTableViewModel();
  1375. tempOffsetTableViewModel1.CboAutoSelectChecked = false;
  1376. tempOffsetTableViewModel1.IsEnabledControl = false;
  1377. tempOffsetTableViewModel1.IsManualSet = true;
  1378. tempOffsetTableViewModel1.TempOffsetTableSelected = TemperaturePID;
  1379. rtn = (wm as WindowManager)?.ShowDialogWithTitle(tempOffsetTableViewModel1, null, "Temp PID Table");
  1380. if ((bool)rtn)
  1381. {
  1382. TemperaturePID = tempOffsetTableViewModel1.TempOffsetTableSelected;
  1383. }
  1384. break;
  1385. default:
  1386. break;
  1387. }
  1388. }
  1389. private ObservableCollection<AUXData> _aUXDatas;
  1390. public void StepEdit(object cmdName, object value)
  1391. {
  1392. switch ((string)cmdName)
  1393. {
  1394. case "GASSetting":
  1395. RecipeMFCSettingViewModel recipeMFCSettingViewModel = new RecipeMFCSettingViewModel();
  1396. //InvokeClient.Instance.Service.DoOperation($"PM1.SetSensorRecipeOK", "");
  1397. //var tempMFCSets = CurrentRecipe.Steps.Where(x => x.StepNo == SelectedRecipeStep.StepNo).FirstOrDefault().MFCSets;
  1398. //if (tempMFCSets != null && tempMFCSets.Count > 0)
  1399. //{
  1400. // foreach (var item in tempMFCSets.Keys)
  1401. // {
  1402. // if (recipeMFCSettingViewModel.MFCSets.ContainsKey(item))
  1403. // {
  1404. // recipeMFCSettingViewModel.MFCSets[item] = tempMFCSets[item];
  1405. // }
  1406. // else
  1407. // {
  1408. // //recipeGASSettingViewModel.MFCSets.Add(item, tempMFCSets[item]);
  1409. // recipeMFCSettingViewModel.MFCSets.Add(item, new MFCValue() { AlarmValue = tempMFCSets[item].MinValue, IsNotifying = tempMFCSets[item].IsNotifying, MaxValue = tempMFCSets[item].MaxValue, MinValue = tempMFCSets[item].MinValue, IsCheck = tempMFCSets[item].IsCheck, Name = tempMFCSets[item].Name, Rampng = tempMFCSets[item].Rampng, Value = tempMFCSets[item].Value });
  1410. // }
  1411. // }
  1412. //}
  1413. ////recipeGASSettingViewModel.MFMSets = new MFMValue() { AlarmValue = tempMFMSets.AlarmValue, IsNotifying = tempMFMSets.IsNotifying, Name = tempMFMSets.Name, Value = tempMFMSets.Value };
  1414. //recipeMFCSettingViewModel.RecipeType = RecipeType;
  1415. //recipeMFCSettingViewModel.RecipeTemplate = RecipeTemplate;
  1416. //if (!(bool)(windowManager as WindowManager)?.ShowDialogWithTitle(recipeMFCSettingViewModel, null, "MFC Detail"))
  1417. //{
  1418. // //InvokeClient.Instance.Service.DoOperation($"PM1.SetSensorPROCManualOK", "");
  1419. // return;
  1420. //}
  1421. ////InvokeClient.Instance.Service.DoOperation($"PM1.SetSensorPROCManualOK", "");
  1422. //if (CurrentRecipe.Steps.Where(x => x.StepNo == SelectedRecipeStep.StepNo).FirstOrDefault().MFCSets != null)
  1423. //{
  1424. // if (recipeMFCSettingViewModel.MFCSets != null && recipeMFCSettingViewModel.MFCSets.Count > 0)
  1425. // {
  1426. // CurrentRecipe.Steps.Where(x => x.StepNo == SelectedRecipeStep.StepNo).FirstOrDefault().MFCSets = recipeMFCSettingViewModel.MFCSets;
  1427. // }
  1428. //}
  1429. break;
  1430. case "PressureSetting":
  1431. RecipePressureSettingViewModel recipePressureSettingViewModel = new RecipePressureSettingViewModel();
  1432. //var tempStep = CurrentRecipe.Steps.Where(x => x.StepNo == SelectedRecipeStep.StepNo).FirstOrDefault();
  1433. //recipePressureSettingViewModel.PressureSonsorValue = tempStep.PressureSonserValue;
  1434. //recipePressureSettingViewModel.PressureValveAngleValue = tempStep.PressureValveAngle;
  1435. //recipePressureSettingViewModel.PressureSettingVG = tempStep.PressureSettingVG;
  1436. //if (!string.IsNullOrEmpty(tempStep.PressureAlarmTableNo))
  1437. //{
  1438. // if (tempStep.PressureAlarmTableNo.ToLower() == "none")
  1439. // recipePressureSettingViewModel.PressureAlarmWatchTable = "None";
  1440. // else
  1441. // recipePressureSettingViewModel.PressureAlarmWatchTable = tempStep.PressureAlarmTableNo;
  1442. //}
  1443. //if ((bool)(windowManager as WindowManager)?.ShowDialogWithTitle(recipePressureSettingViewModel, null, "Recipe Pressure Setting"))
  1444. //{
  1445. // if (CurrentRecipe.Steps.Where(x => x.StepNo == SelectedRecipeStep.StepNo).FirstOrDefault() != null)
  1446. // {
  1447. // CurrentRecipe.Steps.Where(x => x.StepNo == SelectedRecipeStep.StepNo).FirstOrDefault().PressureSonserValue = recipePressureSettingViewModel.PressureSonsorValue;
  1448. // CurrentRecipe.Steps.Where(x => x.StepNo == SelectedRecipeStep.StepNo).FirstOrDefault().PressureValveAngle = recipePressureSettingViewModel.PressureValveAngleValue;
  1449. // CurrentRecipe.Steps.Where(x => x.StepNo == SelectedRecipeStep.StepNo).FirstOrDefault().PressureAlarmTableNo = recipePressureSettingViewModel.PressureAlarmWatchTable;
  1450. // CurrentRecipe.Steps.Where(x => x.StepNo == SelectedRecipeStep.StepNo).FirstOrDefault().PressureSettingVG = recipePressureSettingViewModel.PressureSettingVG;
  1451. // SelectedRecipeStep.PressureSonserValue = $"{recipePressureSettingViewModel.PressureSonsorValue}";
  1452. // }
  1453. //}
  1454. break;
  1455. case "RFSetting":
  1456. //RecipeRFPressureSettingViewModel recipeRFPressureSettingViewModel = new RecipeRFPressureSettingViewModel();
  1457. //var tempRecipeStep = CurrentRecipe.Steps.Where(x => x.StepNo == SelectedRecipeStep.StepNo).FirstOrDefault();
  1458. //recipeRFPressureSettingViewModel.RFSwitch = tempRecipeStep.RFSwitch;
  1459. //recipeRFPressureSettingViewModel.RFSetPointValue = tempRecipeStep.RFSetpoint;
  1460. //recipeRFPressureSettingViewModel.C1SetPointValue = tempRecipeStep.C1Setpoint;
  1461. //recipeRFPressureSettingViewModel.C2SetPointValue = tempRecipeStep.C2Setpoint;
  1462. //recipeRFPressureSettingViewModel.ForwardPowerAlarmWatchSetPointValue = tempRecipeStep.ForwardPowerAlarmWatchTable;
  1463. //recipeRFPressureSettingViewModel.PrAlarmWatchSetPointValue = tempRecipeStep.PrAlarmWatchTable;
  1464. //recipeRFPressureSettingViewModel.PIAlarmWatchSetPointValue = tempRecipeStep.PIAlarmWatchTable;
  1465. //recipeRFPressureSettingViewModel.C1AlarmWatchSetPointValue = tempRecipeStep.C1AlarmWatchTable;
  1466. //recipeRFPressureSettingViewModel.C2AlarmWatchSetPointValue = tempRecipeStep.C2AlarmWatchTable;
  1467. //recipeRFPressureSettingViewModel.VppAlarmWatchSetPointValue = tempRecipeStep.VppAlarmWatchTable;
  1468. //recipeRFPressureSettingViewModel.VdcAlarmWatchSetPointValue = tempRecipeStep.VdcAlarmWatchTable;
  1469. //if ((bool)(windowManager as WindowManager)?.ShowDialogWithTitle(recipeRFPressureSettingViewModel, null, "Recipe RF Setting"))
  1470. //{
  1471. // if (CurrentRecipe.Steps.Where(x => x.StepNo == SelectedRecipeStep.StepNo).FirstOrDefault() != null)
  1472. // {
  1473. // CurrentRecipe.Steps.Where(x => x.StepNo == SelectedRecipeStep.StepNo).FirstOrDefault().RFSwitch = recipeRFPressureSettingViewModel.RFSwitch;
  1474. // CurrentRecipe.Steps.Where(x => x.StepNo == SelectedRecipeStep.StepNo).FirstOrDefault().RFSetpoint = recipeRFPressureSettingViewModel.RFSetPointValue;
  1475. // CurrentRecipe.Steps.Where(x => x.StepNo == SelectedRecipeStep.StepNo).FirstOrDefault().C1Setpoint = recipeRFPressureSettingViewModel.C1SetPointValue;
  1476. // CurrentRecipe.Steps.Where(x => x.StepNo == SelectedRecipeStep.StepNo).FirstOrDefault().C2Setpoint = recipeRFPressureSettingViewModel.C2SetPointValue;
  1477. // CurrentRecipe.Steps.Where(x => x.StepNo == SelectedRecipeStep.StepNo).FirstOrDefault().ForwardPowerAlarmWatchTable = recipeRFPressureSettingViewModel.ForwardPowerAlarmWatchSetPointValue;
  1478. // CurrentRecipe.Steps.Where(x => x.StepNo == SelectedRecipeStep.StepNo).FirstOrDefault().PrAlarmWatchTable = recipeRFPressureSettingViewModel.PrAlarmWatchSetPointValue;
  1479. // CurrentRecipe.Steps.Where(x => x.StepNo == SelectedRecipeStep.StepNo).FirstOrDefault().PIAlarmWatchTable = recipeRFPressureSettingViewModel.PIAlarmWatchSetPointValue;
  1480. // CurrentRecipe.Steps.Where(x => x.StepNo == SelectedRecipeStep.StepNo).FirstOrDefault().C1AlarmWatchTable = recipeRFPressureSettingViewModel.C1AlarmWatchSetPointValue;
  1481. // CurrentRecipe.Steps.Where(x => x.StepNo == SelectedRecipeStep.StepNo).FirstOrDefault().C2AlarmWatchTable = recipeRFPressureSettingViewModel.C2AlarmWatchSetPointValue;
  1482. // CurrentRecipe.Steps.Where(x => x.StepNo == SelectedRecipeStep.StepNo).FirstOrDefault().VppAlarmWatchTable = recipeRFPressureSettingViewModel.VppAlarmWatchSetPointValue;
  1483. // CurrentRecipe.Steps.Where(x => x.StepNo == SelectedRecipeStep.StepNo).FirstOrDefault().VdcAlarmWatchTable = recipeRFPressureSettingViewModel.VdcAlarmWatchSetPointValue;
  1484. // // SelectedRecipeStep.RFSetting = $"{recipeRFPressureSettingViewModel.RFSetPointValue}";
  1485. // }
  1486. //}
  1487. break;
  1488. case "Loader":
  1489. RecipeLoaderCommandViewModel recipeLoaderCommandViewModel = new RecipeLoaderCommandViewModel();
  1490. recipeLoaderCommandViewModel.SetRecipeProcessEditViewEnable = false;
  1491. if ((bool)(wm as WindowManager)?.ShowDialogWithTitle(recipeLoaderCommandViewModel, null, "Loader Command"))
  1492. {
  1493. ClearLoaderSetValue();
  1494. LoaderCommand = recipeLoaderCommandViewModel.ReturnString;
  1495. SetShowLoaderValuePanel(recipeLoaderCommandViewModel.ReturnString);
  1496. }
  1497. break;
  1498. case "Pressure":
  1499. ManualPressCommandViewModel recipePressCommandViewModel = new ManualPressCommandViewModel();
  1500. recipePressCommandViewModel.SetRecipeProcessEditViewEnable = false;
  1501. recipePressCommandViewModel.SelectedCmd = PressCommand;
  1502. if ((bool)(wm as WindowManager)?.ShowDialogWithTitle(recipePressCommandViewModel, null, "Press Command"))
  1503. {
  1504. DefaultUnit = recipePressCommandViewModel.DefaultUnit;
  1505. string returnString = recipePressCommandViewModel.ReturnString;
  1506. PressCommand = returnString;
  1507. SetShowPressPanel(returnString);
  1508. }
  1509. break;
  1510. case "Pattern":
  1511. RecipeGasPanelSettingViewModel recipeGasPanelSettingViewModel = new RecipeGasPanelSettingViewModel();
  1512. //recipeGasPanelSettingViewModel.CurrentRecipe = CurrentRecipe;
  1513. //recipeGasPanelSettingViewModel.SelectedStepName = $"{SelectedRecipeStep.StepNo}:{SelectedRecipeStep.Name}";
  1514. //recipeGasPanelSettingViewModel.ChangedStepEvent += RecipeGasPanelSettingViewModel_ChangedStepEvent;
  1515. //recipeGasPanelSettingViewModel.SelectedStep = CurrentRecipe.Steps.Where(x => x.StepNo == SelectedRecipeStep.StepNo).FirstOrDefault();
  1516. if ((bool)(wm as WindowManager)?.ShowDialogWithTitle(recipeGasPanelSettingViewModel, null, "Valve"))
  1517. {
  1518. }
  1519. break;
  1520. case "BoatElevatorSetting":
  1521. BoatElevatorSettingViewModel boatElevatorSettingViewModel = new BoatElevatorSettingViewModel();
  1522. //boatElevatorSettingViewModel.SelectedRecipeStep = SelectedRecipeStep;
  1523. //if ((bool)(windowManager as WindowManager)?.ShowDialogWithTitle(boatElevatorSettingViewModel, null, "BoatElevator Setting"))
  1524. //{
  1525. // CurrentRecipe.Steps.Where(x => x.StepNo == SelectedRecipeStep.StepNo).FirstOrDefault().ZAxisPosition = boatElevatorSettingViewModel.SelectedRecipeStep.ZAxisPosition;
  1526. // CurrentRecipe.Steps.Where(x => x.StepNo == SelectedRecipeStep.StepNo).FirstOrDefault().ZAxisSpeed = boatElevatorSettingViewModel.SelectedRecipeStep.ZAxisSpeed;
  1527. // CurrentRecipe.Steps.Where(x => x.StepNo == SelectedRecipeStep.StepNo).FirstOrDefault().RotatePosition = boatElevatorSettingViewModel.SelectedRecipeStep.RotatePosition;
  1528. // CurrentRecipe.Steps.Where(x => x.StepNo == SelectedRecipeStep.StepNo).FirstOrDefault().RotateSpeed = boatElevatorSettingViewModel.SelectedRecipeStep.RotateSpeed;
  1529. // CurrentRecipe.Steps.Where(x => x.StepNo == SelectedRecipeStep.StepNo).FirstOrDefault().RotateInterval = boatElevatorSettingViewModel.SelectedRecipeStep.RotateInterval;
  1530. // CurrentRecipe.Steps.Where(x => x.StepNo == SelectedRecipeStep.StepNo).FirstOrDefault().RotateDirection = boatElevatorSettingViewModel.SelectedRecipeStep.RotateDirection;
  1531. //}
  1532. break;
  1533. case "AUX":
  1534. RecipeAUXSetViewModel recipeAUXSetViewModel = new RecipeAUXSetViewModel();
  1535. if (_aUXDatas != null && _aUXDatas.Count > 0)
  1536. {
  1537. recipeAUXSetViewModel.AUXDataList.Clear();
  1538. _aUXDatas.ToList().ForEach(x => recipeAUXSetViewModel.AUXDataList.Add(x));
  1539. }
  1540. else
  1541. {
  1542. int i = 1;
  1543. recipeAUXSetViewModel.AUXDataList.Clear();
  1544. foreach (var item in AUXDetailDatas)
  1545. {
  1546. var tempAux = new AUXData();
  1547. tempAux.No = i;
  1548. tempAux.ControlName = i.ToString();
  1549. tempAux.DisplayName = item.DisplayName;
  1550. tempAux.SetValue = new DoubleParam() { Name = "SetValue", Value = item.SetPoint.ToString() };
  1551. tempAux.IsCheck = new BoolParam() { Name = "IsCheck", Value = false };
  1552. tempAux.MaxValue = new DoubleParam() { Name = "MaxValue", Value = item.WarningHighLimit.ToString() };
  1553. tempAux.MinValue = new DoubleParam() { Name = "MinValue", Value = item.WarningLowLimit.ToString() };
  1554. tempAux.SetUnit = new StringParam() { Name = "SetUnit", Value = item.Unit };
  1555. recipeAUXSetViewModel.AUXDataList.Add(tempAux);
  1556. i++;
  1557. }
  1558. }
  1559. if ((bool)(wm as WindowManager)?.ShowDialogWithTitle(recipeAUXSetViewModel, null, "AUX Set"))
  1560. {
  1561. _aUXDatas = recipeAUXSetViewModel.AUXDataList;
  1562. }
  1563. break;
  1564. case "RecipeHeader":
  1565. RecipeHeaderViewModel recipeHeaderViewModel = new RecipeHeaderViewModel();
  1566. if ((bool)(wm as WindowManager)?.ShowDialogWithTitle(recipeHeaderViewModel, null, "Recipe Header"))
  1567. {
  1568. }
  1569. break;
  1570. case "Combination":
  1571. //StringParam strCombination = CurrentRecipe.ConfigItems.FirstOrDefault(x => x.Name == "Combination") as StringParam;
  1572. //RecipeCombinationViewModel recipeCombinationViewModel = new RecipeCombinationViewModel();
  1573. //recipeCombinationViewModel.CombinationStr = strCombination.Value;
  1574. //if ((bool)(windowManager as WindowManager)?.ShowDialogWithTitle(recipeCombinationViewModel, null, "Combination"))
  1575. //{
  1576. // strCombination.Value = recipeCombinationViewModel.Combination.ToString();
  1577. //}
  1578. break;
  1579. case "VPDataList":
  1580. RecipeVPItemSelectViewModel recipeVPItemSelectViewModel = new RecipeVPItemSelectViewModel();
  1581. if ((bool)(wm as WindowManager)?.ShowDialogWithTitle(recipeVPItemSelectViewModel, null, "VP Item Select"))
  1582. {
  1583. }
  1584. break;
  1585. case "SkipOrWait":
  1586. RecipeSkipWaitCommandViewModel recipeSkipWaitCommandViewModel = new RecipeSkipWaitCommandViewModel();
  1587. //recipeSkipWaitCommandViewModel.SkipWait = CurrentRecipe.Steps.Where(x => x.StepNo == SelectedRecipeStep.StepNo).FirstOrDefault().SkipWait;
  1588. //if ((bool)(windowManager as WindowManager)?.ShowDialogWithTitle(recipeSkipWaitCommandViewModel, null, "Skip or wait command"))
  1589. //{
  1590. // CurrentRecipe.Steps.Where(x => x.StepNo == SelectedRecipeStep.StepNo).FirstOrDefault().SkipWait = recipeSkipWaitCommandViewModel.RtnString;
  1591. // SelectedRecipeStep.SkipWait = recipeSkipWaitCommandViewModel.RtnString;
  1592. //}
  1593. break;
  1594. default:
  1595. break;
  1596. }
  1597. }
  1598. public void MFCTextChanged(string type, object sender, object item)
  1599. {
  1600. try
  1601. {
  1602. if (!string.IsNullOrEmpty(type) && item != null && sender != null)
  1603. {
  1604. MFCGasData mFCData = (MFCGasData)item;
  1605. string value = ((TextBox)sender).Text;
  1606. string proStr = $"{mFCData.Name}Data";
  1607. Type type1 = typeof(ManualSetViewModel);
  1608. PropertyInfo property = type1.GetProperty(proStr);
  1609. if (property == null) return;
  1610. AITMfcData aITMfcData = (AITMfcData)property.GetValue(this);
  1611. double setValue = 0;
  1612. double.TryParse(value, out setValue);
  1613. switch (type)
  1614. {
  1615. case "Value":
  1616. mFCData.Value = value;
  1617. if (setValue != aITMfcData.SetPoint)
  1618. {
  1619. mFCData.IsSetChanged = false;
  1620. }
  1621. else
  1622. {
  1623. // mFCData.IsSetChanged = true;
  1624. }
  1625. break;
  1626. case "Rampng":
  1627. mFCData.Rampng = value;
  1628. if (setValue != aITMfcData.Ramping)
  1629. {
  1630. mFCData.IsRampngChanged = false;
  1631. }
  1632. else
  1633. {
  1634. // mFCData.IsRampngChanged = true;
  1635. }
  1636. break;
  1637. default:
  1638. break;
  1639. }
  1640. }
  1641. }
  1642. catch (Exception ex)
  1643. {
  1644. LOG.Write(ex);
  1645. }
  1646. }
  1647. public void TempTextChanged(string type, object sender, object item)
  1648. {
  1649. try
  1650. {
  1651. if (!string.IsNullOrEmpty(type) && item != null && sender != null)
  1652. {
  1653. TempManualSetData tempData = (TempManualSetData)item;
  1654. string value = ((TextBox)sender).Text;
  1655. string proStr = tempData.ControlName;
  1656. Type type1 = typeof(ManualSetViewModel);
  1657. PropertyInfo property = type1.GetProperty(proStr);
  1658. if (property == null) return;
  1659. AITHeaterData aITHeaterData = (AITHeaterData)property.GetValue(this);
  1660. double setValue = 0;
  1661. double.TryParse(value, out setValue);
  1662. switch (type)
  1663. {
  1664. case "Value":
  1665. tempData.Value = value;
  1666. if (setValue != aITHeaterData.SetPoint)
  1667. {
  1668. tempData.IsSetChanged = false;
  1669. }
  1670. else
  1671. {
  1672. // tempData.IsSetChanged = false;
  1673. }
  1674. break;
  1675. case "Ramp":
  1676. tempData.Rampng = value;
  1677. if (setValue != aITHeaterData.RampSetPoint)
  1678. {
  1679. tempData.IsRampngChanged = false;
  1680. }
  1681. else
  1682. {
  1683. // tempData.IsRampngChanged = false;
  1684. }
  1685. break;
  1686. default:
  1687. break;
  1688. }
  1689. }
  1690. }
  1691. catch (Exception ex)
  1692. {
  1693. LOG.Write(ex);
  1694. }
  1695. }
  1696. private string oldPressStr = "";
  1697. public void Exec()
  1698. {
  1699. if (!DialogBox.Confirm("Are you sure to execute?"))
  1700. return;
  1701. if (DictValve != null && DictValve.Count > 0)
  1702. {
  1703. InvokeClient.Instance.Service.DoOperation($"PM1.SetAll{AITValveOperation.GVTurnValve}", DictValve);
  1704. }
  1705. if (MFCDataList != null && MFCDataList.Count() > 0)
  1706. {
  1707. Dictionary<string, string> setChangedMFC = new Dictionary<string, string>();
  1708. var changedList = MFCDataList.ToList().Where(x => !x.IsSetChanged);
  1709. foreach (var item in changedList)
  1710. {
  1711. setChangedMFC.Add(item.Name, item.Value);
  1712. }
  1713. InvokeClient.Instance.Service.DoOperation($"PM1.SetAllMfcValue", setChangedMFC);
  1714. MFCDataList.ToList().ForEach(x =>
  1715. {
  1716. if (!x.IsSetChanged)
  1717. {
  1718. // InvokeClient.Instance.Service.DoOperation($"PM1.{x.DisplayName}.SetMfcValue", $"{x.Value};{x.Rampng};{x.AlarmValue}");
  1719. InvokeClient.Instance.Service.DoOperation($"System.SetConfig", $"PM1.MFC.{x.DisplayName}.SetLastPoint", x.Value);
  1720. x.IsSetChanged = true;
  1721. }
  1722. if (!x.IsRampngChanged)
  1723. {
  1724. InvokeClient.Instance.Service.DoOperation($"PM1.{x.DisplayName}.SetMfcValue", $"{x.Value};{x.Rampng};{x.AlarmValue}");
  1725. InvokeClient.Instance.Service.DoOperation($"System.SetConfig", $"PM1.MFC.{x.DisplayName}.SetLastRamping", x.Rampng);
  1726. x.IsRampngChanged = true;
  1727. }
  1728. });
  1729. }
  1730. var pressStr = GetPressString();
  1731. if (oldPressStr != pressStr)
  1732. {
  1733. if ((CheckIsChanged(pressStr) && pressStr != ";;;") || (DictValve != null && DictValve.ContainsKey("ValveAV71")))
  1734. {
  1735. if (DictValve != null && DictValve.ContainsKey("ValveAV71"))
  1736. InvokeClient.Instance.Service.DoOperation($"PM1.APC.SetManualParameters", $"{pressStr};{DictValve["ValveAV71"]}");
  1737. else
  1738. InvokeClient.Instance.Service.DoOperation($"PM1.APC.SetManualParameters", $"{pressStr}");
  1739. }
  1740. }
  1741. OldPressCommand = PressCommand;
  1742. oldPressStr = pressStr;
  1743. if (HeaterUData.CorrectTable != TemperatureCorrect || HeaterUData.PIDTable != TemperaturePID || HeaterUData.ControlModeSetpoint != TemperatureControlMode)
  1744. {
  1745. string[] tempPra = new string[] { TemperatureControlMode, TemperatureCorrect, TemperaturePID };
  1746. InvokeClient.Instance.Service.DoOperation("PM1.Heater.SetParameters", string.Join(";", tempPra));
  1747. }
  1748. if (TempList != null && TempList.Count() > 0)
  1749. {
  1750. TempList.ToList().ForEach(x =>
  1751. {
  1752. if (!x.IsRampngChanged || !x.IsSetChanged)
  1753. {
  1754. InvokeClient.Instance.Service.DoOperation($"System.{x.Name}.SetManualParameters", $"{x.Value};{x.Rampng}");
  1755. if (!x.IsSetChanged)
  1756. {
  1757. InvokeClient.Instance.Service.DoOperation($"System.SetConfig", $"PM1.Heater.{x.Name}.SetLastPoint", x.Value);
  1758. }
  1759. if (!x.IsRampngChanged)
  1760. {
  1761. InvokeClient.Instance.Service.DoOperation($"System.SetConfig", $"PM1.Heater.{x.Name}.SetLastRamping", x.Rampng);
  1762. }
  1763. x.IsSetChanged = true;
  1764. x.IsRampngChanged = true;
  1765. }
  1766. });
  1767. }
  1768. if (!string.IsNullOrEmpty(LoaderCommand))
  1769. {
  1770. if (OldLoaderCommand != LoaderCommand)
  1771. {
  1772. InvokeClient.Instance.Service.DoOperation("PM1.SetBoatManualMotion", GetSaveLoaderValue(LoaderCommand));
  1773. }
  1774. OldLoaderCommand = LoaderCommand;
  1775. }
  1776. if (PumpSetValues.Count > 0)
  1777. {
  1778. PumpSetValues.ToList().ForEach(x => InvokeClient.Instance.Service.DoOperation($"{x.Key}.{AITValveOperation.GVTurnValve}", x.Value));
  1779. }
  1780. if (F2HFClnOrHFCl2Values.Count > 0)
  1781. {
  1782. F2HFClnOrHFCl2Values.ToList().ForEach(x => InvokeClient.Instance.Service.DoOperation(x.Key, x.Value));
  1783. }
  1784. }
  1785. private bool CheckIsChanged(string value)
  1786. {
  1787. string[] strList = value.Split(';');
  1788. if (APCData.CommandSetPoint != strList[0])
  1789. {
  1790. return true;
  1791. }
  1792. if (APCData.PIDTable != strList[1])
  1793. {
  1794. return true;
  1795. }
  1796. float.TryParse(strList[2], out float set);
  1797. if (APCData.SetPoint != set)
  1798. {
  1799. return true;
  1800. }
  1801. if (APCData.LowPressWaitSetPoint != strList[3])
  1802. {
  1803. return true;
  1804. }
  1805. return false;
  1806. }
  1807. public List<ConfigNode> GetMfcItem()
  1808. {
  1809. this.SystemName = "System";
  1810. ConfigNodes = SystemConfigProvider.Instance.GetConfigTree(SystemName).SubNodes;
  1811. var MfcItems = ConfigNodes.Where(x => x.Display == "Parameter").FirstOrDefault().SubNodes.Where(y => y.Name == "MFC").FirstOrDefault().SubNodes;
  1812. return MfcItems;
  1813. }
  1814. public void RecipeCancel()
  1815. {
  1816. if (DialogBox.ShowDialog(DialogButton.Yes | DialogButton.No, DialogType.CONFIRM, " You confirm that you want to unsave the recipe and exit the interface?") == DialogButton.No)
  1817. {
  1818. return;
  1819. }
  1820. else
  1821. {
  1822. UpdateGASSetting(true);
  1823. UpdateHeaterSetting();
  1824. ClearSetValue();
  1825. }
  1826. // ((Window)GetView()).Close();
  1827. }
  1828. public void PressPIDChick()
  1829. {
  1830. var windowManager = IoC.Get<IWindowManager>();
  1831. var defaultAPCPID = SystemConfigProvider.Instance.GetValueByName("PM1.APCPID");
  1832. if (string.IsNullOrEmpty(defaultAPCPID))
  1833. {
  1834. DialogBox.ShowDialog(DialogButton.Cancel, DialogType.INFO, "Please set the default file first");
  1835. return;
  1836. }
  1837. int last = defaultAPCPID.LastIndexOf('\\');
  1838. var pix = defaultAPCPID.Substring(0, last);
  1839. var file = defaultAPCPID.Substring(last + 1, defaultAPCPID.Length - last - 1);
  1840. APCPIDEditViewModel aPCPIDEditViewModel = new APCPIDEditViewModel(pix, file);
  1841. aPCPIDEditViewModel.IsEditEnabled = false;
  1842. var rtn = (windowManager as WindowManager)?.ShowDialogWithTitle(aPCPIDEditViewModel, null, "APC PID Table");
  1843. if ((bool)rtn)
  1844. {
  1845. PressPID = aPCPIDEditViewModel.RetrunString;
  1846. }
  1847. }
  1848. private bool firstUpdate = true;
  1849. private void ClearSetValue()
  1850. {
  1851. TemperatureControlMode = "";
  1852. TemperatureCorrect = "";
  1853. TemperaturePID = "";
  1854. ClearLoaderSetValue();
  1855. LoaderCommand = "";
  1856. SetShowLoaderValuePanel("None");
  1857. PressCommand = "";
  1858. SetShowPressPanel("None");
  1859. }
  1860. protected override void InvokeAfterUpdateProperty(Dictionary<string, object> data)
  1861. {
  1862. base.InvokeAfterUpdateProperty(data);
  1863. if (firstUpdate)
  1864. {
  1865. UpdateGASSetting(false);
  1866. UpdateHeaterSetting();
  1867. firstUpdate = false;
  1868. }
  1869. }
  1870. private void UpdateGASSetting(bool upDataMfcSetPoint)
  1871. {
  1872. List<AITMfcData> allmfcDatas = new List<AITMfcData>()
  1873. {
  1874. MFC1Data,
  1875. MFC2Data,
  1876. MFC3Data,
  1877. MFC4Data,
  1878. MFC5Data,
  1879. MFC6Data,
  1880. MFC7Data,
  1881. MFC8Data,
  1882. MFC9Data,
  1883. MFC10Data,
  1884. MFC11Data,
  1885. MFC12Data,
  1886. MFC13Data,
  1887. MFC14Data,
  1888. MFC15Data,
  1889. MFC16Data,
  1890. MFC17Data,
  1891. MFC31Data,
  1892. MFC32Data,
  1893. MFC51Data,
  1894. };
  1895. List<AITMfcData> mfcDatas = new List<AITMfcData>()
  1896. {
  1897. };
  1898. foreach (var item in allmfcDatas)
  1899. {
  1900. if (item != null)
  1901. {
  1902. mfcDatas.Add(item);
  1903. }
  1904. }
  1905. if (MFCDataList.Count == 0)
  1906. {
  1907. for (int i = 0; i < mfcDatas.Count; i++)
  1908. {
  1909. if (mfcDatas[i] == null)
  1910. continue;
  1911. double setLastPoint = (double)QueryDataClient.Instance.Service.GetConfig($"PM1.MFC.{mfcDatas[i].DeviceName}.SetLastPoint");
  1912. double setLastRamping = (double)QueryDataClient.Instance.Service.GetConfig($"PM1.MFC.{mfcDatas[i].DeviceName}.SetLastRamping");
  1913. //MFCDataList.Add(new MFCGasData()
  1914. //{
  1915. // Name = mfcDatas[i].DeviceName,
  1916. // DisplayName = mfcDatas[i].DisplayName,
  1917. // ActualValue = mfcDatas[i].FeedBack,
  1918. // Value = mfcDatas[i].SetPoint,
  1919. // ActualRampng = mfcDatas[i].Ramping,
  1920. // Rampng = mfcDatas[i].VirtualRamping,
  1921. // Unit = mfcDatas[i].Unit,
  1922. // AlarmValue = mfcDatas[i].AlarmWatchTable
  1923. //});
  1924. MFCDataList.Add(new MFCGasData()
  1925. {
  1926. Name = mfcDatas[i].DeviceName,
  1927. DisplayName = mfcDatas[i].DisplayName,
  1928. //ActualValue = mfcDatas[i].FeedBack,
  1929. Value = setLastPoint.ToString("f3"),
  1930. //ActualRampng = mfcDatas[i].Ramping,
  1931. Rampng = setLastRamping.ToString("f3"),
  1932. IsSetChanged = true,
  1933. Unit = mfcDatas[i].Unit,
  1934. AlarmValue = mfcDatas[i].AlarmWatchTable
  1935. });
  1936. }
  1937. }
  1938. else
  1939. {
  1940. for (int i = 0; i < MFCDataList.Count; i++)
  1941. {
  1942. var findMFC = mfcDatas.FirstOrDefault(x => x.DeviceName == MFCDataList[i].Name);
  1943. if (findMFC != null)
  1944. {
  1945. double setLastPoint = (double)QueryDataClient.Instance.Service.GetConfig($"PM1.MFC.{findMFC.DeviceName}.SetLastPoint");
  1946. double setLastRamping = (double)QueryDataClient.Instance.Service.GetConfig($"PM1.MFC.{findMFC.DeviceName}.SetLastRamping");
  1947. MFCDataList[i].Value = setLastPoint.ToString("f3");
  1948. MFCDataList[i].IsSetChanged = true;
  1949. MFCDataList[i].Rampng = setLastRamping.ToString("f3");
  1950. }
  1951. };
  1952. }
  1953. if (MFCDataList != null && MFCDataList.Count > 0)
  1954. {
  1955. if (upDataMfcSetPoint)
  1956. {
  1957. Dictionary<string, string> setChangedMFC = new Dictionary<string, string>();
  1958. foreach (var item in MFCDataList)
  1959. {
  1960. setChangedMFC.Add(item.Name, item.Value);
  1961. }
  1962. InvokeClient.Instance.Service.DoOperation($"PM1.SetAllMfcSetPoint", setChangedMFC);
  1963. }
  1964. }
  1965. }
  1966. private void UpdateHeaterSetting()
  1967. {
  1968. if ((HeaterUData != null && HeaterCUData != null && HeaterCData != null && HeaterCLData != null && HeaterLData != null))
  1969. {
  1970. List<AITHeaterData> heaterDatas = new List<AITHeaterData>()
  1971. {
  1972. HeaterUData,
  1973. HeaterCUData,
  1974. HeaterCData,
  1975. HeaterCLData,
  1976. HeaterLData,
  1977. };
  1978. if (TempList.Count == 0)
  1979. {
  1980. string[] strList = new string[5] { "BottomHeaterData", "CenterBottomHeaterData", "CenterHeaterData", "TopCenterHeaterData", "HeaterUData" };
  1981. for (int i = 0; i < heaterDatas.Count; i++)
  1982. {
  1983. double setLastPoint = (double)QueryDataClient.Instance.Service.GetConfig($"PM1.Heater.{heaterDatas[i].DeviceName}.SetLastPoint");
  1984. double setLastRamping = (double)QueryDataClient.Instance.Service.GetConfig($"PM1.Heater.{heaterDatas[i].DeviceName}.SetLastRamping");
  1985. //TempList.Add(new TempManualSetData()
  1986. //{
  1987. // DisplayName = heaterDatas[i].DisplayName,
  1988. // Name = heaterDatas[i].DeviceName,
  1989. // ControlName = strList[i],
  1990. // ActualValue = heaterDatas[i].FeedBack,
  1991. // Value = heaterDatas[i].SetPoint,
  1992. // ActualRampng = heaterDatas[i].Ramping,
  1993. // Rampng = heaterDatas[i].UpRateSetPoint,
  1994. // Unit = heaterDatas[i].Unit,
  1995. //});
  1996. TempList.Add(new TempManualSetData()
  1997. {
  1998. DisplayName = heaterDatas[i].DisplayName,
  1999. Name = heaterDatas[i].DeviceName,
  2000. ControlName = strList[i],
  2001. Value = setLastPoint.ToString("f1"),
  2002. Rampng = setLastRamping.ToString("f1"),
  2003. Unit = heaterDatas[i].Unit,
  2004. });
  2005. }
  2006. }
  2007. else
  2008. {
  2009. for (int i = 0; i < TempList.Count; i++)
  2010. {
  2011. var findHeater = heaterDatas.FirstOrDefault(x => x.DeviceName == TempList[i].Name);
  2012. double setLastPoint = (double)QueryDataClient.Instance.Service.GetConfig($"PM1.Heater.{findHeater.DeviceName}.SetLastPoint");
  2013. double setLastRamping = (double)QueryDataClient.Instance.Service.GetConfig($"PM1.Heater.{findHeater.DeviceName}.SetLastRamping");
  2014. if (findHeater != null)
  2015. {
  2016. TempList[i].Value = setLastPoint.ToString("f1");
  2017. TempList[i].Rampng = setLastRamping.ToString("f1");
  2018. TempList[i].IsSetChanged = true;
  2019. TempList[i].IsRampngChanged = true;
  2020. }
  2021. };
  2022. }
  2023. }
  2024. }
  2025. public void SetValue(object sender, string isFullKeyboard = "")
  2026. {
  2027. string value = ((TextBox)sender).Text;
  2028. if (!string.IsNullOrEmpty(isFullKeyboard))
  2029. {
  2030. FullKeyboard fullKeyboard1 = new FullKeyboard("", value);
  2031. if ((bool)fullKeyboard1.ShowDialog())
  2032. {
  2033. ((TextBox)sender).Text = fullKeyboard1.ValueString;
  2034. }
  2035. }
  2036. else
  2037. {
  2038. NumberKeyboard fullKeyboard = new NumberKeyboard("", value);
  2039. if ((bool)fullKeyboard.ShowDialog())
  2040. {
  2041. ((TextBox)sender).Text = fullKeyboard.ValueString;
  2042. }
  2043. }
  2044. }
  2045. private string GetPressString()
  2046. {
  2047. string[] pressStringList = new string[4] { "", "", "", "" };
  2048. pressStringList[0] = PressCommand;
  2049. if (!string.IsNullOrEmpty(PressCommand))
  2050. {
  2051. switch (PressCommand)
  2052. {
  2053. case "Press":
  2054. case "Press2":
  2055. PressVisibility = Visibility.Visible;
  2056. pressStringList[1] = PressPID;
  2057. pressStringList[2] = PressSet.ToString();
  2058. break;
  2059. case "Slow Vac":
  2060. var defaultAPCPID = SystemConfigProvider.Instance.GetValueByName("PM1.APCPID");
  2061. pressStringList[1] = defaultAPCPID;
  2062. pressStringList[2] = PressSlowVacSet.ToString();
  2063. break;
  2064. case "Valve Angle":
  2065. pressStringList[2] = PressValveAngleSet.ToString();
  2066. pressStringList[3] = LowPressWait;
  2067. break;
  2068. case "Full Open":
  2069. case "Full Close":
  2070. case "Hold":
  2071. case "Zero Set":
  2072. case "Cancel Zero":
  2073. pressStringList[1] = "";
  2074. pressStringList[2] = "";
  2075. pressStringList[3] = "";
  2076. break;
  2077. case "WaitPressUp1":
  2078. case "WaitPressDown1":
  2079. case "WaitPressUp2":
  2080. case "WaitPressDown2":
  2081. pressStringList[2] = PressWait.ToString();
  2082. break;
  2083. default:
  2084. break;
  2085. }
  2086. }
  2087. return string.Join(";", pressStringList);
  2088. }
  2089. }
  2090. public class MFCGasData : PropertyChangedBase
  2091. {
  2092. private int _no;
  2093. public int No
  2094. {
  2095. get => _no;
  2096. set
  2097. {
  2098. _no = value;
  2099. NotifyOfPropertyChange(nameof(No));
  2100. }
  2101. }
  2102. private string _name;
  2103. public string Name
  2104. {
  2105. get => _name;
  2106. set
  2107. {
  2108. _name = value;
  2109. NotifyOfPropertyChange(nameof(Name));
  2110. }
  2111. }
  2112. public string _unit;
  2113. public string Unit
  2114. {
  2115. get => _unit;
  2116. set
  2117. {
  2118. _unit = value;
  2119. NotifyOfPropertyChange(nameof(Unit));
  2120. }
  2121. }
  2122. private string _displayName;
  2123. public string DisplayName
  2124. {
  2125. get => _displayName;
  2126. set
  2127. {
  2128. _displayName = value;
  2129. NotifyOfPropertyChange(nameof(DisplayName));
  2130. }
  2131. }
  2132. private string _controlName;
  2133. public string ControlName
  2134. {
  2135. get => _controlName;
  2136. set
  2137. {
  2138. _controlName = value;
  2139. NotifyOfPropertyChange(nameof(ControlName));
  2140. }
  2141. }
  2142. private double _actualValue;
  2143. public double ActualValue
  2144. {
  2145. get => _actualValue;
  2146. set
  2147. {
  2148. _actualValue = value;
  2149. NotifyOfPropertyChange(nameof(ActualValue));
  2150. }
  2151. }
  2152. private string _value;
  2153. public string Value
  2154. {
  2155. get => _value;
  2156. set
  2157. {
  2158. _value = value;
  2159. NotifyOfPropertyChange(nameof(Value));
  2160. }
  2161. }
  2162. private double _actualRampng;
  2163. public double ActualRampng
  2164. {
  2165. get => _actualRampng; set
  2166. {
  2167. _actualRampng = value;
  2168. NotifyOfPropertyChange(nameof(ActualRampng));
  2169. }
  2170. }
  2171. private string _rampng;
  2172. public string Rampng
  2173. {
  2174. get => _rampng; set
  2175. {
  2176. _rampng = value;
  2177. NotifyOfPropertyChange(nameof(Rampng));
  2178. }
  2179. }
  2180. private string _maxValue;
  2181. public string MaxValue
  2182. {
  2183. get => _maxValue; set
  2184. {
  2185. _maxValue = value;
  2186. NotifyOfPropertyChange(nameof(MaxValue));
  2187. }
  2188. }
  2189. private string _minValue;
  2190. public string MinValue
  2191. {
  2192. get => _minValue; set
  2193. {
  2194. _minValue = value;
  2195. NotifyOfPropertyChange(nameof(MinValue));
  2196. }
  2197. }
  2198. private bool _isSetChanged = true;
  2199. public bool IsSetChanged
  2200. {
  2201. get => _isSetChanged;
  2202. set
  2203. {
  2204. _isSetChanged = value;
  2205. NotifyOfPropertyChange(nameof(IsSetChanged));
  2206. }
  2207. }
  2208. private bool _isRampngChanged = true;
  2209. public bool IsRampngChanged
  2210. {
  2211. get => _isRampngChanged;
  2212. set
  2213. {
  2214. _isRampngChanged = value;
  2215. NotifyOfPropertyChange(nameof(IsRampngChanged));
  2216. }
  2217. }
  2218. private string _alarmValue;
  2219. public string AlarmValue
  2220. {
  2221. get => _alarmValue;
  2222. set
  2223. {
  2224. _alarmValue = value;
  2225. NotifyOfPropertyChange(nameof(AlarmValue));
  2226. }
  2227. }
  2228. }
  2229. public class TempManualSetData : PropertyChangedBase
  2230. {
  2231. private int _no;
  2232. public int No
  2233. {
  2234. get => _no;
  2235. set
  2236. {
  2237. _no = value;
  2238. NotifyOfPropertyChange("No");
  2239. }
  2240. }
  2241. private string _name;
  2242. public string Name
  2243. {
  2244. get => _name;
  2245. set
  2246. {
  2247. _name = value;
  2248. NotifyOfPropertyChange("Name");
  2249. }
  2250. }
  2251. private string _displayName;
  2252. public string DisplayName
  2253. {
  2254. get => _displayName;
  2255. set
  2256. {
  2257. _displayName = value;
  2258. NotifyOfPropertyChange(nameof(DisplayName));
  2259. }
  2260. }
  2261. private string _controlName;
  2262. public string ControlName
  2263. {
  2264. get => _controlName;
  2265. set
  2266. {
  2267. _controlName = value;
  2268. NotifyOfPropertyChange(nameof(ControlName));
  2269. }
  2270. }
  2271. private double _actualValue;
  2272. public double ActualValue
  2273. {
  2274. get => _actualValue;
  2275. set
  2276. {
  2277. _actualValue = value;
  2278. NotifyOfPropertyChange(nameof(ActualValue));
  2279. }
  2280. }
  2281. private string _value;
  2282. public string Value
  2283. {
  2284. get => _value;
  2285. set
  2286. {
  2287. _value = value;
  2288. NotifyOfPropertyChange(nameof(Value));
  2289. }
  2290. }
  2291. private string _actualRampng;
  2292. public string ActualRampng
  2293. {
  2294. get => _actualRampng;
  2295. set
  2296. {
  2297. _actualRampng = value;
  2298. NotifyOfPropertyChange(nameof(ActualRampng));
  2299. }
  2300. }
  2301. private string _rampng;
  2302. public string Rampng
  2303. {
  2304. get => _rampng; set
  2305. {
  2306. _rampng = value;
  2307. NotifyOfPropertyChange(nameof(Rampng));
  2308. }
  2309. }
  2310. private string _maxValue;
  2311. public string MaxValue
  2312. {
  2313. get => _maxValue; set
  2314. {
  2315. _maxValue = value;
  2316. NotifyOfPropertyChange(nameof(MaxValue));
  2317. }
  2318. }
  2319. private string _minValue;
  2320. public string MinValue
  2321. {
  2322. get => _minValue; set
  2323. {
  2324. _minValue = value;
  2325. NotifyOfPropertyChange(nameof(MinValue));
  2326. }
  2327. }
  2328. private bool _isChanged = true;
  2329. public bool IsChanged
  2330. {
  2331. get => _isChanged;
  2332. set
  2333. {
  2334. _isChanged = value;
  2335. NotifyOfPropertyChange(nameof(IsChanged));
  2336. }
  2337. }
  2338. private string _unit;
  2339. public string Unit
  2340. {
  2341. get => _unit;
  2342. set
  2343. {
  2344. _unit = value;
  2345. NotifyOfPropertyChange("Unit");
  2346. }
  2347. }
  2348. private bool _isSetChanged = true;
  2349. public bool IsSetChanged
  2350. {
  2351. get => _isSetChanged;
  2352. set
  2353. {
  2354. _isSetChanged = value;
  2355. NotifyOfPropertyChange(nameof(IsSetChanged));
  2356. }
  2357. }
  2358. private bool _isRampngChanged = true;
  2359. public bool IsRampngChanged
  2360. {
  2361. get => _isRampngChanged;
  2362. set
  2363. {
  2364. _isRampngChanged = value;
  2365. NotifyOfPropertyChange(nameof(IsRampngChanged));
  2366. }
  2367. }
  2368. private string _alarmValue;
  2369. public string AlarmValue
  2370. {
  2371. get => _alarmValue;
  2372. set
  2373. {
  2374. _alarmValue = value;
  2375. NotifyOfPropertyChange(nameof(AlarmValue));
  2376. }
  2377. }
  2378. }
  2379. }