StatusViewModel.cs 89 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284
  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 _IsNTP02Visibility;
  536. public Visibility IsNTP02Visibility
  537. {
  538. get => _IsNTP02Visibility;
  539. set
  540. {
  541. _IsNTP02Visibility = value;
  542. NotifyOfPropertyChange(nameof(IsNTP02Visibility));
  543. }
  544. }
  545. private Visibility _isSiBCNVisibility;
  546. public Visibility IsSiBCNVisibility
  547. {
  548. get => _isSiBCNVisibility;
  549. set
  550. {
  551. _isSiBCNVisibility = value;
  552. NotifyOfPropertyChange(nameof(IsSiBCNVisibility));
  553. }
  554. }
  555. private Visibility _isELKVisibility;
  556. public Visibility IsELKVisibility
  557. {
  558. get => _isELKVisibility;
  559. set
  560. {
  561. _isELKVisibility = value;
  562. NotifyOfPropertyChange(nameof(IsELKVisibility));
  563. }
  564. }
  565. [Subscription("PM1.SubRecipeCurrentLoopCount")]
  566. public int PM1SubRecipeCurrentLoopCount { get; set; }
  567. [Subscription("PM1.ProcessSubRecipe")]
  568. public string ProcessSubRecipe { get; set; }
  569. [Subscription("PM1.ProcessAbortRecipe")]
  570. public string ProcessAbortRecipe { get; set; }
  571. [Subscription("PM1.SubRecipeLoopCount")]
  572. public int PM1SubRecipeLoopCount { get; set; }
  573. [Subscription("PM1.IsExecuteSubRecipe")]
  574. public bool PM1IsExecuteSubRecipe { get; set; }
  575. public string SubInfo
  576. {
  577. get
  578. {
  579. if (!IsPM1Process || !PM1IsExecuteSubRecipe)
  580. return "--";
  581. return $"{PM1ExecRecipeType} : {PM1SubRecipeCurrentLoopCount} / {PM1SubRecipeLoopCount}";
  582. }
  583. }
  584. public bool IsPM1Idle
  585. {
  586. get { return PM1Status == "Idle"; }
  587. }
  588. public bool IsPM1Process
  589. {
  590. get { return PM1Status == "Process"; }
  591. }
  592. public bool IsPM1PostProcess
  593. {
  594. get { return PM1Status == "PostProcess"; }
  595. }
  596. public bool IsPM1PreProcess
  597. {
  598. get { return PM1Status == "PreProcess"; }
  599. }
  600. public string PM1StepNumber
  601. {
  602. get
  603. {
  604. if (!IsPM1Process && !IsPM1PostProcess)
  605. return "--";
  606. return $"{PM1RecipeStepNumber}";
  607. }
  608. }
  609. public string PM1StepName
  610. {
  611. get
  612. {
  613. if (!IsPM1Process && !IsPM1PostProcess)
  614. return "--";
  615. return $"{PM1RecipeStepName}";
  616. }
  617. }
  618. public string PM1NextStepName
  619. {
  620. get
  621. {
  622. if (!IsPM1Process && !IsPM1PostProcess)
  623. return "--";
  624. return $"{PM1RecipeNextStepName}";
  625. }
  626. }
  627. public string PM1BeginTime
  628. {
  629. get
  630. {
  631. if (!IsPM1Process && !IsPM1PostProcess)
  632. return "--";
  633. return $"{PM1RecipeBeginTime.ToString("yyyy-MM-dd HH:mm:ss")}";
  634. }
  635. }
  636. private bool isCoolingFrist = false;
  637. private DateTime firstCoolingTime = DateTime.MinValue;
  638. public string PM1EndTime
  639. {
  640. get
  641. {
  642. if (LocalProcessJobs!=null && LocalProcessJobs.Where(x=>x.ProcessingState== EnumProcessingState.CoolingBeforeDischarge)!=null)
  643. {
  644. if (!isCoolingFrist)
  645. {
  646. TimeSpan secondSpan = DateTime.Now - PM1RecipeBeginTime;
  647. firstCoolingTime = PM1RecipeBeginTime.AddSeconds(secondSpan.TotalSeconds + PM1RecipeTotalTime - PM1RecipeTotalElapseTime);
  648. isCoolingFrist = true;
  649. }
  650. }
  651. if (!IsPM1Process && !IsPM1PostProcess)
  652. return "--";
  653. if (isCoolingFrist)
  654. {
  655. isCoolingFrist = false;
  656. firstCoolingTime = DateTime.MinValue;
  657. }
  658. return $"{CalEndTime(PM1RecipeBeginTime, PM1RecipeTotalTime, PM1RecipeTotalElapseTime)}";
  659. }
  660. }
  661. public string PM1StepTime
  662. {
  663. get
  664. {
  665. if (!IsPM1Process && !IsPM1PostProcess)
  666. return "--";
  667. if (PM1RecipeHolded && PM1RecipeHoldTime > 0)
  668. return "--";
  669. return CalStepTime(PM1RecipeStepElapseTime, PM1RecipeStepTime);
  670. }
  671. }
  672. public string PM1RecipeTime
  673. {
  674. get
  675. {
  676. if (!IsPM1Process && !IsPM1PostProcess)
  677. return "--";
  678. return CalRecipeTime(PM1RecipeTotalElapseTime, PM1RecipeTotalTime);
  679. }
  680. }
  681. public string PM1HoldTime
  682. {
  683. get
  684. {
  685. if (!IsPM1Process && !IsPM1PostProcess)
  686. return "--";
  687. return CalHoldTime(PM1NewShowTime);
  688. }
  689. }
  690. public string PM1HoldName
  691. {
  692. get
  693. {
  694. return "Hold Time";
  695. }
  696. }
  697. public string HoldName
  698. {
  699. get
  700. {
  701. if (PM1RecipeHold)
  702. return "Continue";
  703. return "Hold";
  704. }
  705. }
  706. public string HoldWaitDisplay
  707. {
  708. get
  709. {
  710. if (PM1Status == "Idle")
  711. {
  712. return "";
  713. }
  714. else
  715. {
  716. if (PM1RecipeWait)
  717. return "W";
  718. if (PM1RecipeHolded)
  719. return "H";
  720. return "";
  721. }
  722. }
  723. }
  724. public SolidColorBrush HoldForeground
  725. {
  726. get
  727. {
  728. if (PM1RecipeHold)
  729. return _blackBk;
  730. return _redBk;
  731. }
  732. }
  733. [Subscription("PM1.SelectedRecipeName")]
  734. public string PM1SelectedRecipeName
  735. {
  736. get;
  737. set;
  738. }
  739. [Subscription("PM1.MainRecipeName")]
  740. public string PM1MainRecipeName
  741. {
  742. get;
  743. set;
  744. }
  745. public string PM1SelectedRecipeNameDisplay
  746. {
  747. get
  748. {
  749. if (string.IsNullOrEmpty(PM1SelectedRecipeName))
  750. return string.Empty;
  751. if (!IsPM1Process && !IsPM1PostProcess)
  752. return string.Empty;
  753. //return PM1SelectedRecipeName.Substring("Furnace\\Process\\".Length);
  754. return PM1SelectedRecipeName;
  755. }
  756. }
  757. [Subscription("PM1.IsOnline")]
  758. public bool PM1IsOnline { get; set; }
  759. public bool PM1IsOffline
  760. {
  761. get { return !PM1IsOnline; }
  762. }
  763. public bool IsEnableEmergencyAbort
  764. {
  765. get
  766. {
  767. return PM1Status != "Init" && PM1Status != "Idle";
  768. }
  769. }
  770. private string CalStepTime(double elapseTime, double totalTime)
  771. {
  772. string stepTime = string.Empty;
  773. double remainingTime = totalTime - elapseTime;
  774. if (remainingTime < 0)
  775. remainingTime = 0;
  776. string strElapseTimeH = $"{(elapseTime / 3600).ToString().PadLeft(2, '0')}";
  777. string strElapseTimeM = $"{(elapseTime % 3600 / 60).ToString().PadLeft(2, '0')}";
  778. string strElapseTimeS = $"{(elapseTime % 60).ToString().PadLeft(2, '0')}";
  779. string strRemainingTimeH = $"{((int)(remainingTime / 3600)).ToString("f0").PadLeft(2, '0')}";
  780. string strRemainingTimeM = $"{((int)(remainingTime % 3600 / 60)).ToString("f0").PadLeft(2, '0')}";
  781. string strRemainingTimeS = $"{(remainingTime % 60).ToString("f1").PadLeft(2, '0')}";
  782. stepTime = $"{strRemainingTimeH}:{strRemainingTimeM}:{strRemainingTimeS}";
  783. return stepTime;
  784. }
  785. private string CalRecipeTime(double elapseTime, double totalTime)
  786. {
  787. string recipeTime = string.Empty;
  788. double remainingTime = totalTime - elapseTime;
  789. if (remainingTime < 0)
  790. remainingTime = 0;
  791. string strElapseTimeH = $"{(elapseTime / 3600).ToString("f0").PadLeft(2, '0')}";
  792. string strElapseTimeM = $"{(elapseTime % 3600 / 60).ToString("f0").PadLeft(2, '0')}";
  793. string strElapseTimeS = $"{(elapseTime % 60).ToString("f0").PadLeft(2, '0')}";
  794. string strRemainingTimeH = $"{((int)(remainingTime / 3600)).ToString("f0").PadLeft(2, '0')}";
  795. string strRemainingTimeM = $"{((int)(remainingTime % 3600 / 60)).ToString("f0").PadLeft(2, '0')}";
  796. string strRemainingTimeS = $"{(remainingTime % 60).ToString("f1").PadLeft(2, '0')}";
  797. recipeTime = $"{strRemainingTimeH}:{strRemainingTimeM}:{strRemainingTimeS}";
  798. return recipeTime;
  799. }
  800. private string CalHoldTime(double totalTime)
  801. {
  802. string holdTime = string.Empty;
  803. string strHoldTimeH = $"{((int)(totalTime / 3600)).ToString("f0").PadLeft(2, '0')}";
  804. string strHoldTimeM = $"{((int)(totalTime % 3600 / 60)).ToString("f0").PadLeft(2, '0')}";
  805. string strHoldTimeS = $"{(totalTime % 60).ToString("f1").PadLeft(2, '0')}";
  806. holdTime = $"{strHoldTimeH}:{strHoldTimeM}:{strHoldTimeS}";
  807. return holdTime;
  808. }
  809. private string _recipeProgress;
  810. public string RecipeProgress
  811. {
  812. get => _recipeProgress;
  813. set
  814. {
  815. _recipeProgress = value;
  816. NotifyOfPropertyChange(nameof(RecipeProgress));
  817. }
  818. }
  819. private int _recipeProgressValue;
  820. public int RecipeProgressValue
  821. {
  822. get => _recipeProgressValue;
  823. set
  824. {
  825. _recipeProgressValue = value;
  826. NotifyOfPropertyChange(nameof(RecipeProgressValue));
  827. }
  828. }
  829. #endregion
  830. #region Scheduler
  831. public bool IsRtInitialized
  832. {
  833. get
  834. {
  835. return RtStatus != "Init" && RtStatus != "Initializing";
  836. }
  837. }
  838. public bool IsRtRunning
  839. {
  840. get
  841. {
  842. return RtStatus != "Init" && RtStatus != "Idle" && RtStatus != "AutoIdle";
  843. }
  844. }
  845. public bool IsRtError
  846. {
  847. get
  848. {
  849. return RtStatus == "Error";
  850. }
  851. }
  852. public bool IsAuto
  853. {
  854. get { return RtStatus == "Auto_Running" || RtStatus == "Auto_Idle"; }
  855. }
  856. [Subscription("Rt.Status")]
  857. public string RtStatus { get; set; }
  858. public bool _isCycleMode;
  859. public Visibility IsCycleInfoVisibility
  860. {
  861. get { return _isCycleMode ? Visibility.Visible : Visibility.Collapsed; }
  862. }
  863. [Subscription("Scheduler.CycledCount")]
  864. public int CycledCount { get; set; }
  865. [Subscription("Scheduler.CycledWafer")]
  866. public int CycledWafer { get; set; }
  867. [Subscription("Scheduler.CycledTotalWafer")]
  868. public int TotalCycledWafer { get; set; }
  869. [Subscription("Scheduler.CycleSetPoint")]
  870. public int CycleSetPoint { get; set; }
  871. public string CycleCountDisplay
  872. {
  873. get { return (CycleSetPoint > 0 && (CycledCount > CycleSetPoint)) ? $"{CycledCount + 1}/{CycleSetPoint}" : $"{CycledCount}/{CycleSetPoint}"; }
  874. }
  875. [Subscription("Scheduler.ControlJobList")]
  876. public List<ControlJobInfo> LocalControlJobs
  877. {
  878. get;
  879. set;
  880. }
  881. [Subscription("Scheduler.ProcessJobList")]
  882. public List<ProcessJobInfo> LocalProcessJobs
  883. {
  884. get;
  885. set;
  886. }
  887. public string ControlJobStatus
  888. {
  889. get
  890. {
  891. if (LocalControlJobs == null || LocalControlJobs.Count == 0)
  892. return "";
  893. foreach (var cj in LocalControlJobs)
  894. {
  895. if (cj == null)
  896. continue;
  897. return cj.State.ToString();
  898. }
  899. return "";
  900. }
  901. }
  902. public string ProcessJob1ID
  903. {
  904. get
  905. {
  906. if (LocalProcessJobs == null || LocalProcessJobs.Count == 0)
  907. return "";
  908. var pj = LocalProcessJobs[0];
  909. return pj.Name;
  910. }
  911. }
  912. public string ProcessJob1StartTime
  913. {
  914. get
  915. {
  916. if (LocalProcessJobs == null || LocalProcessJobs.Count == 0)
  917. return "";
  918. var pj = LocalProcessJobs[0];
  919. return pj.BeginTime.ToString("yyyy-MM-dd HH:mm:ss");
  920. }
  921. }
  922. public string TotolProcessJob1EndTime
  923. {
  924. get
  925. {
  926. if (LocalProcessJobs == null || LocalProcessJobs.Count == 0)
  927. return "";
  928. var pj = LocalProcessJobs[0];
  929. var beginTime = pj.BeginTime;
  930. if (pj.BeginTime.Equals(DateTime.MinValue))
  931. {
  932. return "";
  933. }
  934. if (pj.ProcessingState== EnumProcessingState.CoolingBeforeDischarge && !firstCoolingTime.Equals(DateTime.MinValue))
  935. {
  936. return firstCoolingTime.AddSeconds(CoolingTime).ToString("yyyy-MM-dd HH:mm:ss");
  937. }
  938. else
  939. {
  940. if (!IsPM1Process && !IsPM1PostProcess)
  941. return "--";
  942. TimeSpan secondSpan = DateTime.Now - beginTime;
  943. var retime = beginTime.AddSeconds(CoolingTime + secondSpan.TotalSeconds + PM1RecipeTotalTime - PM1RecipeTotalElapseTime);
  944. return retime.ToString("yyyy-MM-dd HH:mm:ss");
  945. }
  946. }
  947. }
  948. public string ProcessJob1Status
  949. {
  950. get
  951. {
  952. if (LocalProcessJobs == null || LocalProcessJobs.Count == 0)
  953. return "";
  954. var pj = LocalProcessJobs[0];
  955. return pj.ProcessingState.ToString();
  956. }
  957. }
  958. public string TotolProcessJob2EndTime
  959. {
  960. get
  961. {
  962. if (LocalProcessJobs == null || LocalProcessJobs.Count <= 1)
  963. return "";
  964. var pj = LocalProcessJobs[1];
  965. var beginTime = pj.BeginTime;
  966. if (pj.BeginTime.Equals(DateTime.MinValue))
  967. {
  968. return "";
  969. }
  970. if (pj.ProcessingState == EnumProcessingState.CoolingBeforeDischarge && !firstCoolingTime.Equals(DateTime.MinValue))
  971. {
  972. return firstCoolingTime.AddSeconds(CoolingTime).ToString("yyyy-MM-dd HH:mm:ss");
  973. }
  974. else
  975. {
  976. if (!IsPM1Process && !IsPM1PostProcess)
  977. return "--";
  978. TimeSpan secondSpan = DateTime.Now - beginTime;
  979. var retime = beginTime.AddSeconds(CoolingTime + secondSpan.TotalSeconds + PM1RecipeTotalTime - PM1RecipeTotalElapseTime);
  980. return retime.ToString("yyyy-MM-dd HH:mm:ss");
  981. }
  982. }
  983. }
  984. public string ProcessJob2ID
  985. {
  986. get
  987. {
  988. if (LocalProcessJobs == null || LocalProcessJobs.Count <= 1)
  989. return "";
  990. var pj = LocalProcessJobs[1];
  991. return pj.Name;
  992. }
  993. }
  994. public string ProcessJob2StartTime
  995. {
  996. get
  997. {
  998. if (LocalProcessJobs == null || LocalProcessJobs.Count <= 1)
  999. return "";
  1000. var pj = LocalProcessJobs[1];
  1001. if (pj.BeginTime.Equals(DateTime.MinValue))
  1002. {
  1003. return "------";
  1004. }
  1005. return pj.BeginTime.ToString("yyyy-MM-dd HH:mm:ss");
  1006. }
  1007. }
  1008. public string ProcessJob2Status
  1009. {
  1010. get
  1011. {
  1012. if (LocalProcessJobs == null || LocalProcessJobs.Count <= 1)
  1013. return "";
  1014. var pj = LocalProcessJobs[1];
  1015. return pj.ProcessingState.ToString();
  1016. }
  1017. }
  1018. #endregion
  1019. #region Button Logic
  1020. #endregion
  1021. #region shutter
  1022. [Subscription("AutoShutter.OpenCloseStatus")]
  1023. public string AutoShutterOpenCloseStatus { get; set; }
  1024. [Subscription("AutoShutter.UpDownStatus")]
  1025. public string AutoShutterUpDownStatus { get; set; }
  1026. public string AutoShutterStatus => $"{AutoShutterOpenCloseStatus}/{AutoShutterUpDownStatus}";
  1027. #endregion
  1028. #endregion
  1029. public string DefaultUnit { get; set; }
  1030. #region Gas
  1031. [Subscription("PM1.MFC1.DeviceData")]
  1032. public AITMfcData MFC1Data { get; set; }
  1033. [Subscription("PM1.MFC2.DeviceData")]
  1034. public AITMfcData MFC2Data { get; set; }
  1035. [Subscription("PM1.MFC3.DeviceData")]
  1036. public AITMfcData MFC3Data { get; set; }
  1037. [Subscription("PM1.MFC4.DeviceData")]
  1038. public AITMfcData MFC4Data { get; set; }
  1039. [Subscription("PM1.MFC5.DeviceData")]
  1040. public AITMfcData MFC5Data { get; set; }
  1041. [Subscription("PM1.MFC6.DeviceData")]
  1042. public AITMfcData MFC6Data { get; set; }
  1043. [Subscription("PM1.MFC7.DeviceData")]
  1044. public AITMfcData MFC7Data { get; set; }
  1045. [Subscription("PM1.MFC8.DeviceData")]
  1046. public AITMfcData MFC8Data { get; set; }
  1047. [Subscription("PM1.MFC9.DeviceData")]
  1048. public AITMfcData MFC9Data { get; set; }
  1049. [Subscription("PM1.MFC10.DeviceData")]
  1050. public AITMfcData MFC10Data { get; set; }
  1051. [Subscription("PM1.MFC11.DeviceData")]
  1052. public AITMfcData MFC11Data { get; set; }
  1053. [Subscription("PM1.MFC12.DeviceData")]
  1054. public AITMfcData MFC12Data { get; set; }
  1055. [Subscription("PM1.MFC13.DeviceData")]
  1056. public AITMfcData MFC13Data { get; set; }
  1057. [Subscription("PM1.MFC14.DeviceData")]
  1058. public AITMfcData MFC14Data { get; set; }
  1059. [Subscription("PM1.MFC15.DeviceData")]
  1060. public AITMfcData MFC15Data { get; set; }
  1061. [Subscription("PM1.MFC16.DeviceData")]
  1062. public AITMfcData MFC16Data { get; set; }
  1063. [Subscription("PM1.MFC17.DeviceData")]
  1064. public AITMfcData MFC17Data { get; set; }
  1065. [Subscription("PM1.MFC31.DeviceData")]
  1066. public AITMfcData MFC31Data { get; set; }
  1067. [Subscription("PM1.MFC32.DeviceData")]
  1068. public AITMfcData MFC32Data { get; set; }
  1069. [Subscription("PM1.MFC51.DeviceData")]
  1070. public AITMfcData MFC51Data { get; set; }
  1071. [Subscription("PM1.VG21.DeviceData")]
  1072. public AITWaterFlowMeterData VG21Data { get; set; }
  1073. [Subscription("PM1.VG22.DeviceData")]
  1074. public AITWaterFlowMeterData VG22Data { get; set; }
  1075. public string UnitNX
  1076. {
  1077. get
  1078. {
  1079. return $"({SystemConfigProvider.Instance.GetValueByName("PM1.MFC.MFCNX.FlowUnit")})";
  1080. }
  1081. }
  1082. public string UnitNY
  1083. {
  1084. get
  1085. {
  1086. return $"({SystemConfigProvider.Instance.GetValueByName("PM1.MFC.MFCNY.FlowUnit")})";
  1087. }
  1088. }
  1089. public string UnitNN1
  1090. {
  1091. get
  1092. {
  1093. return $"({SystemConfigProvider.Instance.GetValueByName("PM1.MFC.MFCNN1.FlowUnit")})";
  1094. }
  1095. }
  1096. public string UnitN1
  1097. {
  1098. get
  1099. {
  1100. return $"({SystemConfigProvider.Instance.GetValueByName("PM1.MFC.MFCN1.FlowUnit")})";
  1101. }
  1102. }
  1103. public string UnitNN2
  1104. {
  1105. get
  1106. {
  1107. return $"({SystemConfigProvider.Instance.GetValueByName("PM1.MFC.MFCNN2.FlowUnit")})";
  1108. }
  1109. }
  1110. public string UnitN2
  1111. {
  1112. get
  1113. {
  1114. return $"({SystemConfigProvider.Instance.GetValueByName("PM1.MFC.MFCN2.FlowUnit")})";
  1115. }
  1116. }
  1117. public string UnitM1
  1118. {
  1119. get
  1120. {
  1121. return $"({SystemConfigProvider.Instance.GetValueByName("PM1.MFC.MFCM1.FlowUnit")})";
  1122. }
  1123. }
  1124. public string UnitD1
  1125. {
  1126. get
  1127. {
  1128. return $"({SystemConfigProvider.Instance.GetValueByName("PM1.MFC.MFCD1.FlowUnit")})";
  1129. }
  1130. }
  1131. public string UnitXY1
  1132. {
  1133. get
  1134. {
  1135. return $"({SystemConfigProvider.Instance.GetValueByName("PM1.MFC.MFCXY1.FlowUnit")})";
  1136. }
  1137. }
  1138. public string UnitNXF1
  1139. {
  1140. get
  1141. {
  1142. return $"({SystemConfigProvider.Instance.GetValueByName("PM1.MFC.MFCNXF1.FlowUnit")})";
  1143. }
  1144. }
  1145. public string UnitXF1
  1146. {
  1147. get
  1148. {
  1149. return $"({SystemConfigProvider.Instance.GetValueByName("PM1.MFC.MFCXF1.FlowUnit")})";
  1150. }
  1151. }
  1152. public string UnitNV1
  1153. {
  1154. get
  1155. {
  1156. return $"({SystemConfigProvider.Instance.GetValueByName("PM1.MFC.MFCNV1.FlowUnit")})";
  1157. }
  1158. }
  1159. public string UnitV1
  1160. {
  1161. get
  1162. {
  1163. return $"({SystemConfigProvider.Instance.GetValueByName("PM1.MFC.MFCV1.FlowUnit")})";
  1164. }
  1165. }
  1166. public string UnitMFMD1
  1167. {
  1168. get
  1169. {
  1170. return $"({SystemConfigProvider.Instance.GetValueByName("PM1.MFM.MFMD1.FlowUnit")})";
  1171. }
  1172. }
  1173. #endregion
  1174. [Subscription("CarrierRobot.Status")]
  1175. public string CassetteRobotStatus { get; set; }
  1176. private Visibility _isStocker1Visibility = Visibility.Collapsed;
  1177. public Visibility IsStocker1Visibility
  1178. {
  1179. get { return _isStocker1Visibility; }
  1180. set { _isStocker1Visibility = value; this.NotifyOfPropertyChange(nameof(IsStocker1Visibility)); }
  1181. }
  1182. private Visibility _isStocker2Visibility = Visibility.Collapsed;
  1183. public Visibility IsStocker2Visibility
  1184. {
  1185. get { return _isStocker2Visibility; }
  1186. set { _isStocker2Visibility = value; this.NotifyOfPropertyChange(nameof(IsStocker2Visibility)); }
  1187. }
  1188. private Visibility _isStocker3Visibility = Visibility.Collapsed;
  1189. public Visibility IsStocker3Visibility
  1190. {
  1191. get { return _isStocker3Visibility; }
  1192. set { _isStocker3Visibility = value; this.NotifyOfPropertyChange(nameof(IsStocker3Visibility)); }
  1193. }
  1194. private Visibility _isStocker4Visibility = Visibility.Collapsed;
  1195. public Visibility IsStocker4Visibility
  1196. {
  1197. get { return _isStocker4Visibility; }
  1198. set { _isStocker4Visibility = value; this.NotifyOfPropertyChange(nameof(IsStocker4Visibility)); }
  1199. }
  1200. private Visibility _isStocker5Visibility = Visibility.Collapsed;
  1201. public Visibility IsStocker5Visibility
  1202. {
  1203. get { return _isStocker5Visibility; }
  1204. set { _isStocker5Visibility = value; this.NotifyOfPropertyChange(nameof(_isStocker5Visibility)); }
  1205. }
  1206. private Visibility _isStocker6Visibility = Visibility.Collapsed;
  1207. public Visibility IsStocker6Visibility
  1208. {
  1209. get { return _isStocker6Visibility; }
  1210. set { _isStocker6Visibility = value; this.NotifyOfPropertyChange(nameof(IsStocker6Visibility)); }
  1211. }
  1212. private Visibility _isStocker7Visibility = Visibility.Collapsed;
  1213. public Visibility IsStocker7Visibility
  1214. {
  1215. get { return _isStocker7Visibility; }
  1216. set { _isStocker7Visibility = value; this.NotifyOfPropertyChange(nameof(IsStocker7Visibility)); }
  1217. }
  1218. private Visibility _isStocker8Visibility = Visibility.Collapsed;
  1219. public Visibility IsStocker8Visibility
  1220. {
  1221. get { return _isStocker8Visibility; }
  1222. set { _isStocker8Visibility = value; this.NotifyOfPropertyChange(nameof(IsStocker8Visibility)); }
  1223. }
  1224. private Visibility _isStocker9Visibility = Visibility.Collapsed;
  1225. public Visibility IsStocker9Visibility
  1226. {
  1227. get { return _isStocker9Visibility; }
  1228. set { _isStocker9Visibility = value; this.NotifyOfPropertyChange(nameof(IsStocker9Visibility)); }
  1229. }
  1230. private Visibility _isStocker10Visibility = Visibility.Collapsed;
  1231. public Visibility IsStocker10Visibility
  1232. {
  1233. get { return _isStocker10Visibility; }
  1234. set { _isStocker10Visibility = value; this.NotifyOfPropertyChange(nameof(IsStocker10Visibility)); }
  1235. }
  1236. private Visibility _isStocker11Visibility = Visibility.Collapsed;
  1237. public Visibility IsStocker11Visibility
  1238. {
  1239. get { return _isStocker11Visibility; }
  1240. set { _isStocker11Visibility = value; this.NotifyOfPropertyChange(nameof(IsStocker11Visibility)); }
  1241. }
  1242. private Visibility _isStocker12Visibility = Visibility.Collapsed;
  1243. public Visibility IsStocker12Visibility
  1244. {
  1245. get { return _isStocker12Visibility; }
  1246. set { _isStocker12Visibility = value; this.NotifyOfPropertyChange(nameof(IsStocker12Visibility)); }
  1247. }
  1248. private Visibility _isStocker13Visibility = Visibility.Collapsed;
  1249. public Visibility IsStocker13Visibility
  1250. {
  1251. get { return _isStocker13Visibility; }
  1252. set { _isStocker13Visibility = value; this.NotifyOfPropertyChange(nameof(IsStocker13Visibility)); }
  1253. }
  1254. private Visibility _isStocker14Visibility = Visibility.Collapsed;
  1255. public Visibility IsStocker14Visibility
  1256. {
  1257. get { return _isStocker14Visibility; }
  1258. set { _isStocker14Visibility = value; this.NotifyOfPropertyChange(nameof(IsStocker14Visibility)); }
  1259. }
  1260. private Visibility _isStocker15Visibility = Visibility.Collapsed;
  1261. public Visibility IsStocker15Visibility
  1262. {
  1263. get { return _isStocker15Visibility; }
  1264. set { _isStocker15Visibility = value; this.NotifyOfPropertyChange(nameof(IsStocker15Visibility)); }
  1265. }
  1266. private Visibility _isStocker16Visibility = Visibility.Collapsed;
  1267. public Visibility IsStocker16Visibility
  1268. {
  1269. get { return _isStocker16Visibility; }
  1270. set { _isStocker16Visibility = value; this.NotifyOfPropertyChange(nameof(IsStocker16Visibility)); }
  1271. }
  1272. private Visibility _isStocker17Visibility = Visibility.Collapsed;
  1273. public Visibility IsStocker17Visibility
  1274. {
  1275. get { return _isStocker17Visibility; }
  1276. set { _isStocker17Visibility = value; this.NotifyOfPropertyChange(nameof(IsStocker17Visibility)); }
  1277. }
  1278. private Visibility _isStocker18Visibility = Visibility.Collapsed;
  1279. public Visibility IsStocker18Visibility
  1280. {
  1281. get { return _isStocker18Visibility; }
  1282. set { _isStocker18Visibility = value; this.NotifyOfPropertyChange(nameof(IsStocker18Visibility)); }
  1283. }
  1284. public Visibility IsStockerVisibility { get; set; }
  1285. public Visibility IsLPVisibility { get; set; }
  1286. [Subscription("PM1.APC.DeviceData")]
  1287. public AITAPCData APCData { get; set; }
  1288. [Subscription("PM1.ValveAV75.DeviceData")]
  1289. public AITValveData ValveAV75 { get; set; }
  1290. public int FIMS1WaferCount { get; set; } = 0;
  1291. public int FIMS2WaferCount { get; set; } = 0;
  1292. public int CarrierRobotWaferCount { get; set; } = 0;
  1293. public int WaferRobotWaferCount { get; set; } = 0;
  1294. public int PM1WaferCount { get; set; } = 0;
  1295. public string APCFeedbackView
  1296. {
  1297. get
  1298. {
  1299. if (ValveAV75 != null && ValveAV75.Feedback)
  1300. {
  1301. return APCData.Pressure1Feedback.ToString("F3");
  1302. }
  1303. return APCData.Pressure2Feedback.ToString("F1");
  1304. }
  1305. }
  1306. public Visibility APCPressureView
  1307. {
  1308. get
  1309. {
  1310. if (ValveAV75 != null && ValveAV75.Feedback)
  1311. {
  1312. return Visibility.Visible;
  1313. }
  1314. return Visibility.Collapsed;
  1315. }
  1316. }
  1317. public string WaferRobotAxleStatusPath
  1318. {
  1319. get
  1320. {
  1321. switch (WaferRobotStatus)
  1322. {
  1323. case "Homing":
  1324. case "Init":
  1325. return "/FurnaceUI;component/Resources/Images/Controls3/hg2y.png";
  1326. case "Idle":
  1327. case "InTransfer":
  1328. case "Loading":
  1329. case "Unloading":
  1330. case "Picking":
  1331. case "Placing":
  1332. return "/FurnaceUI;component/Resources/Images/Controls3/hg2g.png";
  1333. case "Error":
  1334. return "/FurnaceUI;component/Resources/Images/Controls3/hg2r.png";
  1335. default:
  1336. break;
  1337. }
  1338. return "/FurnaceUI;component/Resources/Images/Controls3/hg2g.png";
  1339. }
  1340. }
  1341. public string CassetteRobotAxleStatusPath
  1342. {
  1343. get
  1344. {
  1345. switch (CassetteRobotStatus)
  1346. {
  1347. case "Homing":
  1348. case "Init":
  1349. return "/FurnaceUI;component/Resources/Images/Controls3/hg1y.png";
  1350. case "Idle":
  1351. case "InTransfer":
  1352. case "Picking":
  1353. case "Placing":
  1354. return "/FurnaceUI;component/Resources/Images/Controls3/hg1g.png";
  1355. case "Error":
  1356. return "/FurnaceUI;component/Resources/Images/Controls3/hg1r.png";
  1357. default:
  1358. break;
  1359. }
  1360. return "/FurnaceUI;component/Resources/Images/Controls3/hg1g.png";
  1361. }
  1362. }
  1363. public StatusViewModel()
  1364. {
  1365. this.DisplayName = "MainStatusViewModel";
  1366. //ActiveUpdateData = true;
  1367. _stokcers = new List<ModuleName>()
  1368. {
  1369. ModuleName.Stocker1,
  1370. ModuleName.Stocker2,
  1371. ModuleName.Stocker3,
  1372. ModuleName.Stocker4,
  1373. ModuleName.Stocker5,
  1374. ModuleName.Stocker6,
  1375. ModuleName.Stocker7,
  1376. ModuleName.Stocker8,
  1377. ModuleName.Stocker9,
  1378. ModuleName.Stocker10,
  1379. ModuleName.Stocker11,
  1380. ModuleName.Stocker12,
  1381. ModuleName.Stocker13,
  1382. ModuleName.Stocker14,
  1383. ModuleName.Stocker15,
  1384. ModuleName.Stocker16,
  1385. ModuleName.Stocker17,
  1386. ModuleName.Stocker18,
  1387. };
  1388. StockerSlots = new ObservableCollection<string>()
  1389. {
  1390. "",
  1391. "",
  1392. "",
  1393. "",
  1394. "",
  1395. "",
  1396. "",
  1397. "",
  1398. "",
  1399. "",
  1400. "",
  1401. "",
  1402. "",
  1403. "",
  1404. "",
  1405. "",
  1406. "",
  1407. "",
  1408. "",
  1409. "",
  1410. "",
  1411. };
  1412. _stokcerWaferType = Enumerable.Repeat("", 21).ToList();
  1413. _eDUseWarningLimit = (int)QueryDataClient.Instance.Service.GetConfig("PM1.WaferCycleTime.EDCountWarning");
  1414. _eDUseAlarmLimit = (int)QueryDataClient.Instance.Service.GetConfig("PM1.WaferCycleTime.EDCountAlarm");
  1415. _stockerBackground = new List<SolidColorBrush>();
  1416. for (int i = 0; i < 21; i++)
  1417. {
  1418. _stockerBackground.Add(_WhiteFill);
  1419. }
  1420. }
  1421. protected override void OnInitialize()
  1422. {
  1423. base.OnInitialize();
  1424. base.InitFOUP();
  1425. base.InitLL();
  1426. base.InitTM();
  1427. base.InitEFEM();
  1428. base.InitPM();
  1429. base.InitBuffer();
  1430. }
  1431. protected override void OnActivate()
  1432. {
  1433. base.OnActivate();
  1434. DefaultUnit = (string)QueryDataClient.Instance.Service.GetConfig($"PM1.APC.PressureUnit");
  1435. _isCycleMode = (bool)QueryDataClient.Instance.Service.GetConfig("System.IsCycleMode");
  1436. _cassetteSlot = (int)QueryDataClient.Instance.Service.GetConfig("System.CassetteSlotCount");
  1437. for (int i = 0; i < _stokcers.Count; i++)
  1438. {
  1439. _stokcerWaferType[i] = (string)QueryDataClient.Instance.Service.GetConfig($"System.Stocker.{_stokcers[i]}WaferType");
  1440. }
  1441. IsStocker1Visibility = (bool)QueryDataClient.Instance.Service.GetConfig($"System.SetUp.IsStocker1Installed") ? Visibility.Visible : Visibility.Collapsed;
  1442. IsStocker2Visibility = (bool)QueryDataClient.Instance.Service.GetConfig($"System.SetUp.IsStocker2Installed") ? Visibility.Visible : Visibility.Collapsed;
  1443. IsStocker3Visibility = (bool)QueryDataClient.Instance.Service.GetConfig($"System.SetUp.IsStocker3Installed") ? Visibility.Visible : Visibility.Collapsed;
  1444. IsStocker4Visibility = (bool)QueryDataClient.Instance.Service.GetConfig($"System.SetUp.IsStocker4Installed") ? Visibility.Visible : Visibility.Collapsed;
  1445. IsStocker5Visibility = (bool)QueryDataClient.Instance.Service.GetConfig($"System.SetUp.IsStocker5Installed") ? Visibility.Visible : Visibility.Collapsed;
  1446. IsStocker6Visibility = (bool)QueryDataClient.Instance.Service.GetConfig($"System.SetUp.IsStocker6Installed") ? Visibility.Visible : Visibility.Collapsed;
  1447. IsStocker7Visibility = (bool)QueryDataClient.Instance.Service.GetConfig($"System.SetUp.IsStocker7Installed") ? Visibility.Visible : Visibility.Collapsed;
  1448. IsStocker8Visibility = (bool)QueryDataClient.Instance.Service.GetConfig($"System.SetUp.IsStocker8Installed") ? Visibility.Visible : Visibility.Collapsed;
  1449. IsStocker9Visibility = (bool)QueryDataClient.Instance.Service.GetConfig($"System.SetUp.IsStocker9Installed") ? Visibility.Visible : Visibility.Collapsed;
  1450. IsStocker10Visibility = (bool)QueryDataClient.Instance.Service.GetConfig($"System.SetUp.IsStocker10Installed") ? Visibility.Visible : Visibility.Collapsed;
  1451. IsStocker11Visibility = (bool)QueryDataClient.Instance.Service.GetConfig($"System.SetUp.IsStocker11Installed") ? Visibility.Visible : Visibility.Collapsed;
  1452. IsStocker12Visibility = (bool)QueryDataClient.Instance.Service.GetConfig($"System.SetUp.IsStocker12Installed") ? Visibility.Visible : Visibility.Collapsed;
  1453. IsStocker13Visibility = (bool)QueryDataClient.Instance.Service.GetConfig($"System.SetUp.IsStocker13Installed") ? Visibility.Visible : Visibility.Collapsed;
  1454. IsStocker14Visibility = (bool)QueryDataClient.Instance.Service.GetConfig($"System.SetUp.IsStocker14Installed") ? Visibility.Visible : Visibility.Collapsed;
  1455. IsStocker15Visibility = (bool)QueryDataClient.Instance.Service.GetConfig($"System.SetUp.IsStocker15Installed") ? Visibility.Visible : Visibility.Collapsed;
  1456. IsStocker16Visibility = (bool)QueryDataClient.Instance.Service.GetConfig($"System.SetUp.IsStocker16Installed") ? Visibility.Visible : Visibility.Collapsed;
  1457. IsStocker17Visibility = (bool)QueryDataClient.Instance.Service.GetConfig($"System.SetUp.IsStocker17Installed") ? Visibility.Visible : Visibility.Collapsed;
  1458. IsStocker18Visibility = (bool)QueryDataClient.Instance.Service.GetConfig($"System.SetUp.IsStocker18Installed") ? Visibility.Visible : Visibility.Collapsed;
  1459. string toolType = (string)QueryDataClient.Instance.Service.GetConfig("System.SetUp.ToolType");
  1460. IsELKVisibility = toolType.Equals(ConstantsCommon.ELK) ? Visibility.Visible : Visibility.Collapsed;
  1461. IsNTPVisibility = toolType.Equals(ConstantsCommon.NTP) ? Visibility.Visible : Visibility.Collapsed;
  1462. IsSiBCNVisibility = toolType.Equals(ConstantsCommon.SIBCN) ? Visibility.Visible : Visibility.Collapsed;
  1463. IsNTP02Visibility= toolType.Equals(ConstantsCommon.NTP02) ? Visibility.Visible : Visibility.Collapsed;
  1464. }
  1465. protected override void OnViewLoaded(object view)
  1466. {
  1467. base.OnViewLoaded(view);
  1468. StatusView mainStatusView = (StatusView)view;
  1469. //InitMfc(mainStatusView);
  1470. }
  1471. public GridLength MfcNXHeight { get; set; }
  1472. public GridLength MfcNYHeight { get; set; }
  1473. public GridLength MfcNN1Height { get; set; }
  1474. public GridLength MfcN1Height { get; set; }
  1475. public GridLength MfcNN2Height { get; set; }
  1476. public GridLength MfcN2Height { get; set; }
  1477. public GridLength MfcM1Height { get; set; }
  1478. public GridLength MfcD1Height { get; set; }
  1479. public GridLength MfcXY1Height { get; set; }
  1480. public GridLength MfcNXF1Height { get; set; }
  1481. public GridLength MfcXFHeight { get; set; }
  1482. public GridLength MfcNV1Height { get; set; }
  1483. public GridLength MfcV1Height { get; set; }
  1484. public void InitMfc(StatusView view)
  1485. {
  1486. List<AITMfcData> mfcData = new List<AITMfcData>()
  1487. {
  1488. MFC1Data,
  1489. MFC2Data,
  1490. MFC3Data,
  1491. MFC4Data,
  1492. MFC5Data,
  1493. MFC6Data,
  1494. MFC7Data,
  1495. MFC8Data,
  1496. MFC9Data,
  1497. MFC10Data,
  1498. MFC11Data,
  1499. MFC12Data,
  1500. MFC13Data,
  1501. MFC14Data,
  1502. MFC15Data,
  1503. MFC16Data,
  1504. MFC17Data,
  1505. MFC31Data,
  1506. MFC32Data,
  1507. MFC51Data,
  1508. };
  1509. for (int i = 0; i < mfcData.Count; i++)
  1510. {
  1511. var IsMFCInstalled = (bool)QueryDataClient.Instance.Service.GetConfig($"PM1.MFC.{mfcData[i].DeviceName}.IsMFCInstalled");
  1512. switch (mfcData[i].DeviceName)
  1513. {
  1514. case "MFC1":
  1515. MfcNXHeight = IsMFCInstalled ? new GridLength(1, GridUnitType.Star) : new GridLength(0, GridUnitType.Pixel);
  1516. break;
  1517. case "MFC":
  1518. MfcNYHeight = IsMFCInstalled ? new GridLength(1, GridUnitType.Star) : new GridLength(0, GridUnitType.Pixel);
  1519. break;
  1520. case "MfcNN1":
  1521. MfcNN1Height = IsMFCInstalled ? new GridLength(1, GridUnitType.Star) : new GridLength(0, GridUnitType.Pixel);
  1522. break;
  1523. case "MfcN1":
  1524. MfcN1Height = IsMFCInstalled ? new GridLength(1, GridUnitType.Star) : new GridLength(0, GridUnitType.Pixel);
  1525. break;
  1526. case "MfcNN2":
  1527. MfcNN2Height = IsMFCInstalled ? new GridLength(1, GridUnitType.Star) : new GridLength(0, GridUnitType.Pixel);
  1528. break;
  1529. case "MfcN2":
  1530. MfcN2Height = IsMFCInstalled ? new GridLength(1, GridUnitType.Star) : new GridLength(0, GridUnitType.Pixel);
  1531. break;
  1532. case "MfcM1":
  1533. MfcM1Height = IsMFCInstalled ? new GridLength(1, GridUnitType.Star) : new GridLength(0, GridUnitType.Pixel);
  1534. break;
  1535. case "MfcD1":
  1536. MfcD1Height = IsMFCInstalled ? new GridLength(1, GridUnitType.Star) : new GridLength(0, GridUnitType.Pixel);
  1537. break;
  1538. case "MfcXY1":
  1539. MfcXY1Height = IsMFCInstalled ? new GridLength(1, GridUnitType.Star) : new GridLength(0, GridUnitType.Pixel);
  1540. break;
  1541. case "MfcNXF1":
  1542. MfcNXF1Height = IsMFCInstalled ? new GridLength(1, GridUnitType.Star) : new GridLength(0, GridUnitType.Pixel);
  1543. break;
  1544. case "MfcXF1":
  1545. MfcXFHeight = IsMFCInstalled ? new GridLength(1, GridUnitType.Star) : new GridLength(0, GridUnitType.Pixel);
  1546. break;
  1547. case "MfcNV1":
  1548. MfcNV1Height = IsMFCInstalled ? new GridLength(1, GridUnitType.Star) : new GridLength(0, GridUnitType.Pixel);
  1549. break;
  1550. case "MfcV1":
  1551. MfcV1Height = IsMFCInstalled ? new GridLength(1, GridUnitType.Star) : new GridLength(0, GridUnitType.Pixel);
  1552. break;
  1553. default:
  1554. break;
  1555. }
  1556. }
  1557. }
  1558. public void Start()
  1559. {
  1560. InvokeClient.Instance.Service.DoOperation("System.StartAutoRun");
  1561. }
  1562. public void Stop()
  1563. {
  1564. //InvokeClient.Instance.Service.DoOperation("System.StartAutoRun");
  1565. }
  1566. public void SwitchPage(string page)
  1567. {
  1568. var wm = IoC.Get<IWindowManager>();
  1569. switch (page)
  1570. {
  1571. case "Stocker":
  1572. ClientApp.Instance.SwitchPage("status", "stocker", null);
  1573. break;
  1574. case "TransferMain":
  1575. ClientApp.Instance.SwitchPage("status", "TransferMain", null);
  1576. break;
  1577. case "N2Purge":
  1578. ClientApp.Instance.SwitchPage("status", "N2PurgeStatus", null);
  1579. break;
  1580. case "Gas":
  1581. {
  1582. ClientApp.Instance.SwitchPage("status", "Gas", null);
  1583. //CGlobal.BoatWaferEditViewEnable = false;
  1584. ////var wm = IoC.Get<IWindowManager>();
  1585. //GasDetailViewModel gasDetailViewModel = new GasDetailViewModel();
  1586. //(wm as WindowManager)?.ShowDialogWithTitle(gasDetailViewModel, null, "Gas Detail");
  1587. }
  1588. break;
  1589. case "Temp":
  1590. ClientApp.Instance.SwitchPage("status", "temp", null);
  1591. break;
  1592. case "Pressure":
  1593. {
  1594. ClientApp.Instance.SwitchPage("status", "Pressure", null);
  1595. // var wm = IoC.Get<IWindowManager>();
  1596. //var viewPressureDetail = new PressureDetailViewModel();
  1597. //(wm as WindowManager)?.ShowDialogWithTitle(viewPressureDetail, null, "Pressure Detail");
  1598. }
  1599. break;
  1600. case "MainRecipe":
  1601. if (!string.IsNullOrEmpty(PM1MainRecipeName))
  1602. {
  1603. CGlobal.RecipeProcessEditViewEnable = false;
  1604. MECF.Framework.UI.Client.CenterViews.Editors.Recipe.CGlobal.RecipeProcessEditViewEnable = false;
  1605. // var wm = IoC.Get<IWindowManager>();
  1606. var viewProcessRecipeRecipeType = "Process";
  1607. var recipeName = PM1MainRecipeName;
  1608. if (PM1ExecRecipeType.Equals("Sub"))
  1609. {
  1610. recipeName = ProcessSubRecipe;
  1611. }
  1612. else
  1613. {
  1614. recipeName = PM1MainRecipeName;
  1615. }
  1616. if (PM1ExecRecipeType.Equals("Process") || PM1ExecRecipeType.Equals("Abort"))
  1617. {
  1618. viewProcessRecipeRecipeType = PM1ExecRecipeType;
  1619. }
  1620. else
  1621. {
  1622. viewProcessRecipeRecipeType = PM1ExecRecipeType.ToLower();
  1623. }
  1624. var viewProcessRecipe = new RecipeProcessEditViewModel($"Furnace\\{viewProcessRecipeRecipeType}", recipeName);
  1625. viewProcessRecipe.RecipeType = viewProcessRecipeRecipeType;
  1626. viewProcessRecipe.IndexNoDefault = PM1RecipeStepNumber;
  1627. viewProcessRecipe.SelectedStepName = PM1RecipeStepName;
  1628. (wm as WindowManager)?.ShowDialogWithTitle(viewProcessRecipe, null, $"View {viewProcessRecipeRecipeType} Recpie");
  1629. }
  1630. break;
  1631. case "PMCommand":
  1632. //if (!string.IsNullOrEmpty(PM1MainRecipeName))
  1633. //{
  1634. // var wm = IoC.Get<IWindowManager>();
  1635. var viewPMCommand = new PMCommandViewModel();
  1636. (wm as WindowManager)?.ShowDialogWithTitle(viewPMCommand, null, "PM Command");
  1637. //}
  1638. break;
  1639. case "LayoutRecipe":
  1640. {
  1641. CGlobal.BoatWaferEditViewEnable = false;
  1642. // var wm = IoC.Get<IWindowManager>();
  1643. var viewLayoutRecipe = new BoatWaferNoActionViewModel();
  1644. (wm as WindowManager)?.ShowDialogWithTitle(viewLayoutRecipe, null, "View Boat Wafer");
  1645. }
  1646. break;
  1647. case "Boat Elevator":
  1648. {
  1649. BoatElevatorParametersViewModel boatElevatorParametersViewModel = new BoatElevatorParametersViewModel();
  1650. (wm as WindowManager)?.ShowDialogWithTitle(boatElevatorParametersViewModel, null, "Boat Elevator Parameter Settings");
  1651. }
  1652. break;
  1653. case "CJStatus":
  1654. {
  1655. ClientApp.Instance.SwitchPage("status", "job", null);
  1656. //ControlJobStatusViewModel controlJobStatusViewModel = new ControlJobStatusViewModel();
  1657. //(wm as WindowManager)?.ShowDialogWithTitle(controlJobStatusViewModel, null, "CJ Status");
  1658. }
  1659. break;
  1660. case "PJStatus":
  1661. {
  1662. ProcessJobWithDrawingViewModel processJobWithDrawingViewModel = new ProcessJobWithDrawingViewModel();
  1663. (wm as WindowManager)?.ShowDialogWithTitle(processJobWithDrawingViewModel, null, "PJ Status");
  1664. }
  1665. break;
  1666. case "LoadPortState":
  1667. {
  1668. LoadPortStateViewModel loadPortStateViewModel = new LoadPortStateViewModel();
  1669. (wm as WindowManager)?.ShowDialogWithTitle(loadPortStateViewModel, null, "Load Port State");
  1670. }
  1671. break;
  1672. case "CarrierState":
  1673. {
  1674. CarrierStateViewModel carrierStateViewModel = new CarrierStateViewModel();
  1675. (wm as WindowManager)?.ShowDialogWithTitle(carrierStateViewModel, null, "Carrier State");
  1676. }
  1677. break;
  1678. case "Equipment Status":
  1679. {
  1680. EquipmentStatusViewModel equipmentStatusViewModel = new EquipmentStatusViewModel();
  1681. (wm as WindowManager)?.ShowDialogWithTitle(equipmentStatusViewModel, null, "Equipment Operation State");
  1682. }
  1683. break;
  1684. case "Load Unload State":
  1685. {
  1686. LoadUnloadStateViewModel loadUnloadStateViewModel = new LoadUnloadStateViewModel();
  1687. (wm as WindowManager)?.ShowDialogWithTitle(loadUnloadStateViewModel, null, "Load Unload State");
  1688. }
  1689. break;
  1690. case "Boat Detail":
  1691. {
  1692. BoatWaferViewModel boatWaferViewModel = new BoatWaferViewModel();
  1693. (wm as WindowManager)?.ShowDialogWithTitle(boatWaferViewModel, null, "Boat Detail");
  1694. }
  1695. break;
  1696. }
  1697. }
  1698. string[] moduleNames = new string[] { "Stocker1", "Stocker2", "Stocker3", "Stocker4", "Stocker5", "Stocker6", "Stocker7", "Stocker8", "Stocker9",
  1699. "Stocker10","Stocker11","Stocker12","Stocker13","Stocker14","Stocker15","Stocker16","Stocker17","Stocker18",
  1700. "FIMS1","FIMS2","CarrierRobot","WaferRobot","PM1"};
  1701. //string[] moduleNames = new string[] { "Stocker1", "Stocker2", "Stocker3", "Stocker4", "Stocker5", "Stocker6", "Stocker7", "Stocker8", "Stocker9",
  1702. // "Stocker10","Stocker11","Stocker12","Stocker13","Stocker14","Stocker15","Stocker16","Stocker17","Stocker18"};
  1703. protected override void InvokeAfterUpdateProperty(Dictionary<string, object> data)
  1704. {
  1705. UpdateStockerSlots();
  1706. UpdateRecipeProgress();
  1707. var isLoadPortPosition = (string)QueryDataClient.Instance.Service.GetConfig("LoadPort.LoadPortPosition");
  1708. if (isLoadPortPosition == "Upper")
  1709. {
  1710. IsStockerVisibility = Visibility.Hidden;
  1711. IsLPVisibility = Visibility.Visible;
  1712. }
  1713. else
  1714. {
  1715. IsStockerVisibility = Visibility.Visible;
  1716. IsLPVisibility = Visibility.Hidden;
  1717. }
  1718. foreach (var item in moduleNames)
  1719. {
  1720. if (ModuleManager.ModuleInfos.ContainsKey(item))
  1721. {
  1722. this.GetType().GetProperty($"{item}WaferCount").SetValue(this, ModuleManager.ModuleInfos[item].WaferManager.Wafers.Where(x => x.WaferStatus != 0).Count());
  1723. }
  1724. }
  1725. NotifyOfPropertyChange("IsStocker1Visibility");
  1726. }
  1727. private void UpdateStockerSlots()
  1728. {
  1729. for (int i = 0; i < _stokcers.Count; i++)
  1730. {
  1731. bool bHaveAbort = false;
  1732. var wafers = ModuleManager.ModuleInfos[_stokcers[i].ToString()].WaferManager.Wafers;
  1733. int waferNumber = 0;
  1734. string waferType = "";
  1735. SolidColorBrush _tempFill = _SD_ED_M_Fill;
  1736. if (wafers != null)
  1737. {
  1738. foreach (var wafer in wafers)
  1739. {
  1740. if (wafer.WaferStatus != 0)
  1741. {
  1742. waferNumber++;
  1743. waferType = wafer.WaferType.ToString();
  1744. if (wafer.WaferStatus == 5) // EnumWaferProcessStatus.Failed
  1745. bHaveAbort = true;
  1746. if (wafer.UseCount >= _eDUseWarningLimit)
  1747. {
  1748. _tempFill = _waringFill;
  1749. }
  1750. if (wafer.UseCount >= _eDUseAlarmLimit)
  1751. {
  1752. _tempFill = _alarmFill;
  1753. }
  1754. }
  1755. }
  1756. }
  1757. StockerSlots[i] = $"{_stokcerWaferType[i]}-{waferNumber}/{_cassetteSlot}";
  1758. if (_stokcerWaferType[i].Contains("P"))
  1759. {
  1760. if (waferNumber > 0)
  1761. {
  1762. if (bHaveAbort)
  1763. StockerBackground[i] = _redBk;
  1764. else
  1765. StockerBackground[i] = _productionFill;
  1766. }
  1767. else
  1768. {
  1769. StockerBackground[i] = _WhiteFill;
  1770. }
  1771. }
  1772. else
  1773. {
  1774. if (waferNumber > 0)
  1775. {
  1776. if (bHaveAbort)
  1777. StockerBackground[i] = _redBk;
  1778. else
  1779. {
  1780. StockerBackground[i] = _tempFill;
  1781. }
  1782. }
  1783. else
  1784. {
  1785. StockerBackground[i] = _WhiteFill;
  1786. }
  1787. }
  1788. }
  1789. }
  1790. private void UpdateRecipeProgress()
  1791. {
  1792. if (!IsPM1Process && !IsPM1PostProcess)
  1793. {
  1794. RecipeProgress = "";
  1795. RecipeProgressValue = 0;
  1796. return;
  1797. }
  1798. if (PM1RecipeTotalTime == 0)
  1799. {
  1800. RecipeProgress = "";
  1801. RecipeProgressValue = 0;
  1802. }
  1803. else
  1804. {
  1805. double totalTime = PM1RecipeTotalTime;
  1806. double elapseTime = PM1RecipeTotalElapseTime;
  1807. float percentage = (float)(elapseTime / totalTime * 100);
  1808. percentage = percentage > 100 ? 100 : percentage;
  1809. RecipeProgress = $"{percentage.ToString("f1")}%";
  1810. RecipeProgressValue = (int)(elapseTime / totalTime * 100);
  1811. }
  1812. }
  1813. public void CanvasMouseLeftButtonDown(object sender)
  1814. {
  1815. }
  1816. public Dictionary<string, StationPosition> StationPosition
  1817. {
  1818. get
  1819. {
  1820. return new Dictionary<string, StationPosition>()
  1821. {
  1822. { "ArmA.System", new StationPosition() {
  1823. StartPosition = new RobotPosition() { Root = 0, Arm = 180, Hand = 180 }
  1824. ,EndPosition = new RobotPosition() { Root = 0, Arm = 180, Hand = 180 }}}
  1825. ,{ "Robot", new StationPosition() {
  1826. StartPosition = new RobotPosition() { X=0, Root = 0, Arm = 180, Hand = 180 }
  1827. ,EndPosition = new RobotPosition() { Root = 0, Arm = 180, Hand = 180 }}}
  1828. ,{"ArmA.Stocker1", new StationPosition() {
  1829. StartPosition = new RobotPosition() { X=-150, Root = 0, Arm = 180, Hand = 180 }
  1830. ,EndPosition = new RobotPosition() { Root = 0, Arm = 0, Hand = 0 }}}
  1831. ,{ "ArmA.Stocker2", new StationPosition() {
  1832. StartPosition = new RobotPosition() { X=-150, Root = 0, Arm = 180, Hand = 180 }
  1833. ,EndPosition = new RobotPosition() { Root = 0, Arm = -20, Hand = 0 }}}
  1834. ,{ "ArmA.Stocker3", new StationPosition() {
  1835. StartPosition = new RobotPosition() { X=-150, Root = 0, Arm = 180, Hand = 180 }
  1836. ,EndPosition = new RobotPosition() { Root = 0, Arm = -20, Hand = 0 }}}
  1837. ,{ "ArmA.Stocker4", new StationPosition() {
  1838. StartPosition = new RobotPosition() { X=-150, Root = 0, Arm = 180, Hand = 180 }
  1839. ,EndPosition = new RobotPosition() { Root = 0, Arm = -20, Hand = 0 }}}
  1840. ,{"ArmA.Stocker5", new StationPosition(){
  1841. StartPosition = new RobotPosition() { X=-240, Root = 0, Arm = 180, Hand = 180 }
  1842. ,EndPosition = new RobotPosition() { Root = 0, Arm = 0, Hand = 0 }}}
  1843. ,{"ArmA.Stocker6", new StationPosition(){
  1844. StartPosition = new RobotPosition() { X=-240, Root = 0, Arm = 180, Hand = 180 }
  1845. ,EndPosition = new RobotPosition() { Root = 0, Arm = -20, Hand = 0 }}}
  1846. ,{"ArmA.Stocker7", new StationPosition(){
  1847. StartPosition = new RobotPosition() { X=-240, Root = 0, Arm = 180, Hand = 180 }
  1848. ,EndPosition = new RobotPosition() { Root = 0, Arm = -20, Hand = 0 }}}
  1849. ,{"ArmA.Stocker8", new StationPosition(){
  1850. StartPosition = new RobotPosition() { X=-240, Root = 0, Arm = 180, Hand = 180 }
  1851. ,EndPosition = new RobotPosition() { Root = 0, Arm = -20, Hand = 0 }}}
  1852. ,{ "ArmA.Stocker9", new StationPosition() {
  1853. StartPosition = new RobotPosition() { X=-325, Root = 0, Arm = 180, Hand = 180 }
  1854. ,EndPosition = new RobotPosition() { Root = 0, Arm = 0, Hand = 0 }}}
  1855. ,{ "ArmA.Stocker10", new StationPosition() {
  1856. StartPosition = new RobotPosition() { X=-325, Root = 0, Arm = 180, Hand = 180 }
  1857. ,EndPosition = new RobotPosition() { Root = 0, Arm = -20, Hand = 0 }}}
  1858. ,{ "ArmA.Stocker11", new StationPosition() {
  1859. StartPosition = new RobotPosition() { X=-325, Root = 0, Arm = 180, Hand = 180 }
  1860. ,EndPosition = new RobotPosition() { Root = 0, Arm = -20, Hand = 0 }} }
  1861. ,{"ArmA.Stocker12", new StationPosition(){
  1862. StartPosition = new RobotPosition() { X =-325, Root = 0, Arm = 180, Hand = 180 }
  1863. ,EndPosition = new RobotPosition() { Root = 0, Arm = -20, Hand = 0 }}}
  1864. ,{ "ArmA.Stocker13", new StationPosition() {
  1865. StartPosition = new RobotPosition() { X=-415, Root = 0, Arm = 180, Hand = 180 }
  1866. ,EndPosition = new RobotPosition() { Root = 0, Arm = 0, Hand = 0 }}}
  1867. ,{ "ArmA.Stocker14", new StationPosition() {
  1868. StartPosition = new RobotPosition() { X=-415, Root = 0, Arm = 180, Hand = 180 }
  1869. ,EndPosition = new RobotPosition() { Root = 0, Arm = -20, Hand = 0 }}}
  1870. ,{ "ArmA.Stocker15", new StationPosition() {
  1871. StartPosition = new RobotPosition() { X=-415, Root = 0, Arm = 180, Hand = 180 }
  1872. ,EndPosition = new RobotPosition() { Root = 0, Arm = -20, Hand = 0 }}}
  1873. ,{ "ArmA.Stocker16", new StationPosition() {
  1874. StartPosition = new RobotPosition() { X=-415, Root = 0, Arm = 180, Hand = 180 }
  1875. ,EndPosition = new RobotPosition() { Root = 0, Arm = -20, Hand = 0 }}}
  1876. ,{"ArmA.Stocker17", new StationPosition(){
  1877. StartPosition = new RobotPosition() { X = -250, Root = 180, Arm = 180, Hand = 180 }
  1878. ,EndPosition = new RobotPosition() { Root = 180, Arm = -20, Hand = 0 }}}
  1879. ,{"ArmA.Stocker18", new StationPosition(){
  1880. StartPosition = new RobotPosition() { X = -250, Root = 180, Arm = 180, Hand = 180 }
  1881. ,EndPosition = new RobotPosition() { Root = 180, Arm = 23, Hand = 0 }}}
  1882. ,{"ArmA.FIMS1", new StationPosition(){
  1883. StartPosition = new RobotPosition() { X = 35, Root = 0, Arm = 180, Hand = 180 }
  1884. ,EndPosition = new RobotPosition() { Root = 0, Arm = -20, Hand = 0 }}}
  1885. ,{"ArmA.FIMS2", new StationPosition(){
  1886. StartPosition = new RobotPosition() { X = -95, Root = 0, Arm = 180, Hand = 180 }
  1887. ,EndPosition = new RobotPosition() { Root = 0, Arm = -20, Hand = 0 }}}
  1888. ,{"ArmA.LP1", new StationPosition(){
  1889. StartPosition = new RobotPosition() { X = -90, Root = 180, Arm = 180, Hand = 180 }
  1890. ,EndPosition = new RobotPosition() { Root = 180, Arm = -20, Hand = 0 }}}
  1891. ,{"ArmA.LP2", new StationPosition(){
  1892. StartPosition = new RobotPosition() { X = -90, Root = 180, Arm = 180, Hand = 180 }
  1893. ,EndPosition = new RobotPosition() { Root = 180, Arm = 23, Hand = 0 }}}
  1894. ,{"ArmA.LP3", new StationPosition(){
  1895. StartPosition = new RobotPosition() { X = -365, Root = 180, Arm = 180, Hand = 180 }
  1896. ,EndPosition = new RobotPosition() { Root = 180, Arm = -20, Hand = 0 }}}
  1897. ,{"ArmA.LP4", new StationPosition(){
  1898. StartPosition = new RobotPosition() { X = -365, Root = 180, Arm = 180, Hand = 180 }
  1899. ,EndPosition = new RobotPosition() { Root = 180, Arm = 23, Hand = 0 }}}
  1900. };
  1901. }
  1902. }
  1903. public Dictionary<string, StationPosition> StationPosition2
  1904. {
  1905. get
  1906. {
  1907. return new Dictionary<string, StationPosition>()
  1908. {
  1909. { "ArmA.System", new StationPosition() {
  1910. StartPosition = new RobotPosition() { X=0, Root = 0, Arm = 180, Hand = 180 }
  1911. ,EndPosition = new RobotPosition() { Root = 0, Arm = 180, Hand = 180 }}
  1912. }
  1913. ,{ "Robot", new StationPosition() {
  1914. StartPosition = new RobotPosition() { X=0, Root = 0, Arm = 180, Hand = 180 }
  1915. ,EndPosition = new RobotPosition() { Root = 0, Arm = 180, Hand = 180 }}
  1916. }
  1917. ,{ "ArmA.FIMS1", new StationPosition() {
  1918. StartPosition = new RobotPosition() { X=-20, Root = 180, Arm = 180, Hand = 180 }
  1919. ,EndPosition = new RobotPosition() { Root = 180, Arm = 0, Hand = 0 }}
  1920. }
  1921. ,{ "ArmA.FIMS2", new StationPosition() {
  1922. StartPosition = new RobotPosition() { X=-168, Root = 180, Arm = 180, Hand = 180 }
  1923. ,EndPosition = new RobotPosition() { Root = 180, Arm = 0, Hand = 0 }}
  1924. }
  1925. ,{ "ArmA.PM1", new StationPosition() {
  1926. StartPosition = new RobotPosition() { X=-50, Root = 0, Arm = 180, Hand = 180 }
  1927. ,EndPosition = new RobotPosition() { Root = 0, Arm = 0, Hand = 0 }}
  1928. }
  1929. };
  1930. }
  1931. }
  1932. public Dictionary<string, StationPosition> StationPosition3
  1933. {
  1934. get
  1935. {
  1936. return new Dictionary<string, StationPosition>()
  1937. {
  1938. { "HomePosition", new StationPosition() {
  1939. StartPosition = new RobotPosition() { X=0, Root = 0, Arm = 0, Hand = 0 }
  1940. ,EndPosition = new RobotPosition() { Root = 0, Arm = 0, Hand = 0 }}
  1941. },
  1942. { "Position1", new StationPosition() {
  1943. StartPosition = new RobotPosition() { X=-50, Root = 0, Arm = 0, Hand = 0 }
  1944. ,EndPosition = new RobotPosition() { Root = 0, Arm = 0, Hand = 0 }}
  1945. },
  1946. { "Position2", new StationPosition() {
  1947. StartPosition = new RobotPosition() { X=-100, Root = 0, Arm = 0, Hand = 0 }
  1948. ,EndPosition = new RobotPosition() { Root = 0, Arm = 0, Hand = 0 }}
  1949. },
  1950. { "ProcessPosition", new StationPosition() {
  1951. StartPosition = new RobotPosition() { X=-280, Root = 0, Arm = 0, Hand = 0 }
  1952. ,EndPosition = new RobotPosition() { Root = 0, Arm = 0, Hand = 0 }}
  1953. }
  1954. };
  1955. }
  1956. }
  1957. public void PopupPage(string page)
  1958. {
  1959. //var windowManager = IoC.Get<IWindowManager>();
  1960. var windowManager = new WindowManager();
  1961. switch (page)
  1962. {
  1963. case "PortStatus":
  1964. //LoadIOPortViewModel portStatusViewModel = new LoadIOPortViewModel();
  1965. //(windowManager as WindowManager)?.ShowDialogWithTitle(portStatusViewModel, null, "Port Status");
  1966. break;
  1967. case "JobStatus":
  1968. JOBStatusViewModel vm = new JOBStatusViewModel();
  1969. //bool? ret = windowManager.ShowDialog(vm);
  1970. (windowManager as WindowManager)?.ShowDialogWithTitle(vm, null, "Job Status View");
  1971. break;
  1972. default:
  1973. break;
  1974. }
  1975. }
  1976. public void StandbyFactor()
  1977. {
  1978. //if (!string.IsNullOrEmpty(PM1MainRecipeName))
  1979. {
  1980. var windowManager = IoC.Get<IWindowManager>();
  1981. StandbyFactorViewModel standbyFactorViewModel = new StandbyFactorViewModel();
  1982. standbyFactorViewModel.MainRecipeName = PM1MainRecipeName;
  1983. (windowManager as WindowManager)?.ShowDialogWithTitle(standbyFactorViewModel, null, "Standby Factor View");
  1984. }
  1985. }
  1986. public void Skip()
  1987. {
  1988. if (!DialogBox.Confirm("Ara you sure to skip current step?"))
  1989. return;
  1990. InvokeClient.Instance.Service.DoOperation($"PM1.RecipeSkipStep", "");
  1991. }
  1992. public void Jump()
  1993. {
  1994. //if (!DialogBox.Confirm("Ara you sure to jump current step?"))
  1995. // return;
  1996. //var recipes = new RecipeDataBase();
  1997. //recipes.PrefixPath = "Furnace\\Process";
  1998. //recipes.Name = PM1MainRecipeName;
  1999. //RecipeProvider _recipeProvider = new RecipeProvider();
  2000. //recipes.Clear();
  2001. //var recipeContent = _recipeProvider.LoadRecipe(recipes.PrefixPath, recipes.Name);
  2002. //if (string.IsNullOrEmpty(recipeContent))
  2003. //{
  2004. // MessageBox.Show($"{recipes.PrefixPath}\\{recipes.Name} is empty, please confirm the file is valid.");
  2005. // return;
  2006. //}
  2007. //recipes.RecipeChamberType = "OriginChamber";
  2008. //recipes.InitData(recipes.PrefixPath, recipes.Name, recipeContent, "PM1");
  2009. //var windowManager = IoC.Get<IWindowManager>();
  2010. //RecipeLoopSetViewModel recipeLoopSetViewModel = new RecipeLoopSetViewModel();
  2011. //recipeLoopSetViewModel.StepNames = new ObservableCollection<string>(recipes.Steps.OrderBy(x => x.StepNo).Where(x => x.StepNo != PM1RecipeStepNumber).Select(x => x.Name).ToList());
  2012. //if ((bool)(windowManager as WindowManager)?.ShowDialogWithTitle(recipeLoopSetViewModel, null, "Jump"))
  2013. //{
  2014. // InvokeClient.Instance.Service.DoOperation($"PM1.RecipeJumpStep", recipeLoopSetViewModel.SelectedIndex);
  2015. //}
  2016. }
  2017. public void Hold()
  2018. {
  2019. if (HoldName == "Hold")
  2020. {
  2021. if (!DialogBox.Confirm("Ara you sure to hold current recipe?"))
  2022. return;
  2023. InvokeClient.Instance.Service.DoOperation($"PM1.RecipePause", "");
  2024. }
  2025. else
  2026. {
  2027. InvokeClient.Instance.Service.DoOperation($"PM1.RecipeContinue", "");
  2028. }
  2029. }
  2030. public void EmergencyAbort()
  2031. {
  2032. if (!DialogBox.Confirm("Ara you sure to execute EmergencyAbort?"))
  2033. return;
  2034. InvokeClient.Instance.Service.DoOperation("PM1.Abort");
  2035. }
  2036. private string CalEndTime(DateTime beginTime, double totalTime, double totalElapseTime)
  2037. {
  2038. TimeSpan secondSpan = DateTime.Now - beginTime;
  2039. return beginTime.AddSeconds(secondSpan.TotalSeconds + totalTime - totalElapseTime).ToString("yyyy-MM-dd HH:mm:ss");
  2040. }
  2041. }
  2042. }