DiagnoseViewModel.cs 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Windows;
  4. using System.Windows.Input;
  5. using Aitex.Core.Common.DeviceData;
  6. using Aitex.Core.RT.SCCore;
  7. using Aitex.Core.UI.MVVM;
  8. using Aitex.Core.Util;
  9. using Aitex.Core.Utilities;
  10. using Aitex.Triton160.Common;
  11. using Aitex.Triton160.UI.Wcf;
  12. namespace Aitex.Triton160.UI.ViewModel
  13. {
  14. class DiagnoseViewModel : UIViewModelBase
  15. {
  16. public ICommand LeakCheckCommand
  17. {
  18. get;
  19. private set;
  20. }
  21. public ICommand AbortCommand
  22. {
  23. get;
  24. private set;
  25. }
  26. public ICommand DeleteCommand
  27. {
  28. get;
  29. private set;
  30. }
  31. public ICommand RfCommand
  32. {
  33. get;
  34. private set;
  35. }
  36. public List<LeakCheckResultItem> LeakCheckResultList
  37. {
  38. get;
  39. set;
  40. }
  41. #region StateData
  42. [Subscription(StateData.IsAutoMode, SystemStateModule)]
  43. public bool IsAutoMode
  44. {
  45. get;
  46. set;
  47. }
  48. [Subscription(TritonDevice.PressureMeterChamber, SystemDeviceModule)]
  49. public AITPressureMeterData ChamberPressure
  50. {
  51. get;
  52. set;
  53. }
  54. [Subscription(TritonDevice.Rf, SystemDeviceModule)]
  55. public AITRfData RfData
  56. {
  57. get;
  58. set;
  59. }
  60. [Subscription(StateData.PMState, SystemStateModule)]
  61. public int PMStatus
  62. {
  63. get;
  64. set;
  65. }
  66. [Subscription(StateData.LeakCheckElapseTime, SystemStateModule)]
  67. public string LeakCheckElapseTime
  68. {
  69. get;
  70. set;
  71. }
  72. #endregion
  73. #region logic display
  74. public bool IsManualMode
  75. {
  76. get
  77. {
  78. return !IsAutoMode;
  79. }
  80. }
  81. public bool IsEnableLeakCheck
  82. {
  83. get
  84. {
  85. return !IsAutoMode && (PMState)PMStatus == PMState.Idle;
  86. }
  87. }
  88. public bool IsRfPowerOn
  89. {
  90. get
  91. {
  92. return RfData.IsRfOn;
  93. }
  94. }
  95. public bool IsRfPowerOff
  96. {
  97. get
  98. {
  99. return !RfData.IsRfOn;
  100. }
  101. }
  102. public bool IsMatchManualMode
  103. {
  104. get
  105. {
  106. return RfData.MatchMode == (int)TritonRfMatchMode.Manual;
  107. }
  108. }
  109. public bool IsMatchAutoMode
  110. {
  111. get
  112. {
  113. return RfData.MatchMode == (int)TritonRfMatchMode.Auto;
  114. }
  115. }
  116. [IgnorePropertyChange]
  117. public string LeakCheckModeSetPoint
  118. {
  119. get;
  120. set;
  121. }
  122. public bool IsEnableGasLine
  123. {
  124. get
  125. {
  126. return LeakCheckModeSetPoint == "ChamberAndGasLine";
  127. }
  128. }
  129. [IgnorePropertyChange]
  130. public string LeakCheckPumpDownTimeSetPoint
  131. {
  132. get;
  133. set;
  134. }
  135. [IgnorePropertyChange]
  136. public string LeakCheckTimeSetPoint
  137. {
  138. get;
  139. set;
  140. }
  141. [IgnorePropertyChange]
  142. public bool EnableGasLine1
  143. {
  144. get;
  145. set;
  146. }
  147. [IgnorePropertyChange]
  148. public bool EnableGasLine2
  149. {
  150. get;
  151. set;
  152. }
  153. [IgnorePropertyChange]
  154. public bool EnableGasLine3
  155. {
  156. get;
  157. set;
  158. }
  159. [IgnorePropertyChange]
  160. public bool EnableGasLine4
  161. {
  162. get;
  163. set;
  164. }
  165. [IgnorePropertyChange]
  166. public bool EnableGasLine5
  167. {
  168. get;
  169. set;
  170. }
  171. [IgnorePropertyChange]
  172. public AITRfData RfDataSetPoint
  173. {
  174. get;
  175. set;
  176. }
  177. public bool IsLeakCheck
  178. {
  179. get
  180. {
  181. return (PMState)PMStatus == PMState.LeakCheck;
  182. }
  183. }
  184. public string Status
  185. {
  186. get
  187. {
  188. return ((PMState)PMStatus).ToString();
  189. }
  190. }
  191. public string Pressure
  192. {
  193. get
  194. {
  195. return ChamberPressure == null ? "0" : ChamberPressure.FeedBack.ToString("F0") + ChamberPressure.Unit;
  196. }
  197. }
  198. [IgnorePropertyChange]
  199. public LeakCheckResultItem CurrentLeakCheckResultItem
  200. {
  201. get;
  202. set;
  203. }
  204. F_TRIG _trigLeakCheckFinished = new F_TRIG();
  205. #endregion
  206. public DiagnoseViewModel()
  207. : base("DiagnoseViewModel")
  208. {
  209. LeakCheckCommand = new DelegateCommand<object>(LeakCheck);
  210. AbortCommand = new DelegateCommand<object>(AbortLeakCheck);
  211. DeleteCommand = new DelegateCommand<object>(DeleteLeakCheck);
  212. RfCommand = new DelegateCommand<string>(DoRfOperation, CanDoRfOperation);
  213. LeakCheckModeSetPoint = LeakCheckMode.ChamberOnly.ToString();
  214. LeakCheckPumpDownTimeSetPoint = "3";
  215. LeakCheckTimeSetPoint = "3";
  216. EnableGasLine1 = true;
  217. EnableGasLine2 = true;
  218. EnableGasLine3 = true;
  219. EnableGasLine4 = true;
  220. EnableGasLine5 = true;
  221. InvokePropertyChanged("LeakCheckModeSetPoint");
  222. InvokePropertyChanged("LeakCheckPumpDownTimeSetPoint");
  223. InvokePropertyChanged("LeakCheckTimeSetPoint");
  224. InvokePropertyChanged("EnableGasLine1");
  225. InvokePropertyChanged("EnableGasLine2");
  226. InvokePropertyChanged("EnableGasLine3");
  227. InvokePropertyChanged("EnableGasLine4");
  228. InvokePropertyChanged("EnableGasLine5");
  229. RfDataSetPoint = new AITRfData();
  230. RfData = new AITRfData();
  231. }
  232. public void UpdateLeakCheckResult()
  233. {
  234. LeakCheckResultList = Triton160UiSystem.Instance.WCF.Query.GetHistoryLeakCheck();
  235. InvokePropertyChanged("LeakCheckResultList");
  236. }
  237. protected override void InvokeBeforeUpdateProperty(Dictionary<string, object> data)
  238. {
  239. if (RfData!=null && string.IsNullOrEmpty(RfDataSetPoint.DeviceName) && !string.IsNullOrEmpty(RfData.DeviceName))
  240. {
  241. RfDataSetPoint.DeviceName = RfData.DeviceName;
  242. RfDataSetPoint.MatchPositionC1SetPoint = RfData.MatchPositionC1SetPoint;
  243. RfDataSetPoint.MatchPositionC2SetPoint = RfData.MatchPositionC2SetPoint;
  244. RfDataSetPoint.PowerSetPoint = RfData.PowerSetPoint;
  245. RfDataSetPoint.InvokePropertyChanged("MatchPositionC1SetPoint");
  246. RfDataSetPoint.InvokePropertyChanged("MatchPositionC2SetPoint");
  247. RfDataSetPoint.InvokePropertyChanged("PowerSetPoint");
  248. }
  249. _trigLeakCheckFinished.CLK = IsLeakCheck;
  250. if (_trigLeakCheckFinished.Q)
  251. {
  252. Application.Current.Dispatcher.Invoke(new Action(() =>
  253. {
  254. UpdateLeakCheckResult();
  255. }));
  256. }
  257. }
  258. private bool CanDoRfOperation(string param)
  259. {
  260. switch (param)
  261. {
  262. case "SetC1LowLow":
  263. return RfDataSetPoint.MatchPositionC1SetPoint > 4;
  264. case "SetC1Low":
  265. return RfDataSetPoint.MatchPositionC1SetPoint > 0;
  266. case "SetC1High":
  267. return RfDataSetPoint.MatchPositionC1SetPoint < 100;
  268. case "SetC1HighHigh":
  269. return RfDataSetPoint.MatchPositionC1SetPoint < 96;
  270. case "SetC2LowLow":
  271. return RfDataSetPoint.MatchPositionC2SetPoint > 4;
  272. case "SetC2Low":
  273. return RfDataSetPoint.MatchPositionC2SetPoint > 0;
  274. case "SetC2High":
  275. return RfDataSetPoint.MatchPositionC2SetPoint < 100;
  276. case "SetC2HighHigh":
  277. return RfDataSetPoint.MatchPositionC2SetPoint < 96;
  278. }
  279. return true;
  280. }
  281. private void DoRfOperation(string param)
  282. {
  283. switch (param)
  284. {
  285. case "PowerOn":
  286. WcfClient.Instance.InvokeService_DoOperation(TritonOperation.DeviceOperation.ToString(), new object[] { TritonDevice.Rf.ToString(), AITRfOperation.SetPowerOnOff.ToString(), "true" });
  287. break;
  288. case "PowerOff":
  289. WcfClient.Instance.InvokeService_DoOperation(TritonOperation.DeviceOperation.ToString(), new object[] { TritonDevice.Rf.ToString(), AITRfOperation.SetPowerOnOff.ToString(), "false" });
  290. break;
  291. case "SetPower":
  292. WcfClient.Instance.InvokeService_DoOperation(TritonOperation.DeviceOperation.ToString(), new object[] { TritonDevice.Rf.ToString(), AITRfOperation.SetPower.ToString(), RfDataSetPoint.PowerSetPoint.ToString() });
  293. break;
  294. case "SetMatchManualMode":
  295. WcfClient.Instance.InvokeService_DoOperation(TritonOperation.DeviceOperation.ToString(), new object[] { TritonDevice.Rf.ToString(), AITRfOperation.SetMatchMode.ToString(), ((int)TritonRfMatchMode.Manual).ToString() });
  296. SetConfig(SCName.System_MatchMode, ((int)TritonRfMatchMode.Manual).ToString());
  297. break;
  298. case "SetMatchAutoMode":
  299. WcfClient.Instance.InvokeService_DoOperation(TritonOperation.DeviceOperation.ToString(), new object[] { TritonDevice.Rf.ToString(), AITRfOperation.SetMatchMode.ToString(), ((int)TritonRfMatchMode.Auto).ToString() });
  300. SetConfig(SCName.System_MatchMode, ((int)TritonRfMatchMode.Auto).ToString());
  301. break;
  302. case "SetC1":
  303. if (RfDataSetPoint.MatchPositionC1SetPoint<0 || RfDataSetPoint.MatchPositionC1SetPoint>100)
  304. {
  305. MessageBox.Show(Aitex.Triton160.UI.Properties.Resources.DiagnoseViewModel_DoRfOperation_C1ValueShouldBe0100CurrentSetting +
  306. RfDataSetPoint.MatchPositionC1SetPoint, Aitex.Triton160.UI.Properties.Resources.DiagnoseViewModel_DoRfOperation_Warning, MessageBoxButton.OK);
  307. return;
  308. }
  309. WcfClient.Instance.InvokeService_DoOperation(TritonOperation.DeviceOperation.ToString(), new object[] { TritonDevice.Rf.ToString(), AITRfOperation.SetMatchPositionC1.ToString(), (RfDataSetPoint.MatchPositionC1SetPoint).ToString() });
  310. SetConfig(SCName.System_MatchPositionC1, (RfDataSetPoint.MatchPositionC1SetPoint).ToString());
  311. break;
  312. case "SetC1LowLow":
  313. RfDataSetPoint.MatchPositionC1SetPoint = Math.Max(0,RfDataSetPoint.MatchPositionC1SetPoint-5);
  314. RfDataSetPoint.InvokePropertyChanged("MatchPositionC1SetPoint");
  315. if (RfDataSetPoint.MatchPositionC1SetPoint < 0 || RfDataSetPoint.MatchPositionC1SetPoint > 100)
  316. {
  317. MessageBox.Show(Aitex.Triton160.UI.Properties.Resources.DiagnoseViewModel_DoRfOperation_C1ValueShouldBe0100CurrentSetting +
  318. RfDataSetPoint.MatchPositionC1SetPoint, Aitex.Triton160.UI.Properties.Resources.DiagnoseViewModel_DoRfOperation_Warning, MessageBoxButton.OK);
  319. return;
  320. }
  321. WcfClient.Instance.InvokeService_DoOperation(TritonOperation.DeviceOperation.ToString(), new object[] { TritonDevice.Rf.ToString(), AITRfOperation.SetMatchPositionC1.ToString(), (RfDataSetPoint.MatchPositionC1SetPoint).ToString() });
  322. SetConfig(SCName.System_MatchPositionC1, (RfDataSetPoint.MatchPositionC1SetPoint).ToString());
  323. break;
  324. case "SetC1Low":
  325. RfDataSetPoint.MatchPositionC1SetPoint = Math.Max(0, RfDataSetPoint.MatchPositionC1SetPoint - 1);
  326. RfDataSetPoint.InvokePropertyChanged("MatchPositionC1SetPoint");
  327. if (RfDataSetPoint.MatchPositionC1SetPoint < 0 || RfDataSetPoint.MatchPositionC1SetPoint > 100)
  328. {
  329. MessageBox.Show(Aitex.Triton160.UI.Properties.Resources.DiagnoseViewModel_DoRfOperation_C1ValueShouldBe0100CurrentSetting +
  330. RfDataSetPoint.MatchPositionC1SetPoint, Aitex.Triton160.UI.Properties.Resources.DiagnoseViewModel_DoRfOperation_Warning, MessageBoxButton.OK);
  331. return;
  332. }
  333. WcfClient.Instance.InvokeService_DoOperation(TritonOperation.DeviceOperation.ToString(), new object[] { TritonDevice.Rf.ToString(), AITRfOperation.SetMatchPositionC1.ToString(), (RfDataSetPoint.MatchPositionC1SetPoint).ToString() });
  334. SetConfig(SCName.System_MatchPositionC1, (RfDataSetPoint.MatchPositionC1SetPoint).ToString());
  335. break;
  336. case "SetC1High":
  337. RfDataSetPoint.MatchPositionC1SetPoint = Math.Min(100, RfDataSetPoint.MatchPositionC1SetPoint +1);
  338. RfDataSetPoint.InvokePropertyChanged("MatchPositionC1SetPoint");
  339. if (RfDataSetPoint.MatchPositionC1SetPoint < 0 || RfDataSetPoint.MatchPositionC1SetPoint > 100)
  340. {
  341. MessageBox.Show(Aitex.Triton160.UI.Properties.Resources.DiagnoseViewModel_DoRfOperation_C1ValueShouldBe0100CurrentSetting +
  342. RfDataSetPoint.MatchPositionC1SetPoint, Aitex.Triton160.UI.Properties.Resources.DiagnoseViewModel_DoRfOperation_Warning, MessageBoxButton.OK);
  343. return;
  344. }
  345. WcfClient.Instance.InvokeService_DoOperation(TritonOperation.DeviceOperation.ToString(), new object[] { TritonDevice.Rf.ToString(), AITRfOperation.SetMatchPositionC1.ToString(), (RfDataSetPoint.MatchPositionC1SetPoint).ToString() });
  346. SetConfig(SCName.System_MatchPositionC1, (RfDataSetPoint.MatchPositionC1SetPoint).ToString());
  347. break;
  348. case "SetC1HighHigh":
  349. RfDataSetPoint.MatchPositionC1SetPoint = Math.Min(100, RfDataSetPoint.MatchPositionC1SetPoint + 5);
  350. RfDataSetPoint.InvokePropertyChanged("MatchPositionC1SetPoint");
  351. if (RfDataSetPoint.MatchPositionC1SetPoint < 0 || RfDataSetPoint.MatchPositionC1SetPoint > 100)
  352. {
  353. MessageBox.Show(Aitex.Triton160.UI.Properties.Resources.DiagnoseViewModel_DoRfOperation_C1ValueShouldBe0100CurrentSetting +
  354. RfDataSetPoint.MatchPositionC1SetPoint, Aitex.Triton160.UI.Properties.Resources.DiagnoseViewModel_DoRfOperation_Warning, MessageBoxButton.OK);
  355. return;
  356. }
  357. WcfClient.Instance.InvokeService_DoOperation(TritonOperation.DeviceOperation.ToString(), new object[] { TritonDevice.Rf.ToString(), AITRfOperation.SetMatchPositionC1.ToString(), (RfDataSetPoint.MatchPositionC1SetPoint).ToString() });
  358. SetConfig(SCName.System_MatchPositionC1, (RfDataSetPoint.MatchPositionC1SetPoint).ToString());
  359. break;
  360. case "SetC2":
  361. if (RfDataSetPoint.MatchPositionC2SetPoint < 0 || RfDataSetPoint.MatchPositionC2SetPoint > 100)
  362. {
  363. MessageBox.Show(Aitex.Triton160.UI.Properties.Resources.DiagnoseViewModel_DoRfOperation_C2ValueShouldBe0100CurrentSetting +
  364. RfDataSetPoint.MatchPositionC2SetPoint, Aitex.Triton160.UI.Properties.Resources.DiagnoseViewModel_DoRfOperation_Warning, MessageBoxButton.OK);
  365. return;
  366. }
  367. WcfClient.Instance.InvokeService_DoOperation(TritonOperation.DeviceOperation.ToString(), new object[] { TritonDevice.Rf.ToString(), AITRfOperation.SetMatchPositionC2.ToString(), (RfDataSetPoint.MatchPositionC2SetPoint).ToString() });
  368. SetConfig(SCName.System_MatchPositionC2, (RfDataSetPoint.MatchPositionC2SetPoint).ToString());
  369. break;
  370. case "SetC2LowLow":
  371. RfDataSetPoint.MatchPositionC2SetPoint = Math.Max(0, RfDataSetPoint.MatchPositionC2SetPoint - 5);
  372. RfDataSetPoint.InvokePropertyChanged("MatchPositionC2SetPoint");
  373. if (RfDataSetPoint.MatchPositionC2SetPoint < 0 || RfDataSetPoint.MatchPositionC2SetPoint > 100)
  374. {
  375. MessageBox.Show(Aitex.Triton160.UI.Properties.Resources.DiagnoseViewModel_DoRfOperation_C2ValueShouldBe0100CurrentSetting +
  376. RfDataSetPoint.MatchPositionC2SetPoint, Aitex.Triton160.UI.Properties.Resources.DiagnoseViewModel_DoRfOperation_Warning, MessageBoxButton.OK);
  377. return;
  378. }
  379. WcfClient.Instance.InvokeService_DoOperation(TritonOperation.DeviceOperation.ToString(), new object[] { TritonDevice.Rf.ToString(), AITRfOperation.SetMatchPositionC2.ToString(), (RfDataSetPoint.MatchPositionC2SetPoint).ToString() });
  380. SetConfig(SCName.System_MatchPositionC2, (RfDataSetPoint.MatchPositionC2SetPoint).ToString());
  381. break;
  382. case "SetC2Low":
  383. RfDataSetPoint.MatchPositionC2SetPoint = Math.Max(0, RfDataSetPoint.MatchPositionC2SetPoint - 1);
  384. RfDataSetPoint.InvokePropertyChanged("MatchPositionC2SetPoint");
  385. if (RfDataSetPoint.MatchPositionC2SetPoint < 0 || RfDataSetPoint.MatchPositionC2SetPoint > 100)
  386. {
  387. MessageBox.Show(Aitex.Triton160.UI.Properties.Resources.DiagnoseViewModel_DoRfOperation_C2ValueShouldBe0100CurrentSetting +
  388. RfDataSetPoint.MatchPositionC2SetPoint, Aitex.Triton160.UI.Properties.Resources.DiagnoseViewModel_DoRfOperation_Warning, MessageBoxButton.OK);
  389. return;
  390. }
  391. WcfClient.Instance.InvokeService_DoOperation(TritonOperation.DeviceOperation.ToString(), new object[] { TritonDevice.Rf.ToString(), AITRfOperation.SetMatchPositionC2.ToString(), (RfDataSetPoint.MatchPositionC2SetPoint).ToString() });
  392. SetConfig(SCName.System_MatchPositionC2, (RfDataSetPoint.MatchPositionC2SetPoint).ToString());
  393. break;
  394. case "SetC2High":
  395. RfDataSetPoint.MatchPositionC2SetPoint = Math.Min(100, RfDataSetPoint.MatchPositionC2SetPoint +1);
  396. RfDataSetPoint.InvokePropertyChanged("MatchPositionC2SetPoint");
  397. if (RfDataSetPoint.MatchPositionC2SetPoint < 0 || RfDataSetPoint.MatchPositionC2SetPoint > 100)
  398. {
  399. MessageBox.Show(Aitex.Triton160.UI.Properties.Resources.DiagnoseViewModel_DoRfOperation_C2ValueShouldBe0100CurrentSetting +
  400. RfDataSetPoint.MatchPositionC2SetPoint, Aitex.Triton160.UI.Properties.Resources.DiagnoseViewModel_DoRfOperation_Warning, MessageBoxButton.OK);
  401. return;
  402. }
  403. WcfClient.Instance.InvokeService_DoOperation(TritonOperation.DeviceOperation.ToString(), new object[] { TritonDevice.Rf.ToString(), AITRfOperation.SetMatchPositionC2.ToString(), (RfDataSetPoint.MatchPositionC2SetPoint).ToString() });
  404. SetConfig(SCName.System_MatchPositionC2, (RfDataSetPoint.MatchPositionC2SetPoint).ToString());
  405. break;
  406. case "SetC2HighHigh":
  407. RfDataSetPoint.MatchPositionC2SetPoint = Math.Min(100, RfDataSetPoint.MatchPositionC2SetPoint + 5);
  408. RfDataSetPoint.InvokePropertyChanged("MatchPositionC2SetPoint");
  409. if (RfDataSetPoint.MatchPositionC2SetPoint < 0 || RfDataSetPoint.MatchPositionC2SetPoint > 100)
  410. {
  411. MessageBox.Show(Aitex.Triton160.UI.Properties.Resources.DiagnoseViewModel_DoRfOperation_C2ValueShouldBe0100CurrentSetting +
  412. RfDataSetPoint.MatchPositionC2SetPoint, Aitex.Triton160.UI.Properties.Resources.DiagnoseViewModel_DoRfOperation_Warning, MessageBoxButton.OK);
  413. return;
  414. }
  415. WcfClient.Instance.InvokeService_DoOperation(TritonOperation.DeviceOperation.ToString(), new object[] { TritonDevice.Rf.ToString(), AITRfOperation.SetMatchPositionC2.ToString(), (RfDataSetPoint.MatchPositionC2SetPoint).ToString() });
  416. SetConfig(SCName.System_MatchPositionC2, (RfDataSetPoint.MatchPositionC2SetPoint).ToString());
  417. break;
  418. }
  419. }
  420. void SetConfig(string config, string value)
  421. {
  422. Triton160UiSystem.Instance.WCF.Invoker.DoOperation(TritonOperation.SetConfig.ToString(), config, value );
  423. }
  424. private void LeakCheck(object param)
  425. {
  426. WcfClient.Instance.InvokeService_DoOperation(
  427. TritonOperation.LeakCheck.ToString(), new[]
  428. {
  429. LeakCheckPumpDownTimeSetPoint,
  430. LeakCheckTimeSetPoint,
  431. LeakCheckModeSetPoint,
  432. EnableGasLine1.ToString(),
  433. EnableGasLine2.ToString(),
  434. EnableGasLine3.ToString(),
  435. EnableGasLine4.ToString(),
  436. EnableGasLine5.ToString(),
  437. });
  438. }
  439. private void AbortLeakCheck(object param)
  440. {
  441. if (MessageBox.Show(Aitex.Triton160.UI.Properties.Resources.LeakCheckViewModel_AbortLeakCheck_DoYouWantToStopCurrentLeakCheckRunning, "JetPlasma", MessageBoxButton.YesNo) == MessageBoxResult.Yes)
  442. WcfClient.Instance.InvokeService_DoOperation(TritonOperation.Abort.ToString());
  443. }
  444. private void DeleteLeakCheck(object param)
  445. {
  446. if (CurrentLeakCheckResultItem == null)
  447. {
  448. MessageBox.Show(Aitex.Triton160.UI.Properties.Resources.LeakCheckViewModel_DeleteLeakCheck_DidNotSelectLeakCheckResult, "JetPlasma", MessageBoxButton.OK);
  449. return;
  450. }
  451. if (MessageBox.Show(Aitex.Triton160.UI.Properties.Resources.LeakCheckViewModel_DeleteLeakCheck_DoYouWantToDeleteCurrentLeakCheckResult, "JetPlasma", MessageBoxButton.YesNo) == MessageBoxResult.Yes)
  452. WcfClient.Instance.InvokeService_DoOperation(TritonOperation.DeleteLeakCheck.ToString(), CurrentLeakCheckResultItem.Id);
  453. UpdateLeakCheckResult();
  454. }
  455. }
  456. }