StatusViewModel.cs 89 KB

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