StatusViewModel.cs 89 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270
  1. using Aitex.Core.Common.DeviceData;
  2. using Aitex.Core.Util;
  3. using Caliburn.Micro;
  4. using Caliburn.Micro.Core;
  5. using MECF.Framework.Common.DataCenter;
  6. using MECF.Framework.Common.Equipment;
  7. using MECF.Framework.Common.OperationCenter;
  8. using MECF.Framework.UI.Client.ClientBase;
  9. using MECF.Framework.UI.Client.CenterViews.Configs.SystemConfig;
  10. using System.Collections.Generic;
  11. using System.Collections.ObjectModel;
  12. using System.Linq;
  13. using System.Windows;
  14. using System.Windows.Media;
  15. using FurnaceUI.Client;
  16. using FurnaceUI.Models;
  17. using FurnaceUI.Views.Jobs;
  18. using FurnaceUI.Views.Recipes;
  19. using FurnaceUI.Views.Editors;
  20. using MECF.Framework.Common.SubstrateTrackings;
  21. using FurnaceUI.Views.Status;
  22. using OpenSEMI.ClientBase;
  23. using MECF.Framework.UI.Client.CenterViews.Editors.Recipe;
  24. using FurnaceUI.Controls.Common;
  25. using MECF.Framework.Common.CommonData;
  26. using System;
  27. using MECF.Framework.Common.Jobs;
  28. using FurnaceUI.Common;
  29. namespace FurnaceUI.Views.Operations
  30. {
  31. public class StatusViewModel : FurnaceUIViewModelBase
  32. {
  33. #region Property
  34. [Subscription("LP1.CurrentLotId")]
  35. public string LP1CurrentLotId { get; set; }
  36. [Subscription("LP1.WaitLotId")]
  37. public List<string> LP1WaitLotId { get; set; }
  38. [Subscription("LP2.CurrentLotId")]
  39. public string LP2CurrentLotId { get; set; }
  40. [Subscription("LP2.WaitLotId")]
  41. public List<string> LP2WaitLotId { get; set; }
  42. [Subscription("TransferState", "LP1")]
  43. public string TransferStateLp1 { get; set; }
  44. [Subscription("TransferState", "LP2")]
  45. public string TransferStateLp2 { get; set; }
  46. [Subscription("CarrierIDStatus", "LP1")]
  47. public string CarrierStatusLP1 { get; set; }
  48. [Subscription("CarrierIDStatus", "LP2")]
  49. public string CarrierStatusLP2 { get; set; }
  50. [Subscription("CarrierRobot.RobotMoveInfo")]
  51. public RobotMoveInfo CassetteRobotMoveInfo { get; set; }
  52. [Subscription("WaferRobot.RobotMoveInfo")]
  53. public RobotMoveInfo WaferRobotMoveInfo { get; set; }
  54. [Subscription("ProcessFlow.Status")]
  55. public string ProcessFlowStatus { get; set; }
  56. double _eDUseWarningLimit;
  57. double _eDUseAlarmLimit;
  58. SolidColorBrush _greenBk = new SolidColorBrush(Colors.LawnGreen);
  59. SolidColorBrush _redBk = new SolidColorBrush(Colors.Red);
  60. SolidColorBrush _transparentBk = new SolidColorBrush(Colors.Transparent);
  61. SolidColorBrush _orangeBk = new SolidColorBrush(Colors.Orange);
  62. SolidColorBrush _blackBk = new SolidColorBrush(Colors.Black);
  63. public SolidColorBrush StandbyBk
  64. {
  65. get
  66. {
  67. if (!IsPM1Process && !IsPM1PostProcess)
  68. return _transparentBk;
  69. return ProcessFlowStatus == "Standby" ? _greenBk : _transparentBk;
  70. }
  71. }
  72. public SolidColorBrush ReadyBk
  73. {
  74. get
  75. {
  76. if (!IsPM1Process && !IsPM1PostProcess)
  77. return _transparentBk;
  78. return (ProcessFlowStatus == "Standby" || ProcessFlowStatus == "Ready") ? _greenBk : _transparentBk;
  79. }
  80. }
  81. public SolidColorBrush EndBk
  82. {
  83. get
  84. {
  85. if (!IsPM1Process && !IsPM1PostProcess)
  86. return _transparentBk;
  87. return ProcessFlowStatus == "End" ? _greenBk : _transparentBk;
  88. }
  89. }
  90. public SolidColorBrush RunBk
  91. {
  92. get
  93. {
  94. if (!IsPM1Process && !IsPM1PostProcess)
  95. return _transparentBk;
  96. return (ProcessFlowStatus == "End" || ProcessFlowStatus == "Run") ? _greenBk : _transparentBk;
  97. }
  98. }
  99. public SolidColorBrush AbortBk
  100. {
  101. get
  102. {
  103. if (!IsPM1Process && !IsPM1PostProcess)
  104. return _transparentBk;
  105. return ProcessFlowStatus == "Abort" ? _redBk : _transparentBk;
  106. }
  107. }
  108. #region Job Staus
  109. [Subscription("System.Batch")]
  110. public string Batch { get; set; }
  111. [Subscription("System.TransferJobStatus")]
  112. public string TransferJobStatus { get; set; }
  113. public SolidColorBrush TransferJobBk
  114. {
  115. get
  116. {
  117. return TransferJobStatus == "Idle" || string.IsNullOrEmpty(TransferJobStatus) ? _transparentBk : _greenBk;
  118. }
  119. }
  120. [Subscription("System.ProcessJobStatus")]
  121. public string ProcessJobStatus { get; set; }
  122. [Subscription("System.Pause")]
  123. public bool IsPause { get; set; }
  124. public string ProcessJobsStatus
  125. {
  126. get
  127. {
  128. return (string.IsNullOrEmpty(Batch) || ProcessJobStatus == "Idle") ? ProcessJobStatus : $"{Batch} : {ProcessJobStatus}";
  129. }
  130. }
  131. public SolidColorBrush ProcessJobBk
  132. {
  133. get
  134. {
  135. if (IsPause)
  136. {
  137. return _orangeBk;
  138. }
  139. else
  140. {
  141. return ProcessJobStatus == "Idle" || string.IsNullOrEmpty(ProcessJobsStatus) ? _transparentBk : _greenBk;
  142. }
  143. return _transparentBk;
  144. }
  145. }
  146. #endregion
  147. #region SMIF
  148. [Subscription("LP1.Status")]
  149. public string LP1Status { get; set; }
  150. public string Lp1StatusBackground
  151. {
  152. get { return ModuleStatusBackground.GetStatusBackground(LP1Status); }
  153. }
  154. [Subscription("Boat.Status")]
  155. public string BoatStatus { get; set; }
  156. public string BoatStatusBackground
  157. {
  158. get { return ModuleStatusBackground.GetStatusBackground(BoatStatus); }
  159. }
  160. [Subscription("LP2.Status")]
  161. public string LP2Status { get; set; }
  162. public string LP2StatusBackground
  163. {
  164. get { return ModuleStatusBackground.GetStatusBackground(LP2Status); }
  165. }
  166. #endregion
  167. #region Stocker
  168. private List<ModuleName> _stokcers;
  169. private List<string> _stokcerWaferType;
  170. private int _cassetteSlot = 0;
  171. private ObservableCollection<string> _stockerSlots;
  172. public ObservableCollection<string> StockerSlots
  173. {
  174. get { return _stockerSlots; }
  175. set
  176. {
  177. _stockerSlots = value;
  178. NotifyOfPropertyChange("StockerSlots");
  179. }
  180. }
  181. private SolidColorBrush _WhiteFill = new SolidColorBrush(Colors.White);
  182. private SolidColorBrush _productionFill = new SolidColorBrush((Color)ColorConverter.ConvertFromString("#bedadb"));
  183. private SolidColorBrush _SD_ED_M_Fill = new SolidColorBrush((Color)ColorConverter.ConvertFromString("LightGray"));
  184. private SolidColorBrush _waringFill = new SolidColorBrush(Colors.Yellow);
  185. private SolidColorBrush _alarmFill = new SolidColorBrush(Colors.Red);
  186. private List<SolidColorBrush> _stockerBackground = new List<SolidColorBrush>();
  187. public List<SolidColorBrush> StockerBackground
  188. {
  189. get => _stockerBackground;
  190. set
  191. {
  192. _stockerBackground = value;
  193. NotifyOfPropertyChange(nameof(StockerBackground));
  194. }
  195. }
  196. [Subscription("PM1.SensorStocker1.Value")]
  197. public bool SensorStation1Presence { get; set; }
  198. [Subscription("PM1.SensorStocker2.Value")]
  199. public bool SensorStation2Presence { get; set; }
  200. [Subscription("PM1.SensorStocker3.Value")]
  201. public bool SensorStation3Presence { get; set; }
  202. [Subscription("PM1.SensorStocker4.Value")]
  203. public bool SensorStation4Presence { get; set; }
  204. [Subscription("PM1.SensorStocker5.Value")]
  205. public bool SensorStation5Presence { get; set; }
  206. [Subscription("PM1.SensorStocker6.Value")]
  207. public bool SensorStation6Presence { get; set; }
  208. [Subscription("PM1.SensorStocker7.Value")]
  209. public bool SensorStation7Presence { get; set; }
  210. [Subscription("PM1.SensorStocker8.Value")]
  211. public bool SensorStation8Presence { get; set; }
  212. [Subscription("PM1.SensorStocker9.Value")]
  213. public bool SensorStation9Presence { get; set; }
  214. [Subscription("PM1.SensorStocker10.Value")]
  215. public bool SensorStation10Presence { get; set; }
  216. [Subscription("PM1.SensorStocker11.Value")]
  217. public bool SensorStation11Presence { get; set; }
  218. [Subscription("PM1.SensorStocker12.Value")]
  219. public bool SensorStation12Presence { get; set; }
  220. [Subscription("PM1.SensorStocker13.Value")]
  221. public bool SensorStation13Presence { get; set; }
  222. [Subscription("PM1.SensorStocker14.Value")]
  223. public bool SensorStation14Presence { get; set; }
  224. [Subscription("PM1.SensorStocker15.Value")]
  225. public bool SensorStation15Presence { get; set; }
  226. [Subscription("PM1.SensorStocker16.Value")]
  227. public bool SensorStation16Presence { get; set; }
  228. [Subscription("PM1.SensorStocker17.Value")]
  229. public bool SensorStation17Presence { get; set; }
  230. [Subscription("PM1.SensorStocker18.Value")]
  231. public bool SensorStation18Presence { get; set; }
  232. [Subscription("Stocker1.Carrier")]
  233. public CarrierInfo Stocker1CarrierData { get; set; }
  234. [Subscription("Stocker2.Carrier")]
  235. public CarrierInfo Stocker2CarrierData { get; set; }
  236. [Subscription("Stocker3.Carrier")]
  237. public CarrierInfo Stocker3CarrierData { get; set; }
  238. [Subscription("Stocker4.Carrier")]
  239. public CarrierInfo Stocker4CarrierData { get; set; }
  240. [Subscription("Stocker5.Carrier")]
  241. public CarrierInfo Stocker5CarrierData { get; set; }
  242. [Subscription("Stocker6.Carrier")]
  243. public CarrierInfo Stocker6CarrierData { get; set; }
  244. [Subscription("Stocker7.Carrier")]
  245. public CarrierInfo Stocker7CarrierData { get; set; }
  246. [Subscription("Stocker8.Carrier")]
  247. public CarrierInfo Stocker8CarrierData { get; set; }
  248. [Subscription("Stocker9.Carrier")]
  249. public CarrierInfo Stocker9CarrierData { get; set; }
  250. [Subscription("Stocker10.Carrier")]
  251. public CarrierInfo Stocker10CarrierData { get; set; }
  252. [Subscription("Stocker11.Carrier")]
  253. public CarrierInfo Stocker11CarrierData { get; set; }
  254. [Subscription("Stocker12.Carrier")]
  255. public CarrierInfo Stocker12CarrierData { get; set; }
  256. [Subscription("Stocker13.Carrier")]
  257. public CarrierInfo Stocker13CarrierData { get; set; }
  258. [Subscription("Stocker14.Carrier")]
  259. public CarrierInfo Stocker14CarrierData { get; set; }
  260. [Subscription("Stocker15.Carrier")]
  261. public CarrierInfo Stocker15CarrierData { get; set; }
  262. [Subscription("Stocker16.Carrier")]
  263. public CarrierInfo Stocker16CarrierData { get; set; }
  264. [Subscription("Stocker17.Carrier")]
  265. public CarrierInfo Stocker17CarrierData { get; set; }
  266. [Subscription("Stocker18.Carrier")]
  267. public CarrierInfo Stocker18CarrierData { get; set; }
  268. [Subscription("CarrierRobot.Carrier")]
  269. public CarrierInfo CassetteRobotCarrierData { get; set; }
  270. [Subscription("FIMS1.Carrier")]
  271. public CarrierInfo FIMS1CarrierData { get; set; }
  272. [Subscription("FIMS2.Carrier")]
  273. public CarrierInfo FIMS2CarrierData { get; set; }
  274. [Subscription("LP1.Carrier")]
  275. public CarrierInfo LP1CarrierData { get; set; }
  276. [Subscription("LP2.Carrier")]
  277. public CarrierInfo LP2CarrierData { get; set; }
  278. [Subscription("LP3.Carrier")]
  279. public CarrierInfo LP3CarrierData { get; set; }
  280. [Subscription("LP4.Carrier")]
  281. public CarrierInfo LP4CarrierData { get; set; }
  282. public int Stocker1WaferCount { get; set; } = 0;
  283. public int Stocker2WaferCount { get; set; } = 0;
  284. public int Stocker3WaferCount { get; set; } = 0;
  285. public int Stocker4WaferCount { get; set; } = 0;
  286. public int Stocker5WaferCount { get; set; } = 0;
  287. public int Stocker6WaferCount { get; set; } = 0;
  288. public int Stocker7WaferCount { get; set; } = 0;
  289. public int Stocker8WaferCount { get; set; } = 0;
  290. public int Stocker9WaferCount { get; set; } = 0;
  291. public int Stocker10WaferCount { get; set; } = 0;
  292. public int Stocker11WaferCount { get; set; } = 0;
  293. public int Stocker12WaferCount { get; set; } = 0;
  294. public int Stocker13WaferCount { get; set; } = 0;
  295. public int Stocker14WaferCount { get; set; } = 0;
  296. public int Stocker15WaferCount { get; set; } = 0;
  297. public int Stocker16WaferCount { get; set; } = 0;
  298. public int Stocker17WaferCount { get; set; } = 0;
  299. public int Stocker18WaferCount { get; set; } = 0;
  300. #endregion
  301. #region Heater
  302. [Subscription("System.HeaterU.DeviceData")]
  303. public AITHeaterData HeaterUData { get; set; }
  304. [Subscription("System.HeaterCU.DeviceData")]
  305. public AITHeaterData HeaterCUData { get; set; }
  306. [Subscription("System.HeaterC.DeviceData")]
  307. public AITHeaterData HeaterCData { get; set; }
  308. [Subscription("System.HeaterCL.DeviceData")]
  309. public AITHeaterData HeaterCLData { get; set; }
  310. [Subscription("System.HeaterL.DeviceData")]
  311. public AITHeaterData HeaterLData { get; set; }
  312. public AITHeaterData BottomHeaterData => HeaterLData;
  313. public AITHeaterData CenterBottomHeaterData => HeaterCLData;
  314. public AITHeaterData CenterHeaterData => HeaterCData;
  315. public AITHeaterData TopCenterHeaterData => HeaterCUData;
  316. public AITHeaterData TopHeaterData => HeaterUData;
  317. public int ControlMode => HeaterUData.ControlMode;
  318. #endregion
  319. #region Robot
  320. [Subscription("WaferRobot.Status")]
  321. public string WaferRobotStatus { get; set; }
  322. public string WaferRobotStatusBackground
  323. {
  324. get { return ModuleStatusBackground.GetStatusBackground(WaferRobotStatus); }
  325. }
  326. [Subscription("CarrierRobot.Status")]
  327. public string CarrierRobotStatus { get; set; }
  328. public string CarrierRobotStatusBackground
  329. {
  330. get { return ModuleStatusBackground.GetStatusBackground(CarrierRobotStatus); }
  331. }
  332. #endregion
  333. #region StockerCarrierType
  334. private string GetStockerCarrierType(CarrierInfo carrierInfo)
  335. {
  336. if (carrierInfo != null && carrierInfo.Status == CarrierStatus.Normal)
  337. {
  338. if (carrierInfo.IsProcessed(carrierInfo.Name))
  339. {
  340. return "Process";
  341. }
  342. return carrierInfo.CarrierType.ToString();
  343. }
  344. return "";
  345. }
  346. public string Stocker1CarrierType
  347. {
  348. get
  349. {
  350. return GetStockerCarrierType(Stocker1CarrierData);
  351. }
  352. }
  353. public string Stocker2CarrierType
  354. {
  355. get
  356. {
  357. return GetStockerCarrierType(Stocker2CarrierData);
  358. }
  359. }
  360. public string Stocker3CarrierType
  361. {
  362. get
  363. {
  364. return GetStockerCarrierType(Stocker3CarrierData);
  365. }
  366. }
  367. public string Stocker4CarrierType
  368. {
  369. get
  370. {
  371. return GetStockerCarrierType(Stocker4CarrierData);
  372. }
  373. }
  374. public string Stocker5CarrierType
  375. {
  376. get
  377. {
  378. return GetStockerCarrierType(Stocker5CarrierData);
  379. }
  380. }
  381. public string Stocker6CarrierType
  382. {
  383. get
  384. {
  385. return GetStockerCarrierType(Stocker6CarrierData);
  386. }
  387. }
  388. public string Stocker7CarrierType
  389. {
  390. get
  391. {
  392. return GetStockerCarrierType(Stocker7CarrierData);
  393. }
  394. }
  395. public string Stocker8CarrierType
  396. {
  397. get
  398. {
  399. return GetStockerCarrierType(Stocker8CarrierData);
  400. }
  401. }
  402. public string Stocker9CarrierType
  403. {
  404. get
  405. {
  406. return GetStockerCarrierType(Stocker9CarrierData);
  407. }
  408. }
  409. public string Stocker10CarrierType
  410. {
  411. get
  412. {
  413. return GetStockerCarrierType(Stocker10CarrierData);
  414. }
  415. }
  416. public string Stocker11CarrierType
  417. {
  418. get
  419. {
  420. return GetStockerCarrierType(Stocker11CarrierData);
  421. }
  422. }
  423. public string Stocker12CarrierType
  424. {
  425. get
  426. {
  427. return GetStockerCarrierType(Stocker12CarrierData);
  428. }
  429. }
  430. public string Stocker13CarrierType
  431. {
  432. get
  433. {
  434. return GetStockerCarrierType(Stocker13CarrierData);
  435. }
  436. }
  437. public string Stocker14CarrierType
  438. {
  439. get
  440. {
  441. return GetStockerCarrierType(Stocker14CarrierData);
  442. }
  443. }
  444. public string Stocker15CarrierType
  445. {
  446. get
  447. {
  448. return GetStockerCarrierType(Stocker15CarrierData);
  449. }
  450. }
  451. public string Stocker16CarrierType
  452. {
  453. get
  454. {
  455. return GetStockerCarrierType(Stocker16CarrierData);
  456. }
  457. }
  458. public string Stocker17CarrierType
  459. {
  460. get
  461. {
  462. return GetStockerCarrierType(Stocker17CarrierData);
  463. }
  464. }
  465. public string Stocker18CarrierType
  466. {
  467. get
  468. {
  469. return GetStockerCarrierType(Stocker18CarrierData);
  470. }
  471. }
  472. #endregion
  473. #region PM
  474. [Subscription("PM1.Status")]
  475. public string PM1Status { get; set; }
  476. [Subscription("PM1.RecipeBeginTime")]
  477. public DateTime PM1RecipeBeginTime { get; set; }
  478. [Subscription("PM1.RecipeStepName")]
  479. public string PM1RecipeStepName { get; set; }
  480. [Subscription("PM1.RecipeNextStepName")]
  481. public string PM1RecipeNextStepName { get; set; }
  482. [Subscription("PM1.RecipeStepNumber")]
  483. public int PM1RecipeStepNumber { get; set; }
  484. [Subscription("PM1.RecipeStepElapseTime")]
  485. public double PM1RecipeStepElapseTime { get; set; }
  486. [Subscription("PM1.RecipeStepTime")]
  487. public double PM1RecipeStepTime { get; set; }
  488. [Subscription("PM1.RecipeTotalElapseTime")]
  489. public double PM1RecipeTotalElapseTime { get; set; }
  490. [Subscription("PM1.RecipeTotalTime")]
  491. public double PM1RecipeTotalTime { get; set; }
  492. [Subscription("PM1.RecipeHoldTime")]
  493. public double PM1RecipeHoldTime { get; set; }
  494. [Subscription("PM1.RecipeHold")]
  495. public bool PM1RecipeHold { get; set; }
  496. [Subscription("PM1.RecipeHolded")]
  497. public bool PM1RecipeHolded { get; set; }
  498. [Subscription("PM1.RecipeWait")]
  499. public bool PM1RecipeWait { get; set; }
  500. [Subscription("PM1.NewShowTime")]
  501. public double PM1NewShowTime { get; set; }
  502. [Subscription("PM1.IsExecuteAbortRecipe")]
  503. public bool PM1IsExecuteAbortRecipe { get; set; }
  504. [Subscription("PM1.ExecRecipeType")]
  505. public string PM1ExecRecipeType { get; set; }
  506. [Subscription("PM1.LoopCountSet")]
  507. public int PM1LoopCountSet { get; set; }
  508. [Subscription("PM1.LoopCountCurrent")]
  509. public int PM1LoopCountCurrent { get; set; }
  510. [Subscription("PM1.IsLooping")]
  511. public bool PM1IsLooping { get; set; }
  512. [Subscription("Scheduler.CoolingTime")]
  513. public int CoolingTime { get; set; }
  514. [Subscription("Scheduler.CoolingRemainTime")]
  515. public int CoolingRemainTime { get; set; }
  516. public string LoopInfo
  517. {
  518. get
  519. {
  520. if (!IsPM1Process || !PM1IsLooping)
  521. return "--";
  522. return $"{PM1ExecRecipeType} : {PM1LoopCountCurrent} / {PM1LoopCountSet}";
  523. }
  524. }
  525. private Visibility _isNTPVisibility;
  526. public Visibility IsNTPVisibility
  527. {
  528. get => _isNTPVisibility;
  529. set
  530. {
  531. _isNTPVisibility = value;
  532. NotifyOfPropertyChange(nameof(IsNTPVisibility));
  533. }
  534. }
  535. private Visibility _isSiBCNVisibility;
  536. public Visibility IsSiBCNVisibility
  537. {
  538. get => _isSiBCNVisibility;
  539. set
  540. {
  541. _isSiBCNVisibility = value;
  542. NotifyOfPropertyChange(nameof(IsSiBCNVisibility));
  543. }
  544. }
  545. private Visibility _isELKVisibility;
  546. public Visibility IsELKVisibility
  547. {
  548. get => _isELKVisibility;
  549. set
  550. {
  551. _isELKVisibility = value;
  552. NotifyOfPropertyChange(nameof(IsELKVisibility));
  553. }
  554. }
  555. [Subscription("PM1.SubRecipeCurrentLoopCount")]
  556. public int PM1SubRecipeCurrentLoopCount { get; set; }
  557. [Subscription("PM1.ProcessSubRecipe")]
  558. public string ProcessSubRecipe { get; set; }
  559. [Subscription("PM1.ProcessAbortRecipe")]
  560. public string ProcessAbortRecipe { get; set; }
  561. [Subscription("PM1.SubRecipeLoopCount")]
  562. public int PM1SubRecipeLoopCount { get; set; }
  563. [Subscription("PM1.IsExecuteSubRecipe")]
  564. public bool PM1IsExecuteSubRecipe { get; set; }
  565. public string SubInfo
  566. {
  567. get
  568. {
  569. if (!IsPM1Process || !PM1IsExecuteSubRecipe)
  570. return "--";
  571. return $"{PM1ExecRecipeType} : {PM1SubRecipeCurrentLoopCount} / {PM1SubRecipeLoopCount}";
  572. }
  573. }
  574. public bool IsPM1Idle
  575. {
  576. get { return PM1Status == "Idle"; }
  577. }
  578. public bool IsPM1Process
  579. {
  580. get { return PM1Status == "Process"; }
  581. }
  582. public bool IsPM1PostProcess
  583. {
  584. get { return PM1Status == "PostProcess"; }
  585. }
  586. public bool IsPM1PreProcess
  587. {
  588. get { return PM1Status == "PreProcess"; }
  589. }
  590. public string PM1StepNumber
  591. {
  592. get
  593. {
  594. if (!IsPM1Process && !IsPM1PostProcess)
  595. return "--";
  596. return $"{PM1RecipeStepNumber}";
  597. }
  598. }
  599. public string PM1StepName
  600. {
  601. get
  602. {
  603. if (!IsPM1Process && !IsPM1PostProcess)
  604. return "--";
  605. return $"{PM1RecipeStepName}";
  606. }
  607. }
  608. public string PM1NextStepName
  609. {
  610. get
  611. {
  612. if (!IsPM1Process && !IsPM1PostProcess)
  613. return "--";
  614. return $"{PM1RecipeNextStepName}";
  615. }
  616. }
  617. public string PM1BeginTime
  618. {
  619. get
  620. {
  621. if (!IsPM1Process && !IsPM1PostProcess)
  622. return "--";
  623. return $"{PM1RecipeBeginTime.ToString("yyyy-MM-dd HH:mm:ss")}";
  624. }
  625. }
  626. private bool isCoolingFrist = false;
  627. private DateTime firstCoolingTime = DateTime.MinValue;
  628. public string PM1EndTime
  629. {
  630. get
  631. {
  632. if (LocalProcessJobs!=null && LocalProcessJobs.Where(x=>x.ProcessingState== EnumProcessingState.CoolingBeforeDischarge)!=null)
  633. {
  634. if (!isCoolingFrist)
  635. {
  636. TimeSpan secondSpan = DateTime.Now - PM1RecipeBeginTime;
  637. firstCoolingTime = PM1RecipeBeginTime.AddSeconds(secondSpan.TotalSeconds + PM1RecipeTotalTime - PM1RecipeTotalElapseTime);
  638. isCoolingFrist = true;
  639. }
  640. }
  641. if (!IsPM1Process && !IsPM1PostProcess)
  642. return "--";
  643. if (isCoolingFrist)
  644. {
  645. isCoolingFrist = false;
  646. firstCoolingTime = DateTime.MinValue;
  647. }
  648. return $"{CalEndTime(PM1RecipeBeginTime, PM1RecipeTotalTime, PM1RecipeTotalElapseTime)}";
  649. }
  650. }
  651. public string PM1StepTime
  652. {
  653. get
  654. {
  655. if (!IsPM1Process && !IsPM1PostProcess)
  656. return "--";
  657. if (PM1RecipeHolded && PM1RecipeHoldTime > 0)
  658. return "--";
  659. return CalStepTime(PM1RecipeStepElapseTime, PM1RecipeStepTime);
  660. }
  661. }
  662. public string PM1RecipeTime
  663. {
  664. get
  665. {
  666. if (!IsPM1Process && !IsPM1PostProcess)
  667. return "--";
  668. return CalRecipeTime(PM1RecipeTotalElapseTime, PM1RecipeTotalTime);
  669. }
  670. }
  671. public string PM1HoldTime
  672. {
  673. get
  674. {
  675. if (!IsPM1Process && !IsPM1PostProcess)
  676. return "--";
  677. return CalHoldTime(PM1NewShowTime);
  678. }
  679. }
  680. public string PM1HoldName
  681. {
  682. get
  683. {
  684. return "Hold Time";
  685. }
  686. }
  687. public string HoldName
  688. {
  689. get
  690. {
  691. if (PM1RecipeHold)
  692. return "Continue";
  693. return "Hold";
  694. }
  695. }
  696. public string HoldWaitDisplay
  697. {
  698. get
  699. {
  700. if (PM1Status == "Idle")
  701. {
  702. return "";
  703. }
  704. else
  705. {
  706. if (PM1RecipeWait)
  707. return "W";
  708. if (PM1RecipeHolded)
  709. return "H";
  710. return "";
  711. }
  712. }
  713. }
  714. public SolidColorBrush HoldForeground
  715. {
  716. get
  717. {
  718. if (PM1RecipeHold)
  719. return _blackBk;
  720. return _redBk;
  721. }
  722. }
  723. [Subscription("PM1.SelectedRecipeName")]
  724. public string PM1SelectedRecipeName
  725. {
  726. get;
  727. set;
  728. }
  729. [Subscription("PM1.MainRecipeName")]
  730. public string PM1MainRecipeName
  731. {
  732. get;
  733. set;
  734. }
  735. public string PM1SelectedRecipeNameDisplay
  736. {
  737. get
  738. {
  739. if (string.IsNullOrEmpty(PM1SelectedRecipeName))
  740. return string.Empty;
  741. if (!IsPM1Process && !IsPM1PostProcess)
  742. return string.Empty;
  743. //return PM1SelectedRecipeName.Substring("Furnace\\Process\\".Length);
  744. return PM1SelectedRecipeName;
  745. }
  746. }
  747. [Subscription("PM1.IsOnline")]
  748. public bool PM1IsOnline { get; set; }
  749. public bool PM1IsOffline
  750. {
  751. get { return !PM1IsOnline; }
  752. }
  753. public bool IsEnableEmergencyAbort
  754. {
  755. get
  756. {
  757. return PM1Status != "Init" && PM1Status != "Idle";
  758. }
  759. }
  760. private string CalStepTime(double elapseTime, double totalTime)
  761. {
  762. string stepTime = string.Empty;
  763. double remainingTime = totalTime - elapseTime;
  764. if (remainingTime < 0)
  765. remainingTime = 0;
  766. string strElapseTimeH = $"{(elapseTime / 3600).ToString().PadLeft(2, '0')}";
  767. string strElapseTimeM = $"{(elapseTime % 3600 / 60).ToString().PadLeft(2, '0')}";
  768. string strElapseTimeS = $"{(elapseTime % 60).ToString().PadLeft(2, '0')}";
  769. string strRemainingTimeH = $"{((int)(remainingTime / 3600)).ToString("f0").PadLeft(2, '0')}";
  770. string strRemainingTimeM = $"{((int)(remainingTime % 3600 / 60)).ToString("f0").PadLeft(2, '0')}";
  771. string strRemainingTimeS = $"{(remainingTime % 60).ToString("f1").PadLeft(2, '0')}";
  772. stepTime = $"{strRemainingTimeH}:{strRemainingTimeM}:{strRemainingTimeS}";
  773. return stepTime;
  774. }
  775. private string CalRecipeTime(double elapseTime, double totalTime)
  776. {
  777. string recipeTime = string.Empty;
  778. double remainingTime = totalTime - elapseTime;
  779. if (remainingTime < 0)
  780. remainingTime = 0;
  781. string strElapseTimeH = $"{(elapseTime / 3600).ToString("f0").PadLeft(2, '0')}";
  782. string strElapseTimeM = $"{(elapseTime % 3600 / 60).ToString("f0").PadLeft(2, '0')}";
  783. string strElapseTimeS = $"{(elapseTime % 60).ToString("f0").PadLeft(2, '0')}";
  784. string strRemainingTimeH = $"{((int)(remainingTime / 3600)).ToString("f0").PadLeft(2, '0')}";
  785. string strRemainingTimeM = $"{((int)(remainingTime % 3600 / 60)).ToString("f0").PadLeft(2, '0')}";
  786. string strRemainingTimeS = $"{(remainingTime % 60).ToString("f1").PadLeft(2, '0')}";
  787. recipeTime = $"{strRemainingTimeH}:{strRemainingTimeM}:{strRemainingTimeS}";
  788. return recipeTime;
  789. }
  790. private string CalHoldTime(double totalTime)
  791. {
  792. string holdTime = string.Empty;
  793. string strHoldTimeH = $"{((int)(totalTime / 3600)).ToString("f0").PadLeft(2, '0')}";
  794. string strHoldTimeM = $"{((int)(totalTime % 3600 / 60)).ToString("f0").PadLeft(2, '0')}";
  795. string strHoldTimeS = $"{(totalTime % 60).ToString("f1").PadLeft(2, '0')}";
  796. holdTime = $"{strHoldTimeH}:{strHoldTimeM}:{strHoldTimeS}";
  797. return holdTime;
  798. }
  799. private string _recipeProgress;
  800. public string RecipeProgress
  801. {
  802. get => _recipeProgress;
  803. set
  804. {
  805. _recipeProgress = value;
  806. NotifyOfPropertyChange(nameof(RecipeProgress));
  807. }
  808. }
  809. private int _recipeProgressValue;
  810. public int RecipeProgressValue
  811. {
  812. get => _recipeProgressValue;
  813. set
  814. {
  815. _recipeProgressValue = value;
  816. NotifyOfPropertyChange(nameof(RecipeProgressValue));
  817. }
  818. }
  819. #endregion
  820. #region Scheduler
  821. public bool IsRtInitialized
  822. {
  823. get
  824. {
  825. return RtStatus != "Init" && RtStatus != "Initializing";
  826. }
  827. }
  828. public bool IsRtRunning
  829. {
  830. get
  831. {
  832. return RtStatus != "Init" && RtStatus != "Idle" && RtStatus != "AutoIdle";
  833. }
  834. }
  835. public bool IsRtError
  836. {
  837. get
  838. {
  839. return RtStatus == "Error";
  840. }
  841. }
  842. public bool IsAuto
  843. {
  844. get { return RtStatus == "Auto_Running" || RtStatus == "Auto_Idle"; }
  845. }
  846. [Subscription("Rt.Status")]
  847. public string RtStatus { get; set; }
  848. public bool _isCycleMode;
  849. public Visibility IsCycleInfoVisibility
  850. {
  851. get { return _isCycleMode ? Visibility.Visible : Visibility.Collapsed; }
  852. }
  853. [Subscription("Scheduler.CycledCount")]
  854. public int CycledCount { get; set; }
  855. [Subscription("Scheduler.CycledWafer")]
  856. public int CycledWafer { get; set; }
  857. [Subscription("Scheduler.CycledTotalWafer")]
  858. public int TotalCycledWafer { get; set; }
  859. [Subscription("Scheduler.CycleSetPoint")]
  860. public int CycleSetPoint { get; set; }
  861. public string CycleCountDisplay
  862. {
  863. get { return (CycleSetPoint > 0 && (CycledCount > CycleSetPoint)) ? $"{CycledCount + 1}/{CycleSetPoint}" : $"{CycledCount}/{CycleSetPoint}"; }
  864. }
  865. [Subscription("Scheduler.ControlJobList")]
  866. public List<ControlJobInfo> LocalControlJobs
  867. {
  868. get;
  869. set;
  870. }
  871. [Subscription("Scheduler.ProcessJobList")]
  872. public List<ProcessJobInfo> LocalProcessJobs
  873. {
  874. get;
  875. set;
  876. }
  877. public string ControlJobStatus
  878. {
  879. get
  880. {
  881. if (LocalControlJobs == null || LocalControlJobs.Count == 0)
  882. return "";
  883. foreach (var cj in LocalControlJobs)
  884. {
  885. if (cj == null)
  886. continue;
  887. return cj.State.ToString();
  888. }
  889. return "";
  890. }
  891. }
  892. public string ProcessJob1ID
  893. {
  894. get
  895. {
  896. if (LocalProcessJobs == null || LocalProcessJobs.Count == 0)
  897. return "";
  898. var pj = LocalProcessJobs[0];
  899. return pj.Name;
  900. }
  901. }
  902. public string ProcessJob1StartTime
  903. {
  904. get
  905. {
  906. if (LocalProcessJobs == null || LocalProcessJobs.Count == 0)
  907. return "";
  908. var pj = LocalProcessJobs[0];
  909. return pj.BeginTime.ToString("yyyy-MM-dd HH:mm:ss");
  910. }
  911. }
  912. public string TotolProcessJob1EndTime
  913. {
  914. get
  915. {
  916. if (LocalProcessJobs == null || LocalProcessJobs.Count == 0)
  917. return "";
  918. var pj = LocalProcessJobs[0];
  919. var beginTime = pj.BeginTime;
  920. if (pj.BeginTime.Equals(DateTime.MinValue))
  921. {
  922. return "";
  923. }
  924. if (pj.ProcessingState== EnumProcessingState.CoolingBeforeDischarge && !firstCoolingTime.Equals(DateTime.MinValue))
  925. {
  926. return firstCoolingTime.AddSeconds(CoolingTime).ToString("yyyy-MM-dd HH:mm:ss");
  927. }
  928. else
  929. {
  930. if (!IsPM1Process && !IsPM1PostProcess)
  931. return "--";
  932. TimeSpan secondSpan = DateTime.Now - beginTime;
  933. var retime = beginTime.AddSeconds(CoolingTime + secondSpan.TotalSeconds + PM1RecipeTotalTime - PM1RecipeTotalElapseTime);
  934. return retime.ToString("yyyy-MM-dd HH:mm:ss");
  935. }
  936. }
  937. }
  938. public string ProcessJob1Status
  939. {
  940. get
  941. {
  942. if (LocalProcessJobs == null || LocalProcessJobs.Count == 0)
  943. return "";
  944. var pj = LocalProcessJobs[0];
  945. return pj.ProcessingState.ToString();
  946. }
  947. }
  948. public string TotolProcessJob2EndTime
  949. {
  950. get
  951. {
  952. if (LocalProcessJobs == null || LocalProcessJobs.Count <= 1)
  953. return "";
  954. var pj = LocalProcessJobs[1];
  955. var beginTime = pj.BeginTime;
  956. if (pj.BeginTime.Equals(DateTime.MinValue))
  957. {
  958. return "";
  959. }
  960. if (pj.ProcessingState == EnumProcessingState.CoolingBeforeDischarge && !firstCoolingTime.Equals(DateTime.MinValue))
  961. {
  962. return firstCoolingTime.AddSeconds(CoolingTime).ToString("yyyy-MM-dd HH:mm:ss");
  963. }
  964. else
  965. {
  966. if (!IsPM1Process && !IsPM1PostProcess)
  967. return "--";
  968. TimeSpan secondSpan = DateTime.Now - beginTime;
  969. var retime = beginTime.AddSeconds(CoolingTime + secondSpan.TotalSeconds + PM1RecipeTotalTime - PM1RecipeTotalElapseTime);
  970. return retime.ToString("yyyy-MM-dd HH:mm:ss");
  971. }
  972. }
  973. }
  974. public string ProcessJob2ID
  975. {
  976. get
  977. {
  978. if (LocalProcessJobs == null || LocalProcessJobs.Count <= 1)
  979. return "";
  980. var pj = LocalProcessJobs[1];
  981. return pj.Name;
  982. }
  983. }
  984. public string ProcessJob2StartTime
  985. {
  986. get
  987. {
  988. if (LocalProcessJobs == null || LocalProcessJobs.Count <= 1)
  989. return "";
  990. var pj = LocalProcessJobs[1];
  991. if (pj.BeginTime.Equals(DateTime.MinValue))
  992. {
  993. return "------";
  994. }
  995. return pj.BeginTime.ToString("yyyy-MM-dd HH:mm:ss");
  996. }
  997. }
  998. public string ProcessJob2Status
  999. {
  1000. get
  1001. {
  1002. if (LocalProcessJobs == null || LocalProcessJobs.Count <= 1)
  1003. return "";
  1004. var pj = LocalProcessJobs[1];
  1005. return pj.ProcessingState.ToString();
  1006. }
  1007. }
  1008. #endregion
  1009. #region Button Logic
  1010. #endregion
  1011. #region shutter
  1012. [Subscription("AutoShutter.OpenCloseStatus")]
  1013. public string AutoShutterOpenCloseStatus { get; set; }
  1014. [Subscription("AutoShutter.UpDownStatus")]
  1015. public string AutoShutterUpDownStatus { get; set; }
  1016. public string AutoShutterStatus => $"{AutoShutterOpenCloseStatus}/{AutoShutterUpDownStatus}";
  1017. #endregion
  1018. #endregion
  1019. public string DefaultUnit { get; set; }
  1020. #region Gas
  1021. [Subscription("PM1.MFC1.DeviceData")]
  1022. public AITMfcData MFC1Data { get; set; }
  1023. [Subscription("PM1.MFC2.DeviceData")]
  1024. public AITMfcData MFC2Data { get; set; }
  1025. [Subscription("PM1.MFC3.DeviceData")]
  1026. public AITMfcData MFC3Data { get; set; }
  1027. [Subscription("PM1.MFC4.DeviceData")]
  1028. public AITMfcData MFC4Data { get; set; }
  1029. [Subscription("PM1.MFC5.DeviceData")]
  1030. public AITMfcData MFC5Data { get; set; }
  1031. [Subscription("PM1.MFC6.DeviceData")]
  1032. public AITMfcData MFC6Data { get; set; }
  1033. [Subscription("PM1.MFC7.DeviceData")]
  1034. public AITMfcData MFC7Data { get; set; }
  1035. [Subscription("PM1.MFC8.DeviceData")]
  1036. public AITMfcData MFC8Data { get; set; }
  1037. [Subscription("PM1.MFC9.DeviceData")]
  1038. public AITMfcData MFC9Data { get; set; }
  1039. [Subscription("PM1.MFC10.DeviceData")]
  1040. public AITMfcData MFC10Data { get; set; }
  1041. [Subscription("PM1.MFC11.DeviceData")]
  1042. public AITMfcData MFC11Data { get; set; }
  1043. [Subscription("PM1.MFC12.DeviceData")]
  1044. public AITMfcData MFC12Data { get; set; }
  1045. [Subscription("PM1.MFC13.DeviceData")]
  1046. public AITMfcData MFC13Data { get; set; }
  1047. [Subscription("PM1.MFC14.DeviceData")]
  1048. public AITMfcData MFC14Data { get; set; }
  1049. [Subscription("PM1.MFC15.DeviceData")]
  1050. public AITMfcData MFC15Data { get; set; }
  1051. [Subscription("PM1.MFC16.DeviceData")]
  1052. public AITMfcData MFC16Data { get; set; }
  1053. [Subscription("PM1.MFC17.DeviceData")]
  1054. public AITMfcData MFC17Data { get; set; }
  1055. [Subscription("PM1.MFC31.DeviceData")]
  1056. public AITMfcData MFC31Data { get; set; }
  1057. [Subscription("PM1.MFC32.DeviceData")]
  1058. public AITMfcData MFC32Data { get; set; }
  1059. [Subscription("PM1.MFC51.DeviceData")]
  1060. public AITMfcData MFC51Data { get; set; }
  1061. [Subscription("PM1.VG21.DeviceData")]
  1062. public AITWaterFlowMeterData VG21Data { get; set; }
  1063. [Subscription("PM1.VG22.DeviceData")]
  1064. public AITWaterFlowMeterData VG22Data { get; set; }
  1065. public string UnitNX
  1066. {
  1067. get
  1068. {
  1069. return $"({SystemConfigProvider.Instance.GetValueByName("PM1.MFC.MFCNX.FlowUnit")})";
  1070. }
  1071. }
  1072. public string UnitNY
  1073. {
  1074. get
  1075. {
  1076. return $"({SystemConfigProvider.Instance.GetValueByName("PM1.MFC.MFCNY.FlowUnit")})";
  1077. }
  1078. }
  1079. public string UnitNN1
  1080. {
  1081. get
  1082. {
  1083. return $"({SystemConfigProvider.Instance.GetValueByName("PM1.MFC.MFCNN1.FlowUnit")})";
  1084. }
  1085. }
  1086. public string UnitN1
  1087. {
  1088. get
  1089. {
  1090. return $"({SystemConfigProvider.Instance.GetValueByName("PM1.MFC.MFCN1.FlowUnit")})";
  1091. }
  1092. }
  1093. public string UnitNN2
  1094. {
  1095. get
  1096. {
  1097. return $"({SystemConfigProvider.Instance.GetValueByName("PM1.MFC.MFCNN2.FlowUnit")})";
  1098. }
  1099. }
  1100. public string UnitN2
  1101. {
  1102. get
  1103. {
  1104. return $"({SystemConfigProvider.Instance.GetValueByName("PM1.MFC.MFCN2.FlowUnit")})";
  1105. }
  1106. }
  1107. public string UnitM1
  1108. {
  1109. get
  1110. {
  1111. return $"({SystemConfigProvider.Instance.GetValueByName("PM1.MFC.MFCM1.FlowUnit")})";
  1112. }
  1113. }
  1114. public string UnitD1
  1115. {
  1116. get
  1117. {
  1118. return $"({SystemConfigProvider.Instance.GetValueByName("PM1.MFC.MFCD1.FlowUnit")})";
  1119. }
  1120. }
  1121. public string UnitXY1
  1122. {
  1123. get
  1124. {
  1125. return $"({SystemConfigProvider.Instance.GetValueByName("PM1.MFC.MFCXY1.FlowUnit")})";
  1126. }
  1127. }
  1128. public string UnitNXF1
  1129. {
  1130. get
  1131. {
  1132. return $"({SystemConfigProvider.Instance.GetValueByName("PM1.MFC.MFCNXF1.FlowUnit")})";
  1133. }
  1134. }
  1135. public string UnitXF1
  1136. {
  1137. get
  1138. {
  1139. return $"({SystemConfigProvider.Instance.GetValueByName("PM1.MFC.MFCXF1.FlowUnit")})";
  1140. }
  1141. }
  1142. public string UnitNV1
  1143. {
  1144. get
  1145. {
  1146. return $"({SystemConfigProvider.Instance.GetValueByName("PM1.MFC.MFCNV1.FlowUnit")})";
  1147. }
  1148. }
  1149. public string UnitV1
  1150. {
  1151. get
  1152. {
  1153. return $"({SystemConfigProvider.Instance.GetValueByName("PM1.MFC.MFCV1.FlowUnit")})";
  1154. }
  1155. }
  1156. public string UnitMFMD1
  1157. {
  1158. get
  1159. {
  1160. return $"({SystemConfigProvider.Instance.GetValueByName("PM1.MFM.MFMD1.FlowUnit")})";
  1161. }
  1162. }
  1163. #endregion
  1164. [Subscription("CarrierRobot.Status")]
  1165. public string CassetteRobotStatus { get; set; }
  1166. private Visibility _isStocker1Visibility = Visibility.Collapsed;
  1167. public Visibility IsStocker1Visibility
  1168. {
  1169. get { return _isStocker1Visibility; }
  1170. set { _isStocker1Visibility = value; this.NotifyOfPropertyChange(nameof(IsStocker1Visibility)); }
  1171. }
  1172. private Visibility _isStocker2Visibility = Visibility.Collapsed;
  1173. public Visibility IsStocker2Visibility
  1174. {
  1175. get { return _isStocker2Visibility; }
  1176. set { _isStocker2Visibility = value; this.NotifyOfPropertyChange(nameof(IsStocker2Visibility)); }
  1177. }
  1178. private Visibility _isStocker3Visibility = Visibility.Collapsed;
  1179. public Visibility IsStocker3Visibility
  1180. {
  1181. get { return _isStocker3Visibility; }
  1182. set { _isStocker3Visibility = value; this.NotifyOfPropertyChange(nameof(IsStocker3Visibility)); }
  1183. }
  1184. private Visibility _isStocker4Visibility = Visibility.Collapsed;
  1185. public Visibility IsStocker4Visibility
  1186. {
  1187. get { return _isStocker4Visibility; }
  1188. set { _isStocker4Visibility = value; this.NotifyOfPropertyChange(nameof(IsStocker4Visibility)); }
  1189. }
  1190. private Visibility _isStocker5Visibility = Visibility.Collapsed;
  1191. public Visibility IsStocker5Visibility
  1192. {
  1193. get { return _isStocker5Visibility; }
  1194. set { _isStocker5Visibility = value; this.NotifyOfPropertyChange(nameof(_isStocker5Visibility)); }
  1195. }
  1196. private Visibility _isStocker6Visibility = Visibility.Collapsed;
  1197. public Visibility IsStocker6Visibility
  1198. {
  1199. get { return _isStocker6Visibility; }
  1200. set { _isStocker6Visibility = value; this.NotifyOfPropertyChange(nameof(IsStocker6Visibility)); }
  1201. }
  1202. private Visibility _isStocker7Visibility = Visibility.Collapsed;
  1203. public Visibility IsStocker7Visibility
  1204. {
  1205. get { return _isStocker7Visibility; }
  1206. set { _isStocker7Visibility = value; this.NotifyOfPropertyChange(nameof(IsStocker7Visibility)); }
  1207. }
  1208. private Visibility _isStocker8Visibility = Visibility.Collapsed;
  1209. public Visibility IsStocker8Visibility
  1210. {
  1211. get { return _isStocker8Visibility; }
  1212. set { _isStocker8Visibility = value; this.NotifyOfPropertyChange(nameof(IsStocker8Visibility)); }
  1213. }
  1214. private Visibility _isStocker9Visibility = Visibility.Collapsed;
  1215. public Visibility IsStocker9Visibility
  1216. {
  1217. get { return _isStocker9Visibility; }
  1218. set { _isStocker9Visibility = value; this.NotifyOfPropertyChange(nameof(IsStocker9Visibility)); }
  1219. }
  1220. private Visibility _isStocker10Visibility = Visibility.Collapsed;
  1221. public Visibility IsStocker10Visibility
  1222. {
  1223. get { return _isStocker10Visibility; }
  1224. set { _isStocker10Visibility = value; this.NotifyOfPropertyChange(nameof(IsStocker10Visibility)); }
  1225. }
  1226. private Visibility _isStocker11Visibility = Visibility.Collapsed;
  1227. public Visibility IsStocker11Visibility
  1228. {
  1229. get { return _isStocker11Visibility; }
  1230. set { _isStocker11Visibility = value; this.NotifyOfPropertyChange(nameof(IsStocker11Visibility)); }
  1231. }
  1232. private Visibility _isStocker12Visibility = Visibility.Collapsed;
  1233. public Visibility IsStocker12Visibility
  1234. {
  1235. get { return _isStocker12Visibility; }
  1236. set { _isStocker12Visibility = value; this.NotifyOfPropertyChange(nameof(IsStocker12Visibility)); }
  1237. }
  1238. private Visibility _isStocker13Visibility = Visibility.Collapsed;
  1239. public Visibility IsStocker13Visibility
  1240. {
  1241. get { return _isStocker13Visibility; }
  1242. set { _isStocker13Visibility = value; this.NotifyOfPropertyChange(nameof(IsStocker13Visibility)); }
  1243. }
  1244. private Visibility _isStocker14Visibility = Visibility.Collapsed;
  1245. public Visibility IsStocker14Visibility
  1246. {
  1247. get { return _isStocker14Visibility; }
  1248. set { _isStocker14Visibility = value; this.NotifyOfPropertyChange(nameof(IsStocker14Visibility)); }
  1249. }
  1250. private Visibility _isStocker15Visibility = Visibility.Collapsed;
  1251. public Visibility IsStocker15Visibility
  1252. {
  1253. get { return _isStocker15Visibility; }
  1254. set { _isStocker15Visibility = value; this.NotifyOfPropertyChange(nameof(IsStocker15Visibility)); }
  1255. }
  1256. private Visibility _isStocker16Visibility = Visibility.Collapsed;
  1257. public Visibility IsStocker16Visibility
  1258. {
  1259. get { return _isStocker16Visibility; }
  1260. set { _isStocker16Visibility = value; this.NotifyOfPropertyChange(nameof(IsStocker16Visibility)); }
  1261. }
  1262. private Visibility _isStocker17Visibility = Visibility.Collapsed;
  1263. public Visibility IsStocker17Visibility
  1264. {
  1265. get { return _isStocker17Visibility; }
  1266. set { _isStocker17Visibility = value; this.NotifyOfPropertyChange(nameof(IsStocker17Visibility)); }
  1267. }
  1268. private Visibility _isStocker18Visibility = Visibility.Collapsed;
  1269. public Visibility IsStocker18Visibility
  1270. {
  1271. get { return _isStocker18Visibility; }
  1272. set { _isStocker18Visibility = value; this.NotifyOfPropertyChange(nameof(IsStocker18Visibility)); }
  1273. }
  1274. public Visibility IsStockerVisibility { get; set; }
  1275. public Visibility IsLPVisibility { get; set; }
  1276. [Subscription("PM1.APC.DeviceData")]
  1277. public AITAPCData APCData { get; set; }
  1278. [Subscription("PM1.ValveAV75.DeviceData")]
  1279. public AITValveData ValveAV75 { get; set; }
  1280. public int FIMS1WaferCount { get; set; } = 0;
  1281. public int FIMS2WaferCount { get; set; } = 0;
  1282. public int CarrierRobotWaferCount { get; set; } = 0;
  1283. public int WaferRobotWaferCount { get; set; } = 0;
  1284. public int PM1WaferCount { get; set; } = 0;
  1285. public string APCFeedbackView
  1286. {
  1287. get
  1288. {
  1289. if (ValveAV75 != null && ValveAV75.Feedback)
  1290. {
  1291. return APCData.Pressure1Feedback.ToString("F3");
  1292. }
  1293. return APCData.Pressure2Feedback.ToString("F1");
  1294. }
  1295. }
  1296. public Visibility APCPressureView
  1297. {
  1298. get
  1299. {
  1300. if (ValveAV75 != null && ValveAV75.Feedback)
  1301. {
  1302. return Visibility.Visible;
  1303. }
  1304. return Visibility.Collapsed;
  1305. }
  1306. }
  1307. public string WaferRobotAxleStatusPath
  1308. {
  1309. get
  1310. {
  1311. switch (WaferRobotStatus)
  1312. {
  1313. case "Homing":
  1314. case "Init":
  1315. return "/FurnaceUI;component/Resources/Images/Controls3/hg2y.png";
  1316. case "Idle":
  1317. case "InTransfer":
  1318. case "Loading":
  1319. case "Unloading":
  1320. case "Picking":
  1321. case "Placing":
  1322. return "/FurnaceUI;component/Resources/Images/Controls3/hg2g.png";
  1323. case "Error":
  1324. return "/FurnaceUI;component/Resources/Images/Controls3/hg2r.png";
  1325. default:
  1326. break;
  1327. }
  1328. return "/FurnaceUI;component/Resources/Images/Controls3/hg2g.png";
  1329. }
  1330. }
  1331. public string CassetteRobotAxleStatusPath
  1332. {
  1333. get
  1334. {
  1335. switch (CassetteRobotStatus)
  1336. {
  1337. case "Homing":
  1338. case "Init":
  1339. return "/FurnaceUI;component/Resources/Images/Controls3/hg1y.png";
  1340. case "Idle":
  1341. case "InTransfer":
  1342. case "Picking":
  1343. case "Placing":
  1344. return "/FurnaceUI;component/Resources/Images/Controls3/hg1g.png";
  1345. case "Error":
  1346. return "/FurnaceUI;component/Resources/Images/Controls3/hg1r.png";
  1347. default:
  1348. break;
  1349. }
  1350. return "/FurnaceUI;component/Resources/Images/Controls3/hg1g.png";
  1351. }
  1352. }
  1353. public StatusViewModel()
  1354. {
  1355. this.DisplayName = "MainStatusViewModel";
  1356. //ActiveUpdateData = true;
  1357. _stokcers = new List<ModuleName>()
  1358. {
  1359. ModuleName.Stocker1,
  1360. ModuleName.Stocker2,
  1361. ModuleName.Stocker3,
  1362. ModuleName.Stocker4,
  1363. ModuleName.Stocker5,
  1364. ModuleName.Stocker6,
  1365. ModuleName.Stocker7,
  1366. ModuleName.Stocker8,
  1367. ModuleName.Stocker9,
  1368. ModuleName.Stocker10,
  1369. ModuleName.Stocker11,
  1370. ModuleName.Stocker12,
  1371. ModuleName.Stocker13,
  1372. ModuleName.Stocker14,
  1373. ModuleName.Stocker15,
  1374. ModuleName.Stocker16,
  1375. ModuleName.Stocker17,
  1376. ModuleName.Stocker18,
  1377. };
  1378. StockerSlots = new ObservableCollection<string>()
  1379. {
  1380. "",
  1381. "",
  1382. "",
  1383. "",
  1384. "",
  1385. "",
  1386. "",
  1387. "",
  1388. "",
  1389. "",
  1390. "",
  1391. "",
  1392. "",
  1393. "",
  1394. "",
  1395. "",
  1396. "",
  1397. "",
  1398. "",
  1399. "",
  1400. "",
  1401. };
  1402. _stokcerWaferType = Enumerable.Repeat("", 21).ToList();
  1403. _eDUseWarningLimit = (int)QueryDataClient.Instance.Service.GetConfig("PM1.WaferCycleTime.EDCountWarning");
  1404. _eDUseAlarmLimit = (int)QueryDataClient.Instance.Service.GetConfig("PM1.WaferCycleTime.EDCountAlarm");
  1405. _stockerBackground = new List<SolidColorBrush>();
  1406. for (int i = 0; i < 21; i++)
  1407. {
  1408. _stockerBackground.Add(_WhiteFill);
  1409. }
  1410. }
  1411. protected override void OnInitialize()
  1412. {
  1413. base.OnInitialize();
  1414. base.InitFOUP();
  1415. base.InitLL();
  1416. base.InitTM();
  1417. base.InitEFEM();
  1418. base.InitPM();
  1419. base.InitBuffer();
  1420. }
  1421. protected override void OnActivate()
  1422. {
  1423. base.OnActivate();
  1424. DefaultUnit = (string)QueryDataClient.Instance.Service.GetConfig($"PM1.APC.PressureUnit");
  1425. _isCycleMode = (bool)QueryDataClient.Instance.Service.GetConfig("System.IsCycleMode");
  1426. _cassetteSlot = (int)QueryDataClient.Instance.Service.GetConfig("System.CassetteSlotCount");
  1427. for (int i = 0; i < _stokcers.Count; i++)
  1428. {
  1429. _stokcerWaferType[i] = (string)QueryDataClient.Instance.Service.GetConfig($"System.Stocker.{_stokcers[i]}WaferType");
  1430. }
  1431. IsStocker1Visibility = (bool)QueryDataClient.Instance.Service.GetConfig($"System.SetUp.IsStocker1Installed") ? Visibility.Visible : Visibility.Collapsed;
  1432. IsStocker2Visibility = (bool)QueryDataClient.Instance.Service.GetConfig($"System.SetUp.IsStocker2Installed") ? Visibility.Visible : Visibility.Collapsed;
  1433. IsStocker3Visibility = (bool)QueryDataClient.Instance.Service.GetConfig($"System.SetUp.IsStocker3Installed") ? Visibility.Visible : Visibility.Collapsed;
  1434. IsStocker4Visibility = (bool)QueryDataClient.Instance.Service.GetConfig($"System.SetUp.IsStocker4Installed") ? Visibility.Visible : Visibility.Collapsed;
  1435. IsStocker5Visibility = (bool)QueryDataClient.Instance.Service.GetConfig($"System.SetUp.IsStocker5Installed") ? Visibility.Visible : Visibility.Collapsed;
  1436. IsStocker6Visibility = (bool)QueryDataClient.Instance.Service.GetConfig($"System.SetUp.IsStocker6Installed") ? Visibility.Visible : Visibility.Collapsed;
  1437. IsStocker7Visibility = (bool)QueryDataClient.Instance.Service.GetConfig($"System.SetUp.IsStocker7Installed") ? Visibility.Visible : Visibility.Collapsed;
  1438. IsStocker8Visibility = (bool)QueryDataClient.Instance.Service.GetConfig($"System.SetUp.IsStocker8Installed") ? Visibility.Visible : Visibility.Collapsed;
  1439. IsStocker9Visibility = (bool)QueryDataClient.Instance.Service.GetConfig($"System.SetUp.IsStocker9Installed") ? Visibility.Visible : Visibility.Collapsed;
  1440. IsStocker10Visibility = (bool)QueryDataClient.Instance.Service.GetConfig($"System.SetUp.IsStocker10Installed") ? Visibility.Visible : Visibility.Collapsed;
  1441. IsStocker11Visibility = (bool)QueryDataClient.Instance.Service.GetConfig($"System.SetUp.IsStocker11Installed") ? Visibility.Visible : Visibility.Collapsed;
  1442. IsStocker12Visibility = (bool)QueryDataClient.Instance.Service.GetConfig($"System.SetUp.IsStocker12Installed") ? Visibility.Visible : Visibility.Collapsed;
  1443. IsStocker13Visibility = (bool)QueryDataClient.Instance.Service.GetConfig($"System.SetUp.IsStocker13Installed") ? Visibility.Visible : Visibility.Collapsed;
  1444. IsStocker14Visibility = (bool)QueryDataClient.Instance.Service.GetConfig($"System.SetUp.IsStocker14Installed") ? Visibility.Visible : Visibility.Collapsed;
  1445. IsStocker15Visibility = (bool)QueryDataClient.Instance.Service.GetConfig($"System.SetUp.IsStocker15Installed") ? Visibility.Visible : Visibility.Collapsed;
  1446. IsStocker16Visibility = (bool)QueryDataClient.Instance.Service.GetConfig($"System.SetUp.IsStocker16Installed") ? Visibility.Visible : Visibility.Collapsed;
  1447. IsStocker17Visibility = (bool)QueryDataClient.Instance.Service.GetConfig($"System.SetUp.IsStocker17Installed") ? Visibility.Visible : Visibility.Collapsed;
  1448. IsStocker18Visibility = (bool)QueryDataClient.Instance.Service.GetConfig($"System.SetUp.IsStocker18Installed") ? Visibility.Visible : Visibility.Collapsed;
  1449. string toolType = (string)QueryDataClient.Instance.Service.GetConfig("System.SetUp.ToolType");
  1450. IsELKVisibility = toolType.Equals(ConstantsCommon.ELK) ? Visibility.Visible : Visibility.Collapsed;
  1451. IsNTPVisibility = toolType.Equals(ConstantsCommon.NTP) ? Visibility.Visible : Visibility.Collapsed;
  1452. IsSiBCNVisibility = toolType.Equals(ConstantsCommon.SIBCN) ? Visibility.Visible : Visibility.Collapsed;
  1453. }
  1454. protected override void OnViewLoaded(object view)
  1455. {
  1456. base.OnViewLoaded(view);
  1457. StatusView mainStatusView = (StatusView)view;
  1458. //InitMfc(mainStatusView);
  1459. }
  1460. public GridLength MfcNXHeight { get; set; }
  1461. public GridLength MfcNYHeight { get; set; }
  1462. public GridLength MfcNN1Height { get; set; }
  1463. public GridLength MfcN1Height { get; set; }
  1464. public GridLength MfcNN2Height { get; set; }
  1465. public GridLength MfcN2Height { get; set; }
  1466. public GridLength MfcM1Height { get; set; }
  1467. public GridLength MfcD1Height { get; set; }
  1468. public GridLength MfcXY1Height { get; set; }
  1469. public GridLength MfcNXF1Height { get; set; }
  1470. public GridLength MfcXFHeight { get; set; }
  1471. public GridLength MfcNV1Height { get; set; }
  1472. public GridLength MfcV1Height { get; set; }
  1473. public void InitMfc(StatusView view)
  1474. {
  1475. List<AITMfcData> mfcData = new List<AITMfcData>()
  1476. {
  1477. MFC1Data,
  1478. MFC2Data,
  1479. MFC3Data,
  1480. MFC4Data,
  1481. MFC5Data,
  1482. MFC6Data,
  1483. MFC7Data,
  1484. MFC8Data,
  1485. MFC9Data,
  1486. MFC10Data,
  1487. MFC11Data,
  1488. MFC12Data,
  1489. MFC13Data,
  1490. MFC14Data,
  1491. MFC15Data,
  1492. MFC16Data,
  1493. MFC17Data,
  1494. MFC31Data,
  1495. MFC32Data,
  1496. MFC51Data,
  1497. };
  1498. for (int i = 0; i < mfcData.Count; i++)
  1499. {
  1500. var IsMFCInstalled = (bool)QueryDataClient.Instance.Service.GetConfig($"PM1.MFC.{mfcData[i].DeviceName}.IsMFCInstalled");
  1501. switch (mfcData[i].DeviceName)
  1502. {
  1503. case "MFC1":
  1504. MfcNXHeight = IsMFCInstalled ? new GridLength(1, GridUnitType.Star) : new GridLength(0, GridUnitType.Pixel);
  1505. break;
  1506. case "MFC":
  1507. MfcNYHeight = IsMFCInstalled ? new GridLength(1, GridUnitType.Star) : new GridLength(0, GridUnitType.Pixel);
  1508. break;
  1509. case "MfcNN1":
  1510. MfcNN1Height = IsMFCInstalled ? new GridLength(1, GridUnitType.Star) : new GridLength(0, GridUnitType.Pixel);
  1511. break;
  1512. case "MfcN1":
  1513. MfcN1Height = IsMFCInstalled ? new GridLength(1, GridUnitType.Star) : new GridLength(0, GridUnitType.Pixel);
  1514. break;
  1515. case "MfcNN2":
  1516. MfcNN2Height = IsMFCInstalled ? new GridLength(1, GridUnitType.Star) : new GridLength(0, GridUnitType.Pixel);
  1517. break;
  1518. case "MfcN2":
  1519. MfcN2Height = IsMFCInstalled ? new GridLength(1, GridUnitType.Star) : new GridLength(0, GridUnitType.Pixel);
  1520. break;
  1521. case "MfcM1":
  1522. MfcM1Height = IsMFCInstalled ? new GridLength(1, GridUnitType.Star) : new GridLength(0, GridUnitType.Pixel);
  1523. break;
  1524. case "MfcD1":
  1525. MfcD1Height = IsMFCInstalled ? new GridLength(1, GridUnitType.Star) : new GridLength(0, GridUnitType.Pixel);
  1526. break;
  1527. case "MfcXY1":
  1528. MfcXY1Height = IsMFCInstalled ? new GridLength(1, GridUnitType.Star) : new GridLength(0, GridUnitType.Pixel);
  1529. break;
  1530. case "MfcNXF1":
  1531. MfcNXF1Height = IsMFCInstalled ? new GridLength(1, GridUnitType.Star) : new GridLength(0, GridUnitType.Pixel);
  1532. break;
  1533. case "MfcXF1":
  1534. MfcXFHeight = IsMFCInstalled ? new GridLength(1, GridUnitType.Star) : new GridLength(0, GridUnitType.Pixel);
  1535. break;
  1536. case "MfcNV1":
  1537. MfcNV1Height = IsMFCInstalled ? new GridLength(1, GridUnitType.Star) : new GridLength(0, GridUnitType.Pixel);
  1538. break;
  1539. case "MfcV1":
  1540. MfcV1Height = IsMFCInstalled ? new GridLength(1, GridUnitType.Star) : new GridLength(0, GridUnitType.Pixel);
  1541. break;
  1542. default:
  1543. break;
  1544. }
  1545. }
  1546. }
  1547. public void Start()
  1548. {
  1549. InvokeClient.Instance.Service.DoOperation("System.StartAutoRun");
  1550. }
  1551. public void Stop()
  1552. {
  1553. //InvokeClient.Instance.Service.DoOperation("System.StartAutoRun");
  1554. }
  1555. public void SwitchPage(string page)
  1556. {
  1557. var wm = IoC.Get<IWindowManager>();
  1558. switch (page)
  1559. {
  1560. case "Stocker":
  1561. ClientApp.Instance.SwitchPage("status", "stocker", null);
  1562. break;
  1563. case "TransferMain":
  1564. ClientApp.Instance.SwitchPage("status", "TransferMain", null);
  1565. break;
  1566. case "N2Purge":
  1567. ClientApp.Instance.SwitchPage("status", "N2PurgeStatus", null);
  1568. break;
  1569. case "Gas":
  1570. {
  1571. ClientApp.Instance.SwitchPage("status", "Gas", null);
  1572. //CGlobal.BoatWaferEditViewEnable = false;
  1573. ////var wm = IoC.Get<IWindowManager>();
  1574. //GasDetailViewModel gasDetailViewModel = new GasDetailViewModel();
  1575. //(wm as WindowManager)?.ShowDialogWithTitle(gasDetailViewModel, null, "Gas Detail");
  1576. }
  1577. break;
  1578. case "Temp":
  1579. ClientApp.Instance.SwitchPage("status", "temp", null);
  1580. break;
  1581. case "Pressure":
  1582. {
  1583. ClientApp.Instance.SwitchPage("status", "Pressure", null);
  1584. // var wm = IoC.Get<IWindowManager>();
  1585. //var viewPressureDetail = new PressureDetailViewModel();
  1586. //(wm as WindowManager)?.ShowDialogWithTitle(viewPressureDetail, null, "Pressure Detail");
  1587. }
  1588. break;
  1589. case "MainRecipe":
  1590. if (!string.IsNullOrEmpty(PM1MainRecipeName))
  1591. {
  1592. CGlobal.RecipeProcessEditViewEnable = false;
  1593. MECF.Framework.UI.Client.CenterViews.Editors.Recipe.CGlobal.RecipeProcessEditViewEnable = false;
  1594. // var wm = IoC.Get<IWindowManager>();
  1595. var viewProcessRecipeRecipeType = "Process";
  1596. var recipeName = PM1MainRecipeName;
  1597. if (PM1ExecRecipeType.Equals("Sub"))
  1598. {
  1599. recipeName = ProcessSubRecipe;
  1600. }
  1601. else
  1602. {
  1603. recipeName = PM1MainRecipeName;
  1604. }
  1605. if (PM1ExecRecipeType.Equals("Process") || PM1ExecRecipeType.Equals("Abort"))
  1606. {
  1607. viewProcessRecipeRecipeType = PM1ExecRecipeType;
  1608. }
  1609. else
  1610. {
  1611. viewProcessRecipeRecipeType = PM1ExecRecipeType.ToLower();
  1612. }
  1613. var viewProcessRecipe = new RecipeProcessEditViewModel($"Furnace\\{viewProcessRecipeRecipeType}", recipeName);
  1614. viewProcessRecipe.RecipeType = viewProcessRecipeRecipeType;
  1615. viewProcessRecipe.IndexNoDefault = PM1RecipeStepNumber;
  1616. viewProcessRecipe.SelectedStepName = PM1RecipeStepName;
  1617. (wm as WindowManager)?.ShowDialogWithTitle(viewProcessRecipe, null, $"View {viewProcessRecipeRecipeType} Recpie");
  1618. }
  1619. break;
  1620. case "PMCommand":
  1621. //if (!string.IsNullOrEmpty(PM1MainRecipeName))
  1622. //{
  1623. // var wm = IoC.Get<IWindowManager>();
  1624. var viewPMCommand = new PMCommandViewModel();
  1625. (wm as WindowManager)?.ShowDialogWithTitle(viewPMCommand, null, "PM Command");
  1626. //}
  1627. break;
  1628. case "LayoutRecipe":
  1629. {
  1630. CGlobal.BoatWaferEditViewEnable = false;
  1631. // var wm = IoC.Get<IWindowManager>();
  1632. var viewLayoutRecipe = new BoatWaferNoActionViewModel();
  1633. (wm as WindowManager)?.ShowDialogWithTitle(viewLayoutRecipe, null, "View Boat Wafer");
  1634. }
  1635. break;
  1636. case "Boat Elevator":
  1637. {
  1638. BoatElevatorParametersViewModel boatElevatorParametersViewModel = new BoatElevatorParametersViewModel();
  1639. (wm as WindowManager)?.ShowDialogWithTitle(boatElevatorParametersViewModel, null, "Boat Elevator Parameter Settings");
  1640. }
  1641. break;
  1642. case "CJStatus":
  1643. {
  1644. ClientApp.Instance.SwitchPage("status", "job", null);
  1645. //ControlJobStatusViewModel controlJobStatusViewModel = new ControlJobStatusViewModel();
  1646. //(wm as WindowManager)?.ShowDialogWithTitle(controlJobStatusViewModel, null, "CJ Status");
  1647. }
  1648. break;
  1649. case "PJStatus":
  1650. {
  1651. ProcessJobWithDrawingViewModel processJobWithDrawingViewModel = new ProcessJobWithDrawingViewModel();
  1652. (wm as WindowManager)?.ShowDialogWithTitle(processJobWithDrawingViewModel, null, "PJ Status");
  1653. }
  1654. break;
  1655. case "LoadPortState":
  1656. {
  1657. LoadPortStateViewModel loadPortStateViewModel = new LoadPortStateViewModel();
  1658. (wm as WindowManager)?.ShowDialogWithTitle(loadPortStateViewModel, null, "Load Port State");
  1659. }
  1660. break;
  1661. case "CarrierState":
  1662. {
  1663. CarrierStateViewModel carrierStateViewModel = new CarrierStateViewModel();
  1664. (wm as WindowManager)?.ShowDialogWithTitle(carrierStateViewModel, null, "Carrier State");
  1665. }
  1666. break;
  1667. case "Equipment Status":
  1668. {
  1669. EquipmentStatusViewModel equipmentStatusViewModel = new EquipmentStatusViewModel();
  1670. (wm as WindowManager)?.ShowDialogWithTitle(equipmentStatusViewModel, null, "Equipment Operation State");
  1671. }
  1672. break;
  1673. case "Load Unload State":
  1674. {
  1675. LoadUnloadStateViewModel loadUnloadStateViewModel = new LoadUnloadStateViewModel();
  1676. (wm as WindowManager)?.ShowDialogWithTitle(loadUnloadStateViewModel, null, "Load Unload State");
  1677. }
  1678. break;
  1679. case "Boat Detail":
  1680. {
  1681. BoatWaferViewModel boatWaferViewModel = new BoatWaferViewModel();
  1682. (wm as WindowManager)?.ShowDialogWithTitle(boatWaferViewModel, null, "Boat Detail");
  1683. }
  1684. break;
  1685. }
  1686. }
  1687. string[] moduleNames = new string[] { "Stocker1", "Stocker2", "Stocker3", "Stocker4", "Stocker5", "Stocker6", "Stocker7", "Stocker8", "Stocker9",
  1688. "Stocker10","Stocker11","Stocker12","Stocker13","Stocker14","Stocker15","Stocker16","Stocker17","Stocker18",
  1689. "FIMS1","FIMS2","CarrierRobot","WaferRobot","PM1"};
  1690. //string[] moduleNames = new string[] { "Stocker1", "Stocker2", "Stocker3", "Stocker4", "Stocker5", "Stocker6", "Stocker7", "Stocker8", "Stocker9",
  1691. // "Stocker10","Stocker11","Stocker12","Stocker13","Stocker14","Stocker15","Stocker16","Stocker17","Stocker18"};
  1692. protected override void InvokeAfterUpdateProperty(Dictionary<string, object> data)
  1693. {
  1694. UpdateStockerSlots();
  1695. UpdateRecipeProgress();
  1696. var isLoadPortPosition = (string)QueryDataClient.Instance.Service.GetConfig("LoadPort.LoadPortPosition");
  1697. if (isLoadPortPosition == "Upper")
  1698. {
  1699. IsStockerVisibility = Visibility.Hidden;
  1700. IsLPVisibility = Visibility.Visible;
  1701. }
  1702. else
  1703. {
  1704. IsStockerVisibility = Visibility.Visible;
  1705. IsLPVisibility = Visibility.Hidden;
  1706. }
  1707. foreach (var item in moduleNames)
  1708. {
  1709. if (ModuleManager.ModuleInfos.ContainsKey(item))
  1710. {
  1711. this.GetType().GetProperty($"{item}WaferCount").SetValue(this, ModuleManager.ModuleInfos[item].WaferManager.Wafers.Where(x => x.WaferStatus != 0).Count());
  1712. }
  1713. }
  1714. NotifyOfPropertyChange("IsStocker1Visibility");
  1715. }
  1716. private void UpdateStockerSlots()
  1717. {
  1718. for (int i = 0; i < _stokcers.Count; i++)
  1719. {
  1720. bool bHaveAbort = false;
  1721. var wafers = ModuleManager.ModuleInfos[_stokcers[i].ToString()].WaferManager.Wafers;
  1722. int waferNumber = 0;
  1723. string waferType = "";
  1724. SolidColorBrush _tempFill = _SD_ED_M_Fill;
  1725. if (wafers != null)
  1726. {
  1727. foreach (var wafer in wafers)
  1728. {
  1729. if (wafer.WaferStatus != 0)
  1730. {
  1731. waferNumber++;
  1732. waferType = wafer.WaferType.ToString();
  1733. if (wafer.WaferStatus == 5) // EnumWaferProcessStatus.Failed
  1734. bHaveAbort = true;
  1735. if (wafer.UseCount >= _eDUseWarningLimit)
  1736. {
  1737. _tempFill = _waringFill;
  1738. }
  1739. if (wafer.UseCount >= _eDUseAlarmLimit)
  1740. {
  1741. _tempFill = _alarmFill;
  1742. }
  1743. }
  1744. }
  1745. }
  1746. StockerSlots[i] = $"{_stokcerWaferType[i]}-{waferNumber}/{_cassetteSlot}";
  1747. if (_stokcerWaferType[i].Contains("P"))
  1748. {
  1749. if (waferNumber > 0)
  1750. {
  1751. if (bHaveAbort)
  1752. StockerBackground[i] = _redBk;
  1753. else
  1754. StockerBackground[i] = _productionFill;
  1755. }
  1756. else
  1757. {
  1758. StockerBackground[i] = _WhiteFill;
  1759. }
  1760. }
  1761. else
  1762. {
  1763. if (waferNumber > 0)
  1764. {
  1765. if (bHaveAbort)
  1766. StockerBackground[i] = _redBk;
  1767. else
  1768. {
  1769. StockerBackground[i] = _tempFill;
  1770. }
  1771. }
  1772. else
  1773. {
  1774. StockerBackground[i] = _WhiteFill;
  1775. }
  1776. }
  1777. }
  1778. }
  1779. private void UpdateRecipeProgress()
  1780. {
  1781. if (!IsPM1Process && !IsPM1PostProcess)
  1782. {
  1783. RecipeProgress = "";
  1784. RecipeProgressValue = 0;
  1785. return;
  1786. }
  1787. if (PM1RecipeTotalTime == 0)
  1788. {
  1789. RecipeProgress = "";
  1790. RecipeProgressValue = 0;
  1791. }
  1792. else
  1793. {
  1794. double totalTime = PM1RecipeTotalTime;
  1795. double elapseTime = PM1RecipeTotalElapseTime;
  1796. float percentage = (float)(elapseTime / totalTime * 100);
  1797. percentage = percentage > 100 ? 100 : percentage;
  1798. RecipeProgress = $"{percentage.ToString("f1")}%";
  1799. RecipeProgressValue = (int)(elapseTime / totalTime * 100);
  1800. }
  1801. }
  1802. public void CanvasMouseLeftButtonDown(object sender)
  1803. {
  1804. }
  1805. public Dictionary<string, StationPosition> StationPosition
  1806. {
  1807. get
  1808. {
  1809. return new Dictionary<string, StationPosition>()
  1810. {
  1811. { "ArmA.System", new StationPosition() {
  1812. StartPosition = new RobotPosition() { Root = 0, Arm = 180, Hand = 180 }
  1813. ,EndPosition = new RobotPosition() { Root = 0, Arm = 180, Hand = 180 }}}
  1814. ,{ "Robot", new StationPosition() {
  1815. StartPosition = new RobotPosition() { X=0, Root = 0, Arm = 180, Hand = 180 }
  1816. ,EndPosition = new RobotPosition() { Root = 0, Arm = 180, Hand = 180 }}}
  1817. ,{"ArmA.Stocker1", new StationPosition() {
  1818. StartPosition = new RobotPosition() { X=-150, Root = 0, Arm = 180, Hand = 180 }
  1819. ,EndPosition = new RobotPosition() { Root = 0, Arm = 0, Hand = 0 }}}
  1820. ,{ "ArmA.Stocker2", new StationPosition() {
  1821. StartPosition = new RobotPosition() { X=-150, Root = 0, Arm = 180, Hand = 180 }
  1822. ,EndPosition = new RobotPosition() { Root = 0, Arm = -20, Hand = 0 }}}
  1823. ,{ "ArmA.Stocker3", new StationPosition() {
  1824. StartPosition = new RobotPosition() { X=-150, Root = 0, Arm = 180, Hand = 180 }
  1825. ,EndPosition = new RobotPosition() { Root = 0, Arm = -20, Hand = 0 }}}
  1826. ,{ "ArmA.Stocker4", new StationPosition() {
  1827. StartPosition = new RobotPosition() { X=-150, Root = 0, Arm = 180, Hand = 180 }
  1828. ,EndPosition = new RobotPosition() { Root = 0, Arm = -20, Hand = 0 }}}
  1829. ,{"ArmA.Stocker5", new StationPosition(){
  1830. StartPosition = new RobotPosition() { X=-240, Root = 0, Arm = 180, Hand = 180 }
  1831. ,EndPosition = new RobotPosition() { Root = 0, Arm = 0, Hand = 0 }}}
  1832. ,{"ArmA.Stocker6", new StationPosition(){
  1833. StartPosition = new RobotPosition() { X=-240, Root = 0, Arm = 180, Hand = 180 }
  1834. ,EndPosition = new RobotPosition() { Root = 0, Arm = -20, Hand = 0 }}}
  1835. ,{"ArmA.Stocker7", new StationPosition(){
  1836. StartPosition = new RobotPosition() { X=-240, Root = 0, Arm = 180, Hand = 180 }
  1837. ,EndPosition = new RobotPosition() { Root = 0, Arm = -20, Hand = 0 }}}
  1838. ,{"ArmA.Stocker8", new StationPosition(){
  1839. StartPosition = new RobotPosition() { X=-240, Root = 0, Arm = 180, Hand = 180 }
  1840. ,EndPosition = new RobotPosition() { Root = 0, Arm = -20, Hand = 0 }}}
  1841. ,{ "ArmA.Stocker9", new StationPosition() {
  1842. StartPosition = new RobotPosition() { X=-325, Root = 0, Arm = 180, Hand = 180 }
  1843. ,EndPosition = new RobotPosition() { Root = 0, Arm = 0, Hand = 0 }}}
  1844. ,{ "ArmA.Stocker10", new StationPosition() {
  1845. StartPosition = new RobotPosition() { X=-325, Root = 0, Arm = 180, Hand = 180 }
  1846. ,EndPosition = new RobotPosition() { Root = 0, Arm = -20, Hand = 0 }}}
  1847. ,{ "ArmA.Stocker11", new StationPosition() {
  1848. StartPosition = new RobotPosition() { X=-325, Root = 0, Arm = 180, Hand = 180 }
  1849. ,EndPosition = new RobotPosition() { Root = 0, Arm = -20, Hand = 0 }} }
  1850. ,{"ArmA.Stocker12", new StationPosition(){
  1851. StartPosition = new RobotPosition() { X =-325, Root = 0, Arm = 180, Hand = 180 }
  1852. ,EndPosition = new RobotPosition() { Root = 0, Arm = -20, Hand = 0 }}}
  1853. ,{ "ArmA.Stocker13", new StationPosition() {
  1854. StartPosition = new RobotPosition() { X=-415, Root = 0, Arm = 180, Hand = 180 }
  1855. ,EndPosition = new RobotPosition() { Root = 0, Arm = 0, Hand = 0 }}}
  1856. ,{ "ArmA.Stocker14", new StationPosition() {
  1857. StartPosition = new RobotPosition() { X=-415, Root = 0, Arm = 180, Hand = 180 }
  1858. ,EndPosition = new RobotPosition() { Root = 0, Arm = -20, Hand = 0 }}}
  1859. ,{ "ArmA.Stocker15", new StationPosition() {
  1860. StartPosition = new RobotPosition() { X=-415, Root = 0, Arm = 180, Hand = 180 }
  1861. ,EndPosition = new RobotPosition() { Root = 0, Arm = -20, Hand = 0 }}}
  1862. ,{ "ArmA.Stocker16", new StationPosition() {
  1863. StartPosition = new RobotPosition() { X=-415, Root = 0, Arm = 180, Hand = 180 }
  1864. ,EndPosition = new RobotPosition() { Root = 0, Arm = -20, Hand = 0 }}}
  1865. ,{"ArmA.Stocker17", new StationPosition(){
  1866. StartPosition = new RobotPosition() { X = -250, Root = 180, Arm = 180, Hand = 180 }
  1867. ,EndPosition = new RobotPosition() { Root = 180, Arm = -20, Hand = 0 }}}
  1868. ,{"ArmA.Stocker18", new StationPosition(){
  1869. StartPosition = new RobotPosition() { X = -250, Root = 180, Arm = 180, Hand = 180 }
  1870. ,EndPosition = new RobotPosition() { Root = 180, Arm = 23, Hand = 0 }}}
  1871. ,{"ArmA.FIMS1", new StationPosition(){
  1872. StartPosition = new RobotPosition() { X = 35, Root = 0, Arm = 180, Hand = 180 }
  1873. ,EndPosition = new RobotPosition() { Root = 0, Arm = -20, Hand = 0 }}}
  1874. ,{"ArmA.FIMS2", new StationPosition(){
  1875. StartPosition = new RobotPosition() { X = -95, Root = 0, Arm = 180, Hand = 180 }
  1876. ,EndPosition = new RobotPosition() { Root = 0, Arm = -20, Hand = 0 }}}
  1877. ,{"ArmA.LP1", new StationPosition(){
  1878. StartPosition = new RobotPosition() { X = -90, Root = 180, Arm = 180, Hand = 180 }
  1879. ,EndPosition = new RobotPosition() { Root = 180, Arm = -20, Hand = 0 }}}
  1880. ,{"ArmA.LP2", new StationPosition(){
  1881. StartPosition = new RobotPosition() { X = -90, Root = 180, Arm = 180, Hand = 180 }
  1882. ,EndPosition = new RobotPosition() { Root = 180, Arm = 23, Hand = 0 }}}
  1883. ,{"ArmA.LP3", new StationPosition(){
  1884. StartPosition = new RobotPosition() { X = -365, Root = 180, Arm = 180, Hand = 180 }
  1885. ,EndPosition = new RobotPosition() { Root = 180, Arm = -20, Hand = 0 }}}
  1886. ,{"ArmA.LP4", new StationPosition(){
  1887. StartPosition = new RobotPosition() { X = -365, Root = 180, Arm = 180, Hand = 180 }
  1888. ,EndPosition = new RobotPosition() { Root = 180, Arm = 23, Hand = 0 }}}
  1889. };
  1890. }
  1891. }
  1892. public Dictionary<string, StationPosition> StationPosition2
  1893. {
  1894. get
  1895. {
  1896. return new Dictionary<string, StationPosition>()
  1897. {
  1898. { "ArmA.System", new StationPosition() {
  1899. StartPosition = new RobotPosition() { X=0, Root = 0, Arm = 180, Hand = 180 }
  1900. ,EndPosition = new RobotPosition() { Root = 0, Arm = 180, Hand = 180 }}
  1901. }
  1902. ,{ "Robot", new StationPosition() {
  1903. StartPosition = new RobotPosition() { X=0, Root = 0, Arm = 180, Hand = 180 }
  1904. ,EndPosition = new RobotPosition() { Root = 0, Arm = 180, Hand = 180 }}
  1905. }
  1906. ,{ "ArmA.FIMS1", new StationPosition() {
  1907. StartPosition = new RobotPosition() { X=-20, Root = 180, Arm = 180, Hand = 180 }
  1908. ,EndPosition = new RobotPosition() { Root = 180, Arm = 0, Hand = 0 }}
  1909. }
  1910. ,{ "ArmA.FIMS2", new StationPosition() {
  1911. StartPosition = new RobotPosition() { X=-168, Root = 180, Arm = 180, Hand = 180 }
  1912. ,EndPosition = new RobotPosition() { Root = 180, Arm = 0, Hand = 0 }}
  1913. }
  1914. ,{ "ArmA.PM1", new StationPosition() {
  1915. StartPosition = new RobotPosition() { X=-50, Root = 0, Arm = 180, Hand = 180 }
  1916. ,EndPosition = new RobotPosition() { Root = 0, Arm = 0, Hand = 0 }}
  1917. }
  1918. };
  1919. }
  1920. }
  1921. public Dictionary<string, StationPosition> StationPosition3
  1922. {
  1923. get
  1924. {
  1925. return new Dictionary<string, StationPosition>()
  1926. {
  1927. { "HomePosition", new StationPosition() {
  1928. StartPosition = new RobotPosition() { X=0, Root = 0, Arm = 0, Hand = 0 }
  1929. ,EndPosition = new RobotPosition() { Root = 0, Arm = 0, Hand = 0 }}
  1930. },
  1931. { "Position1", new StationPosition() {
  1932. StartPosition = new RobotPosition() { X=-50, Root = 0, Arm = 0, Hand = 0 }
  1933. ,EndPosition = new RobotPosition() { Root = 0, Arm = 0, Hand = 0 }}
  1934. },
  1935. { "Position2", new StationPosition() {
  1936. StartPosition = new RobotPosition() { X=-100, Root = 0, Arm = 0, Hand = 0 }
  1937. ,EndPosition = new RobotPosition() { Root = 0, Arm = 0, Hand = 0 }}
  1938. },
  1939. { "ProcessPosition", new StationPosition() {
  1940. StartPosition = new RobotPosition() { X=-280, Root = 0, Arm = 0, Hand = 0 }
  1941. ,EndPosition = new RobotPosition() { Root = 0, Arm = 0, Hand = 0 }}
  1942. }
  1943. };
  1944. }
  1945. }
  1946. public void PopupPage(string page)
  1947. {
  1948. //var windowManager = IoC.Get<IWindowManager>();
  1949. var windowManager = new WindowManager();
  1950. switch (page)
  1951. {
  1952. case "PortStatus":
  1953. //LoadIOPortViewModel portStatusViewModel = new LoadIOPortViewModel();
  1954. //(windowManager as WindowManager)?.ShowDialogWithTitle(portStatusViewModel, null, "Port Status");
  1955. break;
  1956. case "JobStatus":
  1957. JOBStatusViewModel vm = new JOBStatusViewModel();
  1958. //bool? ret = windowManager.ShowDialog(vm);
  1959. (windowManager as WindowManager)?.ShowDialogWithTitle(vm, null, "Job Status View");
  1960. break;
  1961. default:
  1962. break;
  1963. }
  1964. }
  1965. public void StandbyFactor()
  1966. {
  1967. //if (!string.IsNullOrEmpty(PM1MainRecipeName))
  1968. {
  1969. var windowManager = IoC.Get<IWindowManager>();
  1970. StandbyFactorViewModel standbyFactorViewModel = new StandbyFactorViewModel();
  1971. standbyFactorViewModel.MainRecipeName = PM1MainRecipeName;
  1972. (windowManager as WindowManager)?.ShowDialogWithTitle(standbyFactorViewModel, null, "Standby Factor View");
  1973. }
  1974. }
  1975. public void Skip()
  1976. {
  1977. if (!DialogBox.Confirm("Ara you sure to skip current step?"))
  1978. return;
  1979. InvokeClient.Instance.Service.DoOperation($"PM1.RecipeSkipStep", "");
  1980. }
  1981. public void Jump()
  1982. {
  1983. //if (!DialogBox.Confirm("Ara you sure to jump current step?"))
  1984. // return;
  1985. //var recipes = new RecipeDataBase();
  1986. //recipes.PrefixPath = "Furnace\\Process";
  1987. //recipes.Name = PM1MainRecipeName;
  1988. //RecipeProvider _recipeProvider = new RecipeProvider();
  1989. //recipes.Clear();
  1990. //var recipeContent = _recipeProvider.LoadRecipe(recipes.PrefixPath, recipes.Name);
  1991. //if (string.IsNullOrEmpty(recipeContent))
  1992. //{
  1993. // MessageBox.Show($"{recipes.PrefixPath}\\{recipes.Name} is empty, please confirm the file is valid.");
  1994. // return;
  1995. //}
  1996. //recipes.RecipeChamberType = "OriginChamber";
  1997. //recipes.InitData(recipes.PrefixPath, recipes.Name, recipeContent, "PM1");
  1998. //var windowManager = IoC.Get<IWindowManager>();
  1999. //RecipeLoopSetViewModel recipeLoopSetViewModel = new RecipeLoopSetViewModel();
  2000. //recipeLoopSetViewModel.StepNames = new ObservableCollection<string>(recipes.Steps.OrderBy(x => x.StepNo).Where(x => x.StepNo != PM1RecipeStepNumber).Select(x => x.Name).ToList());
  2001. //if ((bool)(windowManager as WindowManager)?.ShowDialogWithTitle(recipeLoopSetViewModel, null, "Jump"))
  2002. //{
  2003. // InvokeClient.Instance.Service.DoOperation($"PM1.RecipeJumpStep", recipeLoopSetViewModel.SelectedIndex);
  2004. //}
  2005. }
  2006. public void Hold()
  2007. {
  2008. if (HoldName == "Hold")
  2009. {
  2010. if (!DialogBox.Confirm("Ara you sure to hold current recipe?"))
  2011. return;
  2012. InvokeClient.Instance.Service.DoOperation($"PM1.RecipePause", "");
  2013. }
  2014. else
  2015. {
  2016. InvokeClient.Instance.Service.DoOperation($"PM1.RecipeContinue", "");
  2017. }
  2018. }
  2019. public void EmergencyAbort()
  2020. {
  2021. if (!DialogBox.Confirm("Ara you sure to execute EmergencyAbort?"))
  2022. return;
  2023. InvokeClient.Instance.Service.DoOperation("PM1.Abort");
  2024. }
  2025. private string CalEndTime(DateTime beginTime, double totalTime, double totalElapseTime)
  2026. {
  2027. TimeSpan secondSpan = DateTime.Now - beginTime;
  2028. return beginTime.AddSeconds(secondSpan.TotalSeconds + totalTime - totalElapseTime).ToString("yyyy-MM-dd HH:mm:ss");
  2029. }
  2030. }
  2031. }