| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090 | 
							- using Aitex.Core.Common.DeviceData;
 
- using Aitex.Core.Util;
 
- using Caliburn.Micro;
 
- using Caliburn.Micro.Core;
 
- using MECF.Framework.Common.DataCenter;
 
- using MECF.Framework.Common.Equipment;
 
- using MECF.Framework.Common.OperationCenter;
 
- using MECF.Framework.UI.Client.ClientBase;
 
- using MECF.Framework.UI.Client.CenterViews.Configs.SystemConfig;
 
- using System.Collections.Generic;
 
- using System.Collections.ObjectModel;
 
- using System.Linq;
 
- using System.Windows;
 
- using System.Windows.Media;
 
- using FurnaceUI.Client;
 
- using FurnaceUI.Models;
 
- using FurnaceUI.Views.Jobs;
 
- using FurnaceUI.Views.Recipes;
 
- using FurnaceUI.Views.Editors;
 
- using MECF.Framework.Common.SubstrateTrackings;
 
- using FurnaceUI.Views.Status;
 
- using OpenSEMI.ClientBase;
 
- using MECF.Framework.UI.Client.CenterViews.Editors.Recipe;
 
- using FurnaceUI.Controls.Common;
 
- using MECF.Framework.Common.CommonData;
 
- using System;
 
- using MECF.Framework.Common.Jobs;
 
- using FurnaceUI.Common;
 
- using System.IO;
 
- namespace FurnaceUI.Views.Operations
 
- {
 
-     public class StatusViewModel : FurnaceUIViewModelBase
 
-     {
 
-         #region Property   
 
-         [Subscription("PM1.CheckO2Location")]
 
-         public string CheckO2Location { get; set; }
 
-         [Subscription("PM1.N2PurgeLimitData")]
 
-         public float N2PurgeLimitData { get; set; }
 
-         [Subscription("PM1.O2DensityData")]
 
-         public string O2DensityData { get; set; }
 
-         private bool _isShowMFCBySetPoint = false;
 
-         [Subscription("LP1.CurrentLotId")]
 
-         public string LP1CurrentLotId { get; set; }
 
-         [Subscription("LP1.WaitLotId")]
 
-         public List<string> LP1WaitLotId { get; set; }
 
-         [Subscription("LP2.CurrentLotId")]
 
-         public string LP2CurrentLotId { get; set; }
 
-         [Subscription("LP2.WaitLotId")]
 
-         public List<string> LP2WaitLotId { get; set; }
 
-         [Subscription("TransferState", "LP1")]
 
-         public string TransferStateLp1 { get; set; }
 
-         [Subscription("TransferState", "LP2")]
 
-         public string TransferStateLp2 { get; set; }
 
-         [Subscription("CarrierIDStatus", "LP1")]
 
-         public string CarrierStatusLP1 { get; set; }
 
-         [Subscription("CarrierIDStatus", "LP2")]
 
-         public string CarrierStatusLP2 { get; set; }
 
-         [Subscription("CarrierRobot.RobotMoveInfo")]
 
-         public RobotMoveInfo CassetteRobotMoveInfo { get; set; }
 
-         [Subscription("WaferRobot.RobotMoveInfo")]
 
-         public RobotMoveInfo WaferRobotMoveInfo { get; set; }
 
-         [Subscription("ProcessFlow.Status")]
 
-         public string ProcessFlowStatus { get; set; }
 
-         double _eDUseWarningLimit;
 
-         double _eDUseAlarmLimit;
 
-         SolidColorBrush _greenBk = new SolidColorBrush(Colors.LawnGreen);
 
-         SolidColorBrush _redBk = new SolidColorBrush(Colors.Red);
 
-         SolidColorBrush _transparentBk = new SolidColorBrush(Colors.Transparent);
 
-         SolidColorBrush _orangeBk = new SolidColorBrush(Colors.Orange);
 
-         SolidColorBrush _blackBk = new SolidColorBrush(Colors.Black);
 
-         public SolidColorBrush StandbyBk
 
-         {
 
-             get
 
-             {
 
-                 if (!IsPM1Process && !IsPM1PostProcess)
 
-                     return _transparentBk;
 
-                 return ProcessFlowStatus == "Standby" ? _greenBk : _transparentBk;
 
-             }
 
-         }
 
-         public SolidColorBrush ReadyBk
 
-         {
 
-             get
 
-             {
 
-                 if (!IsPM1Process && !IsPM1PostProcess)
 
-                     return _transparentBk;
 
-                 return (ProcessFlowStatus == "Standby" || ProcessFlowStatus == "Ready") ? _greenBk : _transparentBk;
 
-             }
 
-         }
 
-         public SolidColorBrush EndBk
 
-         {
 
-             get
 
-             {
 
-                 if (!IsPM1Process && !IsPM1PostProcess)
 
-                     return _transparentBk;
 
-                 return ProcessFlowStatus == "End" ? _greenBk : _transparentBk;
 
-             }
 
-         }
 
-         public SolidColorBrush RunBk
 
-         {
 
-             get
 
-             {
 
-                 if (!IsPM1Process && !IsPM1PostProcess)
 
-                     return _transparentBk;
 
-                 return (ProcessFlowStatus == "End" || ProcessFlowStatus == "Run") ? _greenBk : _transparentBk;
 
-             }
 
-         }
 
-         public SolidColorBrush AbortBk
 
-         {
 
-             get
 
-             {
 
-                 if (!IsPM1Process && !IsPM1PostProcess)
 
-                     return _transparentBk;
 
-                 return ProcessFlowStatus == "Abort" ? _redBk : _transparentBk;
 
-             }
 
-         }
 
-         #region Job Staus
 
-         [Subscription("System.Batch")]
 
-         public string Batch { get; set; }
 
-         [Subscription("System.TransferJobStatus")]
 
-         public string TransferJobStatus { get; set; }
 
-         public SolidColorBrush TransferJobBk
 
-         {
 
-             get
 
-             {
 
-                 return TransferJobStatus == "Idle" || string.IsNullOrEmpty(TransferJobStatus) ? _transparentBk : _greenBk;
 
-             }
 
-         }
 
-         [Subscription("System.ProcessJobStatus")]
 
-         public string ProcessJobStatus { get; set; }
 
-         [Subscription("System.Pause")]
 
-         public bool IsPause { get; set; }
 
-         public string ProcessJobsStatus
 
-         {
 
-             get
 
-             {
 
-                 return (string.IsNullOrEmpty(Batch) || ProcessJobStatus == "Idle") ? ProcessJobStatus : $"{Batch} : {ProcessJobStatus}";
 
-             }
 
-         }
 
-         public SolidColorBrush ProcessJobBk
 
-         {
 
-             get
 
-             {
 
-                 if (IsPause)
 
-                 {
 
-                     return _orangeBk;
 
-                 }
 
-                 else
 
-                 {
 
-                     return ProcessJobStatus == "Idle" || string.IsNullOrEmpty(ProcessJobsStatus) ? _transparentBk : _greenBk;
 
-                 }
 
-                 return _transparentBk;
 
-             }
 
-         }
 
-         #endregion
 
-         #region SMIF
 
-         [Subscription("LP1.Status")]
 
-         public string LP1Status { get; set; }
 
-         public string Lp1StatusBackground
 
-         {
 
-             get { return ModuleStatusBackground.GetStatusBackground(LP1Status); }
 
-         }
 
-         [Subscription("Boat.Status")]
 
-         public string BoatStatus { get; set; }
 
-         public string BoatStatusBackground
 
-         {
 
-             get { return ModuleStatusBackground.GetStatusBackground(BoatStatus); }
 
-         }
 
-         [Subscription("LP2.Status")]
 
-         public string LP2Status { get; set; }
 
-         public string LP2StatusBackground
 
-         {
 
-             get { return ModuleStatusBackground.GetStatusBackground(LP2Status); }
 
-         }
 
-         #endregion
 
-         #region Stocker
 
-         private List<ModuleName> _stokcers;
 
-         private List<string> _stokcerWaferType;
 
-         private int _cassetteSlot = 0;
 
-         private ObservableCollection<string> _stockerSlots;
 
-         public ObservableCollection<string> StockerSlots
 
-         {
 
-             get { return _stockerSlots; }
 
-             set
 
-             {
 
-                 _stockerSlots = value;
 
-                 NotifyOfPropertyChange("StockerSlots");
 
-             }
 
-         }
 
-         private SolidColorBrush _WhiteFill = new SolidColorBrush(Colors.White);
 
-         private SolidColorBrush _productionFill = new SolidColorBrush((Color)ColorConverter.ConvertFromString("#bedadb"));
 
-         private SolidColorBrush _SD_ED_M_Fill = new SolidColorBrush((Color)ColorConverter.ConvertFromString("LightGray"));
 
-         private SolidColorBrush _waringFill = new SolidColorBrush(Colors.Yellow);
 
-         private SolidColorBrush _alarmFill = new SolidColorBrush(Colors.Red);
 
-         private List<SolidColorBrush> _stockerBackground = new List<SolidColorBrush>();
 
-         public List<SolidColorBrush> StockerBackground
 
-         {
 
-             get => _stockerBackground;
 
-             set
 
-             {
 
-                 _stockerBackground = value;
 
-                 NotifyOfPropertyChange(nameof(StockerBackground));
 
-             }
 
-         }
 
-         [Subscription("PM1.SensorStocker1.Value")]
 
-         public bool SensorStation1Presence { get; set; }
 
-         [Subscription("PM1.SensorStocker2.Value")]
 
-         public bool SensorStation2Presence { get; set; }
 
-         [Subscription("PM1.SensorStocker3.Value")]
 
-         public bool SensorStation3Presence { get; set; }
 
-         [Subscription("PM1.SensorStocker4.Value")]
 
-         public bool SensorStation4Presence { get; set; }
 
-         [Subscription("PM1.SensorStocker5.Value")]
 
-         public bool SensorStation5Presence { get; set; }
 
-         [Subscription("PM1.SensorStocker6.Value")]
 
-         public bool SensorStation6Presence { get; set; }
 
-         [Subscription("PM1.SensorStocker7.Value")]
 
-         public bool SensorStation7Presence { get; set; }
 
-         [Subscription("PM1.SensorStocker8.Value")]
 
-         public bool SensorStation8Presence { get; set; }
 
-         [Subscription("PM1.SensorStocker9.Value")]
 
-         public bool SensorStation9Presence { get; set; }
 
-         [Subscription("PM1.SensorStocker10.Value")]
 
-         public bool SensorStation10Presence { get; set; }
 
-         [Subscription("PM1.SensorStocker11.Value")]
 
-         public bool SensorStation11Presence { get; set; }
 
-         [Subscription("PM1.SensorStocker12.Value")]
 
-         public bool SensorStation12Presence { get; set; }
 
-         [Subscription("PM1.SensorStocker13.Value")]
 
-         public bool SensorStation13Presence { get; set; }
 
-         [Subscription("PM1.SensorStocker14.Value")]
 
-         public bool SensorStation14Presence { get; set; }
 
-         [Subscription("PM1.SensorStocker15.Value")]
 
-         public bool SensorStation15Presence { get; set; }
 
-         [Subscription("PM1.SensorStocker16.Value")]
 
-         public bool SensorStation16Presence { get; set; }
 
-         [Subscription("PM1.SensorStocker17.Value")]
 
-         public bool SensorStation17Presence { get; set; }
 
-         [Subscription("PM1.SensorStocker18.Value")]
 
-         public bool SensorStation18Presence { get; set; }
 
-         [Subscription("Stocker1.Carrier")]
 
-         public CarrierInfo Stocker1CarrierData { get; set; }
 
-         [Subscription("Stocker2.Carrier")]
 
-         public CarrierInfo Stocker2CarrierData { get; set; }
 
-         [Subscription("Stocker3.Carrier")]
 
-         public CarrierInfo Stocker3CarrierData { get; set; }
 
-         [Subscription("Stocker4.Carrier")]
 
-         public CarrierInfo Stocker4CarrierData { get; set; }
 
-         [Subscription("Stocker5.Carrier")]
 
-         public CarrierInfo Stocker5CarrierData { get; set; }
 
-         [Subscription("Stocker6.Carrier")]
 
-         public CarrierInfo Stocker6CarrierData { get; set; }
 
-         [Subscription("Stocker7.Carrier")]
 
-         public CarrierInfo Stocker7CarrierData { get; set; }
 
-         [Subscription("Stocker8.Carrier")]
 
-         public CarrierInfo Stocker8CarrierData { get; set; }
 
-         [Subscription("Stocker9.Carrier")]
 
-         public CarrierInfo Stocker9CarrierData { get; set; }
 
-         [Subscription("Stocker10.Carrier")]
 
-         public CarrierInfo Stocker10CarrierData { get; set; }
 
-         [Subscription("Stocker11.Carrier")]
 
-         public CarrierInfo Stocker11CarrierData { get; set; }
 
-         [Subscription("Stocker12.Carrier")]
 
-         public CarrierInfo Stocker12CarrierData { get; set; }
 
-         [Subscription("Stocker13.Carrier")]
 
-         public CarrierInfo Stocker13CarrierData { get; set; }
 
-         [Subscription("Stocker14.Carrier")]
 
-         public CarrierInfo Stocker14CarrierData { get; set; }
 
-         [Subscription("Stocker15.Carrier")]
 
-         public CarrierInfo Stocker15CarrierData { get; set; }
 
-         [Subscription("Stocker16.Carrier")]
 
-         public CarrierInfo Stocker16CarrierData { get; set; }
 
-         [Subscription("Stocker17.Carrier")]
 
-         public CarrierInfo Stocker17CarrierData { get; set; }
 
-         [Subscription("Stocker18.Carrier")]
 
-         public CarrierInfo Stocker18CarrierData { get; set; }
 
-         [Subscription("CarrierRobot.Carrier")]
 
-         public CarrierInfo CassetteRobotCarrierData { get; set; }
 
-         [Subscription("FIMS1.Carrier")]
 
-         public CarrierInfo FIMS1CarrierData { get; set; }
 
-         [Subscription("FIMS2.Carrier")]
 
-         public CarrierInfo FIMS2CarrierData { get; set; }
 
-         [Subscription("LP1.Carrier")]
 
-         public CarrierInfo LP1CarrierData { get; set; }
 
-         [Subscription("LP2.Carrier")]
 
-         public CarrierInfo LP2CarrierData { get; set; }
 
-         [Subscription("LP3.Carrier")]
 
-         public CarrierInfo LP3CarrierData { get; set; }
 
-         [Subscription("LP4.Carrier")]
 
-         public CarrierInfo LP4CarrierData { get; set; }
 
-         public int Stocker1WaferCount { get; set; } = 0;
 
-         public int Stocker2WaferCount { get; set; } = 0;
 
-         public int Stocker3WaferCount { get; set; } = 0;
 
-         public int Stocker4WaferCount { get; set; } = 0;
 
-         public int Stocker5WaferCount { get; set; } = 0;
 
-         public int Stocker6WaferCount { get; set; } = 0;
 
-         public int Stocker7WaferCount { get; set; } = 0;
 
-         public int Stocker8WaferCount { get; set; } = 0;
 
-         public int Stocker9WaferCount { get; set; } = 0;
 
-         public int Stocker10WaferCount { get; set; } = 0;
 
-         public int Stocker11WaferCount { get; set; } = 0;
 
-         public int Stocker12WaferCount { get; set; } = 0;
 
-         public int Stocker13WaferCount { get; set; } = 0;
 
-         public int Stocker14WaferCount { get; set; } = 0;
 
-         public int Stocker15WaferCount { get; set; } = 0;
 
-         public int Stocker16WaferCount { get; set; } = 0;
 
-         public int Stocker17WaferCount { get; set; } = 0;
 
-         public int Stocker18WaferCount { get; set; } = 0;
 
-         #endregion
 
-         #region Heater
 
-         [Subscription("System.HeaterU.DeviceData")]
 
-         public AITHeaterData HeaterUData { get; set; }
 
-         [Subscription("System.HeaterCU.DeviceData")]
 
-         public AITHeaterData HeaterCUData { get; set; }
 
-         [Subscription("System.HeaterC.DeviceData")]
 
-         public AITHeaterData HeaterCData { get; set; }
 
-         [Subscription("System.HeaterCL.DeviceData")]
 
-         public AITHeaterData HeaterCLData { get; set; }
 
-         [Subscription("System.HeaterL.DeviceData")]
 
-         public AITHeaterData HeaterLData { get; set; }
 
-         public AITHeaterData BottomHeaterData => HeaterLData;
 
-         public AITHeaterData CenterBottomHeaterData => HeaterCLData;
 
-         public AITHeaterData CenterHeaterData => HeaterCData;
 
-         public AITHeaterData TopCenterHeaterData => HeaterCUData;
 
-         public AITHeaterData TopHeaterData => HeaterUData;
 
-         public int ControlMode => HeaterUData.ControlMode;
 
-         #endregion
 
-         #region Robot
 
-         [Subscription("WaferRobot.Status")]
 
-         public string WaferRobotStatus { get; set; }
 
-         public string WaferRobotStatusBackground
 
-         {
 
-             get { return ModuleStatusBackground.GetStatusBackground(WaferRobotStatus); }
 
-         }
 
-         [Subscription("CarrierRobot.Status")]
 
-         public string CarrierRobotStatus { get; set; }
 
-         public string CarrierRobotStatusBackground
 
-         {
 
-             get { return ModuleStatusBackground.GetStatusBackground(CarrierRobotStatus); }
 
-         }
 
-         #endregion
 
-         #region StockerCarrierType
 
-         private string GetStockerCarrierType(CarrierInfo carrierInfo)
 
-         {
 
-             if (carrierInfo != null && carrierInfo.Status == CarrierStatus.Normal)
 
-             {
 
-                 if (carrierInfo.IsProcessed(carrierInfo.Name))
 
-                 {
 
-                     return "Process";
 
-                 }
 
-                 return carrierInfo.CarrierType.ToString();
 
-             }
 
-             return "";
 
-         }
 
-         public string Stocker1CarrierType
 
-         {
 
-             get
 
-             {
 
-                 return GetStockerCarrierType(Stocker1CarrierData);
 
-             }
 
-         }
 
-         public string Stocker2CarrierType
 
-         {
 
-             get
 
-             {
 
-                 return GetStockerCarrierType(Stocker2CarrierData);
 
-             }
 
-         }
 
-         public string Stocker3CarrierType
 
-         {
 
-             get
 
-             {
 
-                 return GetStockerCarrierType(Stocker3CarrierData);
 
-             }
 
-         }
 
-         public string Stocker4CarrierType
 
-         {
 
-             get
 
-             {
 
-                 return GetStockerCarrierType(Stocker4CarrierData);
 
-             }
 
-         }
 
-         public string Stocker5CarrierType
 
-         {
 
-             get
 
-             {
 
-                 return GetStockerCarrierType(Stocker5CarrierData);
 
-             }
 
-         }
 
-         public string Stocker6CarrierType
 
-         {
 
-             get
 
-             {
 
-                 return GetStockerCarrierType(Stocker6CarrierData);
 
-             }
 
-         }
 
-         public string Stocker7CarrierType
 
-         {
 
-             get
 
-             {
 
-                 return GetStockerCarrierType(Stocker7CarrierData);
 
-             }
 
-         }
 
-         public string Stocker8CarrierType
 
-         {
 
-             get
 
-             {
 
-                 return GetStockerCarrierType(Stocker8CarrierData);
 
-             }
 
-         }
 
-         public string Stocker9CarrierType
 
-         {
 
-             get
 
-             {
 
-                 return GetStockerCarrierType(Stocker9CarrierData);
 
-             }
 
-         }
 
-         public string Stocker10CarrierType
 
-         {
 
-             get
 
-             {
 
-                 return GetStockerCarrierType(Stocker10CarrierData);
 
-             }
 
-         }
 
-         public string Stocker11CarrierType
 
-         {
 
-             get
 
-             {
 
-                 return GetStockerCarrierType(Stocker11CarrierData);
 
-             }
 
-         }
 
-         public string Stocker12CarrierType
 
-         {
 
-             get
 
-             {
 
-                 return GetStockerCarrierType(Stocker12CarrierData);
 
-             }
 
-         }
 
-         public string Stocker13CarrierType
 
-         {
 
-             get
 
-             {
 
-                 return GetStockerCarrierType(Stocker13CarrierData);
 
-             }
 
-         }
 
-         public string Stocker14CarrierType
 
-         {
 
-             get
 
-             {
 
-                 return GetStockerCarrierType(Stocker14CarrierData);
 
-             }
 
-         }
 
-         public string Stocker15CarrierType
 
-         {
 
-             get
 
-             {
 
-                 return GetStockerCarrierType(Stocker15CarrierData);
 
-             }
 
-         }
 
-         public string Stocker16CarrierType
 
-         {
 
-             get
 
-             {
 
-                 return GetStockerCarrierType(Stocker16CarrierData);
 
-             }
 
-         }
 
-         public string Stocker17CarrierType
 
-         {
 
-             get
 
-             {
 
-                 return GetStockerCarrierType(Stocker17CarrierData);
 
-             }
 
-         }
 
-         public string Stocker18CarrierType
 
-         {
 
-             get
 
-             {
 
-                 return GetStockerCarrierType(Stocker18CarrierData);
 
-             }
 
-         }
 
-         #endregion
 
-         #region PM
 
-         [Subscription("PM1.Status")]
 
-         public string PM1Status { get; set; }
 
-         [Subscription("PM1.RecipeBeginTime")]
 
-         public DateTime PM1RecipeBeginTime { get; set; }
 
-         [Subscription("PM1.RecipeStepName")]
 
-         public string PM1RecipeStepName { get; set; }
 
-         [Subscription("PM1.RecipeNextStepName")]
 
-         public string PM1RecipeNextStepName { get; set; }
 
-         [Subscription("PM1.RecipeStepNumber")]
 
-         public int PM1RecipeStepNumber { get; set; }
 
-         [Subscription("PM1.RecipeStepElapseTime")]
 
-         public double PM1RecipeStepElapseTime { get; set; }
 
-         [Subscription("PM1.RecipeStepTime")]
 
-         public double PM1RecipeStepTime { get; set; }
 
-         [Subscription("PM1.RecipeTotalElapseTime")]
 
-         public double PM1RecipeTotalElapseTime { get; set; }
 
-         [Subscription("PM1.RecipeTotalTime")]
 
-         public double PM1RecipeTotalTime { get; set; }
 
-         [Subscription("PM1.RecipeHoldTime")]
 
-         public double PM1RecipeHoldTime { get; set; }
 
-         [Subscription("PM1.RecipeHold")]
 
-         public bool PM1RecipeHold { get; set; }
 
-         [Subscription("PM1.RecipeHolded")]
 
-         public bool PM1RecipeHolded { get; set; }
 
-         [Subscription("PM1.RecipeWait")]
 
-         public bool PM1RecipeWait { get; set; }
 
-         [Subscription("PM1.NewShowTime")]
 
-         public double PM1NewShowTime { get; set; }
 
-         [Subscription("PM1.IsExecuteAbortRecipe")]
 
-         public bool PM1IsExecuteAbortRecipe { get; set; }
 
-         [Subscription("PM1.ExecRecipeType")]
 
-         public string PM1ExecRecipeType { get; set; }
 
-         [Subscription("PM1.LoopCountSet")]
 
-         public int PM1LoopCountSet { get; set; }
 
-         [Subscription("PM1.LoopCountCurrent")]
 
-         public int PM1LoopCountCurrent { get; set; }
 
-         [Subscription("PM1.IsLooping")]
 
-         public bool PM1IsLooping { get; set; }
 
-         [Subscription("Scheduler.CoolingTime")]
 
-         public int CoolingTime { get; set; }
 
-         [Subscription("Scheduler.CoolingRemainTime")]
 
-         public int CoolingRemainTime { get; set; }
 
-         public string LoopInfo
 
-         {
 
-             get
 
-             {
 
-                 if (!IsPM1Process || !PM1IsLooping)
 
-                     return "--";
 
-                 return $"{PM1ExecRecipeType} : {PM1LoopCountCurrent} / {PM1LoopCountSet}";
 
-             }
 
-         }
 
-         [Subscription("PM1.SubRecipeCurrentLoopCount")]
 
-         public int PM1SubRecipeCurrentLoopCount { get; set; }
 
-         [Subscription("PM1.ProcessSubRecipe")]
 
-         public string ProcessSubRecipe { get; set; }
 
-         [Subscription("PM1.ProcessAbortRecipe")]
 
-         public string ProcessAbortRecipe { get; set; }
 
-         [Subscription("PM1.SubRecipeLoopCount")]
 
-         public int PM1SubRecipeLoopCount { get; set; }
 
-         [Subscription("PM1.IsExecuteSubRecipe")]
 
-         public bool PM1IsExecuteSubRecipe { get; set; }
 
-         [Subscription("PM1.ProcessSubRecipeTable")]
 
-         public string PM1SubTable { get; set; }
 
-         public string SubInfo
 
-         {
 
-             get
 
-             {
 
-                 if (!IsPM1Process || !PM1IsExecuteSubRecipe)
 
-                     return "--";
 
-                 return $"{PM1ExecRecipeType} : {PM1SubRecipeCurrentLoopCount} / {PM1SubRecipeLoopCount}";
 
-             }
 
-         }
 
-         public bool IsPM1Idle
 
-         {
 
-             get { return PM1Status == "Idle"; }
 
-         }
 
-         public bool IsPM1Process
 
-         {
 
-             get { return PM1Status == "Process"; }
 
-         }
 
-         public bool IsPM1PostProcess
 
-         {
 
-             get { return PM1Status == "PostProcess"; }
 
-         }
 
-         public bool IsPM1PreProcess
 
-         {
 
-             get { return PM1Status == "PreProcess"; }
 
-         }
 
-         public string PM1StepNumber
 
-         {
 
-             get
 
-             {
 
-                 if (!IsPM1Process && !IsPM1PostProcess)
 
-                     return "--";
 
-                 return $"{PM1RecipeStepNumber}";
 
-             }
 
-         }
 
-         public string PM1StepName
 
-         {
 
-             get
 
-             {
 
-                 if (!IsPM1Process && !IsPM1PostProcess)
 
-                     return "--";
 
-                 return $"{PM1RecipeStepName}";
 
-             }
 
-         }
 
-         public string PM1NextStepName
 
-         {
 
-             get
 
-             {
 
-                 if (!IsPM1Process && !IsPM1PostProcess)
 
-                     return "--";
 
-                 return $"{PM1RecipeNextStepName}";
 
-             }
 
-         }
 
-         public string PM1BeginTime
 
-         {
 
-             get
 
-             {
 
-                 if (!IsPM1Process && !IsPM1PostProcess)
 
-                     return "--";
 
-                 return $"{PM1RecipeBeginTime.ToString("yyyy-MM-dd HH:mm:ss")}";
 
-             }
 
-         }
 
-         private bool isCoolingFrist = false;
 
-         private DateTime firstCoolingTime = DateTime.MinValue;
 
-         public string PM1EndTime
 
-         {
 
-             get
 
-             {
 
-                 if (LocalProcessJobs != null && LocalProcessJobs.Where(x => x.ProcessingState == EnumProcessingState.CoolingBeforeDischarge) != null)
 
-                 {
 
-                     if (!isCoolingFrist)
 
-                     {
 
-                         TimeSpan secondSpan = DateTime.Now - PM1RecipeBeginTime;
 
-                         firstCoolingTime = PM1RecipeBeginTime.AddSeconds(secondSpan.TotalSeconds + PM1RecipeTotalTime - PM1RecipeTotalElapseTime);
 
-                         isCoolingFrist = true;
 
-                     }
 
-                 }
 
-                 if (!IsPM1Process && !IsPM1PostProcess)
 
-                     return "--";
 
-                 if (isCoolingFrist)
 
-                 {
 
-                     isCoolingFrist = false;
 
-                     firstCoolingTime = DateTime.MinValue;
 
-                 }
 
-                 return $"{CalEndTime(PM1RecipeBeginTime, PM1RecipeTotalTime, PM1RecipeTotalElapseTime)}";
 
-             }
 
-         }
 
-         public string PM1StepTime
 
-         {
 
-             get
 
-             {
 
-                 if (!IsPM1Process && !IsPM1PostProcess)
 
-                     return "--";
 
-                 if (PM1RecipeHolded && PM1RecipeHoldTime > 0)
 
-                     return "--";
 
-                 return CalStepTime(PM1RecipeStepElapseTime, PM1RecipeStepTime);
 
-             }
 
-         }
 
-         public string PM1RecipeTime
 
-         {
 
-             get
 
-             {
 
-                 if (!IsPM1Process && !IsPM1PostProcess)
 
-                     return "--";
 
-                 return CalRecipeTime(PM1RecipeTotalElapseTime, PM1RecipeTotalTime);
 
-             }
 
-         }
 
-         public string PM1HoldTime
 
-         {
 
-             get
 
-             {
 
-                 if (!IsPM1Process && !IsPM1PostProcess)
 
-                     return "--";
 
-                 return CalHoldTime(PM1NewShowTime);
 
-             }
 
-         }
 
-         public string PM1HoldName
 
-         {
 
-             get
 
-             {
 
-                 return "Hold Time";
 
-             }
 
-         }
 
-         public string HoldName
 
-         {
 
-             get
 
-             {
 
-                 if (PM1RecipeHold)
 
-                     return "Continue";
 
-                 return "Hold";
 
-             }
 
-         }
 
-         public string HoldWaitDisplay
 
-         {
 
-             get
 
-             {
 
-                 if (PM1Status == "Idle")
 
-                 {
 
-                     return "";
 
-                 }
 
-                 else
 
-                 {
 
-                     if (PM1RecipeWait)
 
-                         return "W";
 
-                     if (PM1RecipeHolded)
 
-                         return "H";
 
-                     return "";
 
-                 }
 
-             }
 
-         }
 
-         public SolidColorBrush HoldForeground
 
-         {
 
-             get
 
-             {
 
-                 if (PM1RecipeHold)
 
-                     return _blackBk;
 
-                 return _redBk;
 
-             }
 
-         }
 
-         [Subscription("PM1.SelectedRecipeName")]
 
-         public string PM1SelectedRecipeName
 
-         {
 
-             get;
 
-             set;
 
-         }
 
-         [Subscription("PM1.MainRecipeName")]
 
-         public string PM1MainRecipeName
 
-         {
 
-             get;
 
-             set;
 
-         }
 
-         public string PM1SelectedRecipeNameDisplay
 
-         {
 
-             get
 
-             {
 
-                 if (string.IsNullOrEmpty(PM1SelectedRecipeName))
 
-                     return string.Empty;
 
-                 if (!IsPM1Process && !IsPM1PostProcess)
 
-                     return string.Empty;
 
-                 if (PM1IsExecuteSubRecipe && !string.IsNullOrEmpty(ProcessSubRecipe))
 
-                 {
 
-                     return Path.GetFileName(ProcessSubRecipe);
 
-                 }
 
-                 //return PM1SelectedRecipeName.Substring("Furnace\\Process\\".Length);
 
-                 return Path.GetFileName(PM1SelectedRecipeName);
 
-             }
 
-         }
 
-         [Subscription("PM1.IsOnline")]
 
-         public bool PM1IsOnline { get; set; }
 
-         public bool PM1IsOffline
 
-         {
 
-             get { return !PM1IsOnline; }
 
-         }
 
-         public bool IsEnableEmergencyAbort
 
-         {
 
-             get
 
-             {
 
-                 return PM1Status != "Init" && PM1Status != "Idle";
 
-             }
 
-         }
 
-         private string CalStepTime(double elapseTime, double totalTime)
 
-         {
 
-             string stepTime = string.Empty;
 
-             double remainingTime = totalTime - elapseTime;
 
-             if (remainingTime < 0)
 
-                 remainingTime = 0;
 
-             string strElapseTimeH = $"{(elapseTime / 3600).ToString().PadLeft(2, '0')}";
 
-             string strElapseTimeM = $"{(elapseTime % 3600 / 60).ToString().PadLeft(2, '0')}";
 
-             string strElapseTimeS = $"{(elapseTime % 60).ToString().PadLeft(2, '0')}";
 
-             string strRemainingTimeH = $"{((int)(remainingTime / 3600)).ToString("f0").PadLeft(2, '0')}";
 
-             string strRemainingTimeM = $"{((int)(remainingTime % 3600 / 60)).ToString("f0").PadLeft(2, '0')}";
 
-             string strRemainingTimeS = $"{(remainingTime % 60).ToString("f1").PadLeft(2, '0')}";
 
-             stepTime = $"{strRemainingTimeH}:{strRemainingTimeM}:{strRemainingTimeS}";
 
-             return stepTime;
 
-         }
 
-         private string CalRecipeTime(double elapseTime, double totalTime)
 
-         {
 
-             string recipeTime = string.Empty;
 
-             double remainingTime = totalTime - elapseTime;
 
-             if (remainingTime < 0)
 
-                 remainingTime = 0;
 
-             string strElapseTimeH = $"{(elapseTime / 3600).ToString("f0").PadLeft(2, '0')}";
 
-             string strElapseTimeM = $"{(elapseTime % 3600 / 60).ToString("f0").PadLeft(2, '0')}";
 
-             string strElapseTimeS = $"{(elapseTime % 60).ToString("f0").PadLeft(2, '0')}";
 
-             string strRemainingTimeH = $"{((int)(remainingTime / 3600)).ToString("f0").PadLeft(2, '0')}";
 
-             string strRemainingTimeM = $"{((int)(remainingTime % 3600 / 60)).ToString("f0").PadLeft(2, '0')}";
 
-             string strRemainingTimeS = $"{(remainingTime % 60).ToString("f1").PadLeft(2, '0')}";
 
-             recipeTime = $"{strRemainingTimeH}:{strRemainingTimeM}:{strRemainingTimeS}";
 
-             return recipeTime;
 
-         }
 
-         private string CalHoldTime(double totalTime)
 
-         {
 
-             string holdTime = string.Empty;
 
-             string strHoldTimeH = $"{((int)(totalTime / 3600)).ToString("f0").PadLeft(2, '0')}";
 
-             string strHoldTimeM = $"{((int)(totalTime % 3600 / 60)).ToString("f0").PadLeft(2, '0')}";
 
-             string strHoldTimeS = $"{(totalTime % 60).ToString("f1").PadLeft(2, '0')}";
 
-             holdTime = $"{strHoldTimeH}:{strHoldTimeM}:{strHoldTimeS}";
 
-             return holdTime;
 
-         }
 
-         private string _recipeProgress;
 
-         public string RecipeProgress
 
-         {
 
-             get => _recipeProgress;
 
-             set
 
-             {
 
-                 _recipeProgress = value;
 
-                 NotifyOfPropertyChange(nameof(RecipeProgress));
 
-             }
 
-         }
 
-         private int _recipeProgressValue;
 
-         public int RecipeProgressValue
 
-         {
 
-             get => _recipeProgressValue;
 
-             set
 
-             {
 
-                 _recipeProgressValue = value;
 
-                 NotifyOfPropertyChange(nameof(RecipeProgressValue));
 
-             }
 
-         }
 
-         #endregion
 
-         #region Scheduler
 
-         public bool IsRtInitialized
 
-         {
 
-             get
 
-             {
 
-                 return RtStatus != "Init" && RtStatus != "Initializing";
 
-             }
 
-         }
 
-         public bool IsRtRunning
 
-         {
 
-             get
 
-             {
 
-                 return RtStatus != "Init" && RtStatus != "Idle" && RtStatus != "AutoIdle";
 
-             }
 
-         }
 
-         public bool IsRtError
 
-         {
 
-             get
 
-             {
 
-                 return RtStatus == "Error";
 
-             }
 
-         }
 
-         public bool IsAuto
 
-         {
 
-             get { return RtStatus == "Auto_Running" || RtStatus == "Auto_Idle"; }
 
-         }
 
-         [Subscription("Rt.Status")]
 
-         public string RtStatus { get; set; }
 
-         public bool _isCycleMode;
 
-         public Visibility IsCycleInfoVisibility
 
-         {
 
-             get { return _isCycleMode ? Visibility.Visible : Visibility.Collapsed; }
 
-         }
 
-         [Subscription("Scheduler.CycledCount")]
 
-         public int CycledCount { get; set; }
 
-         [Subscription("Scheduler.CycledWafer")]
 
-         public int CycledWafer { get; set; }
 
-         [Subscription("Scheduler.CycledTotalWafer")]
 
-         public int TotalCycledWafer { get; set; }
 
-         [Subscription("Scheduler.CycleSetPoint")]
 
-         public int CycleSetPoint { get; set; }
 
-         public string CycleCountDisplay
 
-         {
 
-             get { return (CycleSetPoint > 0 && (CycledCount > CycleSetPoint)) ? $"{CycledCount + 1}/{CycleSetPoint}" : $"{CycledCount}/{CycleSetPoint}"; }
 
-         }
 
-         [Subscription("Scheduler.ControlJobList")]
 
-         public List<ControlJobInfo> LocalControlJobs
 
-         {
 
-             get;
 
-             set;
 
-         }
 
-         [Subscription("Scheduler.ProcessJobList")]
 
-         public List<ProcessJobInfo> LocalProcessJobs
 
-         {
 
-             get;
 
-             set;
 
-         }
 
-         public string ControlJobStatus
 
-         {
 
-             get
 
-             {
 
-                 if (LocalControlJobs == null || LocalControlJobs.Count == 0)
 
-                     return "";
 
-                 foreach (var cj in LocalControlJobs)
 
-                 {
 
-                     if (cj == null)
 
-                         continue;
 
-                     return cj.State.ToString();
 
-                 }
 
-                 return "";
 
-             }
 
-         }
 
-         public string ControlJob1ID
 
-         {
 
-             get
 
-             {
 
-                 if (LocalControlJobs == null || LocalControlJobs.Count == 0)
 
-                     return "";
 
-                 var cj = LocalControlJobs[0];
 
-                 return cj.Name;
 
-             }
 
-         }
 
-         public string ControlJob2ID
 
-         {
 
-             get
 
-             {
 
-                 if (LocalControlJobs == null || LocalControlJobs.Count <= 1)
 
-                     return "";
 
-                 var cj = LocalControlJobs[1];
 
-                 return cj.Name;
 
-             }
 
-         }
 
-         public string ProcessJob1ID
 
-         {
 
-             get
 
-             {
 
-                 if (LocalProcessJobs == null || LocalProcessJobs.Count == 0)
 
-                     return "";
 
-                 var pj = LocalProcessJobs[0];
 
-                 return pj.Name;
 
-             }
 
-         }
 
-         public string ProcessJob1StartTime
 
-         {
 
-             get
 
-             {
 
-                 if (LocalProcessJobs == null || LocalProcessJobs.Count == 0)
 
-                     return "";
 
-                 var pj = LocalProcessJobs[0];
 
-                 return pj.BeginTime.ToString("yyyy-MM-dd HH:mm:ss");
 
-             }
 
-         }
 
-         public string TotolProcessJob1EndTime
 
-         {
 
-             get
 
-             {
 
-                 if (LocalProcessJobs == null || LocalProcessJobs.Count == 0)
 
-                     return "";
 
-                 var pj = LocalProcessJobs[0];
 
-                 var beginTime = pj.BeginTime;
 
-                 if (pj.BeginTime.Equals(DateTime.MinValue))
 
-                 {
 
-                     return "";
 
-                 }
 
-                 if (pj.ProcessingState == EnumProcessingState.CoolingBeforeDischarge && !firstCoolingTime.Equals(DateTime.MinValue))
 
-                 {
 
-                     return firstCoolingTime.AddSeconds(CoolingTime).ToString("yyyy-MM-dd HH:mm:ss");
 
-                 }
 
-                 else
 
-                 {
 
-                     if (!IsPM1Process && !IsPM1PostProcess)
 
-                         return "--";
 
-                     TimeSpan secondSpan = DateTime.Now - beginTime;
 
-                     var retime = beginTime.AddSeconds(CoolingTime + secondSpan.TotalSeconds + PM1RecipeTotalTime - PM1RecipeTotalElapseTime);
 
-                     return retime.ToString("yyyy-MM-dd HH:mm:ss");
 
-                 }
 
-             }
 
-         }
 
-         public string ProcessJob1Status
 
-         {
 
-             get
 
-             {
 
-                 if (LocalProcessJobs == null || LocalProcessJobs.Count == 0)
 
-                     return "";
 
-                 var pj = LocalProcessJobs[0];
 
-                 return pj.ProcessingState.ToString();
 
-             }
 
-         }
 
-         public string TotolProcessJob2EndTime
 
-         {
 
-             get
 
-             {
 
-                 if (LocalProcessJobs == null || LocalProcessJobs.Count <= 1)
 
-                     return "";
 
-                 var pj = LocalProcessJobs[1];
 
-                 var beginTime = pj.BeginTime;
 
-                 if (pj.BeginTime.Equals(DateTime.MinValue))
 
-                 {
 
-                     return "";
 
-                 }
 
-                 if (pj.ProcessingState == EnumProcessingState.CoolingBeforeDischarge && !firstCoolingTime.Equals(DateTime.MinValue))
 
-                 {
 
-                     return firstCoolingTime.AddSeconds(CoolingTime).ToString("yyyy-MM-dd HH:mm:ss");
 
-                 }
 
-                 else
 
-                 {
 
-                     if (!IsPM1Process && !IsPM1PostProcess)
 
-                         return "--";
 
-                     TimeSpan secondSpan = DateTime.Now - beginTime;
 
-                     var retime = beginTime.AddSeconds(CoolingTime + secondSpan.TotalSeconds + PM1RecipeTotalTime - PM1RecipeTotalElapseTime);
 
-                     return retime.ToString("yyyy-MM-dd HH:mm:ss");
 
-                 }
 
-             }
 
-         }
 
-         public string ProcessJob2ID
 
-         {
 
-             get
 
-             {
 
-                 if (LocalProcessJobs == null || LocalProcessJobs.Count <= 1)
 
-                     return "";
 
-                 var pj = LocalProcessJobs[1];
 
-                 return pj.Name;
 
-             }
 
-         }
 
-         public string ProcessJob2StartTime
 
-         {
 
-             get
 
-             {
 
-                 if (LocalProcessJobs == null || LocalProcessJobs.Count <= 1)
 
-                     return "";
 
-                 var pj = LocalProcessJobs[1];
 
-                 if (pj.BeginTime.Equals(DateTime.MinValue))
 
-                 {
 
-                     return "------";
 
-                 }
 
-                 return pj.BeginTime.ToString("yyyy-MM-dd HH:mm:ss");
 
-             }
 
-         }
 
-         public string ProcessJob2Status
 
-         {
 
-             get
 
-             {
 
-                 if (LocalProcessJobs == null || LocalProcessJobs.Count <= 1)
 
-                     return "";
 
-                 var pj = LocalProcessJobs[1];
 
-                 return pj.ProcessingState.ToString();
 
-             }
 
-         }
 
-         #endregion
 
-         #region Button Logic
 
-         #endregion
 
-         #region shutter
 
-         [Subscription("AutoShutter.OpenCloseStatus")]
 
-         public string AutoShutterOpenCloseStatus { get; set; }
 
-         [Subscription("AutoShutter.UpDownStatus")]
 
-         public string AutoShutterUpDownStatus { get; set; }
 
-         public string AutoShutterStatus => $"{AutoShutterOpenCloseStatus}/{AutoShutterUpDownStatus}";
 
-         #endregion
 
-         #endregion
 
-         public string DefaultUnit { get; set; }
 
-         [Subscription("PM1.N2PurgeMode")]
 
-         public string N2PurgeMode { get; set; }
 
-         #region Gas
 
-         [Subscription("PM1.MFCList")]
 
-         public List<AITMfcData> MFCList { get; set; }
 
-         #endregion
 
-         [Subscription("CarrierRobot.Status")]
 
-         public string CassetteRobotStatus { get; set; }
 
-         private Visibility _isStocker1Visibility = Visibility.Collapsed;
 
-         public Visibility IsStocker1Visibility
 
-         {
 
-             get { return _isStocker1Visibility; }
 
-             set { _isStocker1Visibility = value; this.NotifyOfPropertyChange(nameof(IsStocker1Visibility)); }
 
-         }
 
-         private Visibility _isStocker2Visibility = Visibility.Collapsed;
 
-         public Visibility IsStocker2Visibility
 
-         {
 
-             get { return _isStocker2Visibility; }
 
-             set { _isStocker2Visibility = value; this.NotifyOfPropertyChange(nameof(IsStocker2Visibility)); }
 
-         }
 
-         private Visibility _isStocker3Visibility = Visibility.Collapsed;
 
-         public Visibility IsStocker3Visibility
 
-         {
 
-             get { return _isStocker3Visibility; }
 
-             set { _isStocker3Visibility = value; this.NotifyOfPropertyChange(nameof(IsStocker3Visibility)); }
 
-         }
 
-         private Visibility _isStocker4Visibility = Visibility.Collapsed;
 
-         public Visibility IsStocker4Visibility
 
-         {
 
-             get { return _isStocker4Visibility; }
 
-             set { _isStocker4Visibility = value; this.NotifyOfPropertyChange(nameof(IsStocker4Visibility)); }
 
-         }
 
-         private Visibility _isStocker5Visibility = Visibility.Collapsed;
 
-         public Visibility IsStocker5Visibility
 
-         {
 
-             get { return _isStocker5Visibility; }
 
-             set { _isStocker5Visibility = value; this.NotifyOfPropertyChange(nameof(_isStocker5Visibility)); }
 
-         }
 
-         private Visibility _isStocker6Visibility = Visibility.Collapsed;
 
-         public Visibility IsStocker6Visibility
 
-         {
 
-             get { return _isStocker6Visibility; }
 
-             set { _isStocker6Visibility = value; this.NotifyOfPropertyChange(nameof(IsStocker6Visibility)); }
 
-         }
 
-         private Visibility _isStocker7Visibility = Visibility.Collapsed;
 
-         public Visibility IsStocker7Visibility
 
-         {
 
-             get { return _isStocker7Visibility; }
 
-             set { _isStocker7Visibility = value; this.NotifyOfPropertyChange(nameof(IsStocker7Visibility)); }
 
-         }
 
-         private Visibility _isStocker8Visibility = Visibility.Collapsed;
 
-         public Visibility IsStocker8Visibility
 
-         {
 
-             get { return _isStocker8Visibility; }
 
-             set { _isStocker8Visibility = value; this.NotifyOfPropertyChange(nameof(IsStocker8Visibility)); }
 
-         }
 
-         private Visibility _isStocker9Visibility = Visibility.Collapsed;
 
-         public Visibility IsStocker9Visibility
 
-         {
 
-             get { return _isStocker9Visibility; }
 
-             set { _isStocker9Visibility = value; this.NotifyOfPropertyChange(nameof(IsStocker9Visibility)); }
 
-         }
 
-         private Visibility _isStocker10Visibility = Visibility.Collapsed;
 
-         public Visibility IsStocker10Visibility
 
-         {
 
-             get { return _isStocker10Visibility; }
 
-             set { _isStocker10Visibility = value; this.NotifyOfPropertyChange(nameof(IsStocker10Visibility)); }
 
-         }
 
-         private Visibility _isStocker11Visibility = Visibility.Collapsed;
 
-         public Visibility IsStocker11Visibility
 
-         {
 
-             get { return _isStocker11Visibility; }
 
-             set { _isStocker11Visibility = value; this.NotifyOfPropertyChange(nameof(IsStocker11Visibility)); }
 
-         }
 
-         private Visibility _isStocker12Visibility = Visibility.Collapsed;
 
-         public Visibility IsStocker12Visibility
 
-         {
 
-             get { return _isStocker12Visibility; }
 
-             set { _isStocker12Visibility = value; this.NotifyOfPropertyChange(nameof(IsStocker12Visibility)); }
 
-         }
 
-         private Visibility _isStocker13Visibility = Visibility.Collapsed;
 
-         public Visibility IsStocker13Visibility
 
-         {
 
-             get { return _isStocker13Visibility; }
 
-             set { _isStocker13Visibility = value; this.NotifyOfPropertyChange(nameof(IsStocker13Visibility)); }
 
-         }
 
-         private Visibility _isStocker14Visibility = Visibility.Collapsed;
 
-         public Visibility IsStocker14Visibility
 
-         {
 
-             get { return _isStocker14Visibility; }
 
-             set { _isStocker14Visibility = value; this.NotifyOfPropertyChange(nameof(IsStocker14Visibility)); }
 
-         }
 
-         private Visibility _isStocker15Visibility = Visibility.Collapsed;
 
-         public Visibility IsStocker15Visibility
 
-         {
 
-             get { return _isStocker15Visibility; }
 
-             set { _isStocker15Visibility = value; this.NotifyOfPropertyChange(nameof(IsStocker15Visibility)); }
 
-         }
 
-         private Visibility _isStocker16Visibility = Visibility.Collapsed;
 
-         public Visibility IsStocker16Visibility
 
-         {
 
-             get { return _isStocker16Visibility; }
 
-             set { _isStocker16Visibility = value; this.NotifyOfPropertyChange(nameof(IsStocker16Visibility)); }
 
-         }
 
-         private Visibility _isStocker17Visibility = Visibility.Collapsed;
 
-         public Visibility IsStocker17Visibility
 
-         {
 
-             get { return _isStocker17Visibility; }
 
-             set { _isStocker17Visibility = value; this.NotifyOfPropertyChange(nameof(IsStocker17Visibility)); }
 
-         }
 
-         private Visibility _isStocker18Visibility = Visibility.Collapsed;
 
-         public Visibility IsStocker18Visibility
 
-         {
 
-             get { return _isStocker18Visibility; }
 
-             set { _isStocker18Visibility = value; this.NotifyOfPropertyChange(nameof(IsStocker18Visibility)); }
 
-         }
 
-         public Visibility IsStockerVisibility { get; set; }
 
-         public Visibility IsLPVisibility { get; set; }
 
-         [Subscription("PM1.APC.DeviceData")]
 
-         public AITAPCData APCData { get; set; }
 
-         [Subscription("PM1.ValveAV75.DeviceData")]
 
-         public AITValveData ValveAV75 { get; set; }
 
-         public int FIMS1WaferCount { get; set; } = 0;
 
-         public int FIMS2WaferCount { get; set; } = 0;
 
-         public int CarrierRobotWaferCount { get; set; } = 0;
 
-         public int WaferRobotWaferCount { get; set; } = 0;
 
-         public int PM1WaferCount { get; set; } = 0;
 
-         public string APCFeedbackView
 
-         {
 
-             get
 
-             {
 
-                 if (ValveAV75 != null && ValveAV75.Feedback)
 
-                 {
 
-                     return APCData.Pressure1Feedback.ToString("F3");
 
-                 }
 
-                 return APCData.Pressure2Feedback.ToString("F1");
 
-             }
 
-         }
 
-         public Visibility APCPressureView
 
-         {
 
-             get
 
-             {
 
-                 if (ValveAV75 != null && ValveAV75.Feedback)
 
-                 {
 
-                     return Visibility.Visible;
 
-                 }
 
-                 return Visibility.Collapsed;
 
-             }
 
-         }
 
-         public string WaferRobotAxleStatusPath
 
-         {
 
-             get
 
-             {
 
-                 switch (WaferRobotStatus)
 
-                 {
 
-                     case "Homing":
 
-                     case "Init":
 
-                         return "/FurnaceUI;component/Resources/Images/Controls3/hg2y.png";
 
-                     case "Idle":
 
-                     case "InTransfer":
 
-                     case "Loading":
 
-                     case "Unloading":
 
-                     case "Picking":
 
-                     case "Placing":
 
-                         return "/FurnaceUI;component/Resources/Images/Controls3/hg2g.png";
 
-                     case "Error":
 
-                         return "/FurnaceUI;component/Resources/Images/Controls3/hg2r.png";
 
-                     default:
 
-                         break;
 
-                 }
 
-                 return "/FurnaceUI;component/Resources/Images/Controls3/hg2g.png";
 
-             }
 
-         }
 
-         public string CassetteRobotAxleStatusPath
 
-         {
 
-             get
 
-             {
 
-                 switch (CassetteRobotStatus)
 
-                 {
 
-                     case "Homing":
 
-                     case "Init":
 
-                         return "/FurnaceUI;component/Resources/Images/Controls3/hg1y.png";
 
-                     case "Idle":
 
-                     case "InTransfer":
 
-                     case "Picking":
 
-                     case "Placing":
 
-                         return "/FurnaceUI;component/Resources/Images/Controls3/hg1g.png";
 
-                     case "Error":
 
-                         return "/FurnaceUI;component/Resources/Images/Controls3/hg1r.png";
 
-                     default:
 
-                         break;
 
-                 }
 
-                 return "/FurnaceUI;component/Resources/Images/Controls3/hg1g.png";
 
-             }
 
-         }
 
-         public StatusViewModel()
 
-         {
 
-             this.DisplayName = "MainStatusViewModel";
 
-             //ActiveUpdateData = true;
 
-             _stokcers = new List<ModuleName>()
 
-             {
 
-                 ModuleName.Stocker1,
 
-                 ModuleName.Stocker2,
 
-                 ModuleName.Stocker3,
 
-                 ModuleName.Stocker4,
 
-                 ModuleName.Stocker5,
 
-                 ModuleName.Stocker6,
 
-                 ModuleName.Stocker7,
 
-                 ModuleName.Stocker8,
 
-                 ModuleName.Stocker9,
 
-                 ModuleName.Stocker10,
 
-                 ModuleName.Stocker11,
 
-                 ModuleName.Stocker12,
 
-                 ModuleName.Stocker13,
 
-                 ModuleName.Stocker14,
 
-                 ModuleName.Stocker15,
 
-                 ModuleName.Stocker16,
 
-                 ModuleName.Stocker17,
 
-                 ModuleName.Stocker18,
 
-             };
 
-             StockerSlots = new ObservableCollection<string>()
 
-             {
 
-                 "",
 
-                 "",
 
-                 "",
 
-                 "",
 
-                 "",
 
-                 "",
 
-                 "",
 
-                 "",
 
-                 "",
 
-                 "",
 
-                 "",
 
-                 "",
 
-                 "",
 
-                 "",
 
-                 "",
 
-                 "",
 
-                 "",
 
-                 "",
 
-                 "",
 
-                 "",
 
-                 "",
 
-             };
 
-             _stokcerWaferType = Enumerable.Repeat("", 21).ToList();
 
-             _eDUseWarningLimit = (int)QueryDataClient.Instance.Service.GetConfig("PM1.WaferCycleTime.EDCountWarning");
 
-             _eDUseAlarmLimit = (int)QueryDataClient.Instance.Service.GetConfig("PM1.WaferCycleTime.EDCountAlarm");
 
-             _stockerBackground = new List<SolidColorBrush>();
 
-             for (int i = 0; i < 21; i++)
 
-             {
 
-                 _stockerBackground.Add(_WhiteFill);
 
-             }
 
-         }
 
-         protected override void OnInitialize()
 
-         {
 
-             base.OnInitialize();
 
-             base.InitFOUP();
 
-             base.InitLL();
 
-             base.InitTM();
 
-             base.InitEFEM();
 
-             base.InitPM();
 
-             base.InitBuffer();
 
-         }
 
-         protected override void OnActivate()
 
-         {
 
-             base.OnActivate();
 
-             DefaultUnit = (string)QueryDataClient.Instance.Service.GetConfig($"PM1.APC.PressureUnit");
 
-             _isCycleMode = (bool)QueryDataClient.Instance.Service.GetConfig("System.IsCycleMode");
 
-             _cassetteSlot = (int)QueryDataClient.Instance.Service.GetConfig("System.CassetteSlotCount");
 
-             for (int i = 0; i < _stokcers.Count; i++)
 
-             {
 
-                 _stokcerWaferType[i] = (string)QueryDataClient.Instance.Service.GetConfig($"System.Stocker.{_stokcers[i]}WaferType");
 
-             }
 
-             IsStocker1Visibility = (bool)QueryDataClient.Instance.Service.GetConfig($"System.SetUp.IsStocker1Installed") ? Visibility.Visible : Visibility.Collapsed;
 
-             IsStocker2Visibility = (bool)QueryDataClient.Instance.Service.GetConfig($"System.SetUp.IsStocker2Installed") ? Visibility.Visible : Visibility.Collapsed;
 
-             IsStocker3Visibility = (bool)QueryDataClient.Instance.Service.GetConfig($"System.SetUp.IsStocker3Installed") ? Visibility.Visible : Visibility.Collapsed;
 
-             IsStocker4Visibility = (bool)QueryDataClient.Instance.Service.GetConfig($"System.SetUp.IsStocker4Installed") ? Visibility.Visible : Visibility.Collapsed;
 
-             IsStocker5Visibility = (bool)QueryDataClient.Instance.Service.GetConfig($"System.SetUp.IsStocker5Installed") ? Visibility.Visible : Visibility.Collapsed;
 
-             IsStocker6Visibility = (bool)QueryDataClient.Instance.Service.GetConfig($"System.SetUp.IsStocker6Installed") ? Visibility.Visible : Visibility.Collapsed;
 
-             IsStocker7Visibility = (bool)QueryDataClient.Instance.Service.GetConfig($"System.SetUp.IsStocker7Installed") ? Visibility.Visible : Visibility.Collapsed;
 
-             IsStocker8Visibility = (bool)QueryDataClient.Instance.Service.GetConfig($"System.SetUp.IsStocker8Installed") ? Visibility.Visible : Visibility.Collapsed;
 
-             IsStocker9Visibility = (bool)QueryDataClient.Instance.Service.GetConfig($"System.SetUp.IsStocker9Installed") ? Visibility.Visible : Visibility.Collapsed;
 
-             IsStocker10Visibility = (bool)QueryDataClient.Instance.Service.GetConfig($"System.SetUp.IsStocker10Installed") ? Visibility.Visible : Visibility.Collapsed;
 
-             IsStocker11Visibility = (bool)QueryDataClient.Instance.Service.GetConfig($"System.SetUp.IsStocker11Installed") ? Visibility.Visible : Visibility.Collapsed;
 
-             IsStocker12Visibility = (bool)QueryDataClient.Instance.Service.GetConfig($"System.SetUp.IsStocker12Installed") ? Visibility.Visible : Visibility.Collapsed;
 
-             IsStocker13Visibility = (bool)QueryDataClient.Instance.Service.GetConfig($"System.SetUp.IsStocker13Installed") ? Visibility.Visible : Visibility.Collapsed;
 
-             IsStocker14Visibility = (bool)QueryDataClient.Instance.Service.GetConfig($"System.SetUp.IsStocker14Installed") ? Visibility.Visible : Visibility.Collapsed;
 
-             IsStocker15Visibility = (bool)QueryDataClient.Instance.Service.GetConfig($"System.SetUp.IsStocker15Installed") ? Visibility.Visible : Visibility.Collapsed;
 
-             IsStocker16Visibility = (bool)QueryDataClient.Instance.Service.GetConfig($"System.SetUp.IsStocker16Installed") ? Visibility.Visible : Visibility.Collapsed;
 
-             IsStocker17Visibility = (bool)QueryDataClient.Instance.Service.GetConfig($"System.SetUp.IsStocker17Installed") ? Visibility.Visible : Visibility.Collapsed;
 
-             IsStocker18Visibility = (bool)QueryDataClient.Instance.Service.GetConfig($"System.SetUp.IsStocker18Installed") ? Visibility.Visible : Visibility.Collapsed;
 
-         }
 
-         protected override void OnViewLoaded(object view)
 
-         {
 
-             base.OnViewLoaded(view);
 
-         }
 
-         public List<AITMfcData> GasDataList
 
-         {
 
-             get
 
-             {
 
-                 var _gasDataList = new List<AITMfcData>();
 
-                 if (MFCList != null)
 
-                 {
 
-                     foreach (var item in MFCList)
 
-                     {
 
-                         if (item == null)
 
-                         {
 
-                             continue;
 
-                         }
 
-                         if (_isShowMFCBySetPoint)
 
-                         {
 
-                             if (item.SetPoint > 0)
 
-                             {
 
-                                 _gasDataList.Add(item);
 
-                             }
 
-                         }
 
-                         else
 
-                         {
 
-                             _gasDataList.Add(item);
 
-                         }
 
-                     }
 
-                 }
 
-                 return _gasDataList;
 
-             }
 
-         }
 
-         public void Start()
 
-         {
 
-             InvokeClient.Instance.Service.DoOperation("System.StartAutoRun");
 
-         }
 
-         public void Stop()
 
-         {
 
-             //InvokeClient.Instance.Service.DoOperation("System.StartAutoRun");
 
-         }
 
-         public void SwitchPage(string page)
 
-         {
 
-             var wm = IoC.Get<IWindowManager>();
 
-             switch (page)
 
-             {
 
-                 case "Stocker":
 
-                     ClientApp.Instance.SwitchPage("status", "stocker", null);
 
-                     break;
 
-                 case "TransferMain":
 
-                     ClientApp.Instance.SwitchPage("status", "TransferMain", null);
 
-                     break;
 
-                 case "N2Purge":
 
-                     ClientApp.Instance.SwitchPage("status", "N2PurgeStatus", null);
 
-                     break;
 
-                 case "Gas":
 
-                     {
 
-                         ClientApp.Instance.SwitchPage("status", "Gas", null);
 
-                         //CGlobal.BoatWaferEditViewEnable = false;
 
-                         ////var wm = IoC.Get<IWindowManager>();
 
-                         //GasDetailViewModel gasDetailViewModel = new GasDetailViewModel();
 
-                         //(wm as WindowManager)?.ShowDialogWithTitle(gasDetailViewModel, null, "Gas Detail");
 
-                     }
 
-                     break;
 
-                 case "Temp":
 
-                     ClientApp.Instance.SwitchPage("status", "temp", null);
 
-                     break;
 
-                 case "Pressure":
 
-                     {
 
-                         ClientApp.Instance.SwitchPage("status", "Pressure", null);
 
-                         // var wm = IoC.Get<IWindowManager>();
 
-                         //var viewPressureDetail = new PressureDetailViewModel();
 
-                         //(wm as WindowManager)?.ShowDialogWithTitle(viewPressureDetail, null, "Pressure Detail");
 
-                     }
 
-                     break;
 
-                 case "MainRecipe":
 
-                     if (!string.IsNullOrEmpty(PM1MainRecipeName))
 
-                     {
 
-                         CGlobal.RecipeProcessEditViewEnable = false;
 
-                         MECF.Framework.UI.Client.CenterViews.Editors.Recipe.CGlobal.RecipeProcessEditViewEnable = false;
 
-                         // var wm = IoC.Get<IWindowManager>();
 
-                         var viewProcessRecipeRecipeType = "Process";
 
-                         var recipeName = PM1MainRecipeName;
 
-                         if (PM1ExecRecipeType.Equals("Sub"))
 
-                         {
 
-                             recipeName = ProcessSubRecipe;
 
-                         }
 
-                         else
 
-                         {
 
-                             recipeName = PM1MainRecipeName;
 
-                         }
 
-                         if (PM1ExecRecipeType.Equals("Process") || PM1ExecRecipeType.Equals("Abort"))
 
-                         {
 
-                             viewProcessRecipeRecipeType = PM1ExecRecipeType;
 
-                         }
 
-                         else
 
-                         {
 
-                             viewProcessRecipeRecipeType = PM1ExecRecipeType.ToLower();
 
-                         }
 
-                         int tableIndex = 1;
 
-                         var table = PM1SubTable.Split(':');
 
-                         if (table.Length < 0 || !int.TryParse(table[0], out tableIndex))
 
-                         {
 
-                             tableIndex = 1;
 
-                         }
 
-                         var viewProcessRecipe = new RecipeProcessEditViewModel($"Furnace\\{viewProcessRecipeRecipeType}", recipeName, tableIndex: tableIndex);
 
-                         viewProcessRecipe.RecipeType = viewProcessRecipeRecipeType;
 
-                         viewProcessRecipe.IndexNoDefault = PM1RecipeStepNumber;
 
-                         viewProcessRecipe.SelectedStepName = PM1RecipeStepName;
 
-                         (wm as WindowManager)?.ShowDialogWithTitle(viewProcessRecipe, null, $"View {viewProcessRecipeRecipeType} Recpie");
 
-                     }
 
-                     break;
 
-                 case "PMCommand":
 
-                     //if (!string.IsNullOrEmpty(PM1MainRecipeName))
 
-                     //{
 
-                     //  var wm = IoC.Get<IWindowManager>();
 
-                     var viewPMCommand = new PMCommandViewModel();
 
-                     (wm as WindowManager)?.ShowDialogWithTitle(viewPMCommand, this, null, "PM Command");
 
-                     //}
 
-                     break;
 
-                 case "LayoutRecipe":
 
-                     {
 
-                         CGlobal.BoatWaferEditViewEnable = false;
 
-                         // var wm = IoC.Get<IWindowManager>();
 
-                         var viewLayoutRecipe = new BoatWaferNoActionViewModel();
 
-                         (wm as WindowManager)?.ShowDialogWithTitle(viewLayoutRecipe, null, "View Boat Wafer");
 
-                     }
 
-                     break;
 
-                 case "Boat Elevator":
 
-                     {
 
-                         BoatElevatorParametersViewModel boatElevatorParametersViewModel = new BoatElevatorParametersViewModel();
 
-                         (wm as WindowManager)?.ShowDialogWithTitle(boatElevatorParametersViewModel, null, "Boat Elevator Parameter Settings");
 
-                     }
 
-                     break;
 
-                 case "CJStatus":
 
-                     {
 
-                         ClientApp.Instance.SwitchPage("status", "job", null);
 
-                         //ControlJobStatusViewModel controlJobStatusViewModel = new ControlJobStatusViewModel();
 
-                         //(wm as WindowManager)?.ShowDialogWithTitle(controlJobStatusViewModel, null, "CJ Status");
 
-                     }
 
-                     break;
 
-                 case "PJStatus":
 
-                     {
 
-                         ProcessJobWithDrawingViewModel processJobWithDrawingViewModel = new ProcessJobWithDrawingViewModel();
 
-                         (wm as WindowManager)?.ShowDialogWithTitle(processJobWithDrawingViewModel, null, "PJ Status");
 
-                     }
 
-                     break;
 
-                 case "LoadPortState":
 
-                     {
 
-                         LoadPortStateViewModel loadPortStateViewModel = new LoadPortStateViewModel();
 
-                         (wm as WindowManager)?.ShowDialogWithTitle(loadPortStateViewModel, null, "Load Port State");
 
-                     }
 
-                     break;
 
-                 case "CarrierState":
 
-                     {
 
-                         CarrierStateViewModel carrierStateViewModel = new CarrierStateViewModel();
 
-                         (wm as WindowManager)?.ShowDialogWithTitle(carrierStateViewModel, null, "Carrier State");
 
-                     }
 
-                     break;
 
-                 case "Equipment Status":
 
-                     {
 
-                         EquipmentStatusViewModel equipmentStatusViewModel = new EquipmentStatusViewModel();
 
-                         (wm as WindowManager)?.ShowDialogWithTitle(equipmentStatusViewModel, null, "Equipment Operation State");
 
-                     }
 
-                     break;
 
-                 case "Load Unload State":
 
-                     {
 
-                         LoadUnloadStateViewModel loadUnloadStateViewModel = new LoadUnloadStateViewModel();
 
-                         (wm as WindowManager)?.ShowDialogWithTitle(loadUnloadStateViewModel, null, "Load Unload State");
 
-                     }
 
-                     break;
 
-                 case "Boat Detail":
 
-                     {
 
-                         BoatWaferViewModel boatWaferViewModel = new BoatWaferViewModel();
 
-                         (wm as WindowManager)?.ShowDialogWithTitle(boatWaferViewModel, null, "Boat Detail");
 
-                     }
 
-                     break;
 
-             }
 
-         }
 
-         string[] moduleNames = new string[] { "Stocker1", "Stocker2", "Stocker3", "Stocker4", "Stocker5", "Stocker6", "Stocker7", "Stocker8", "Stocker9",
 
-             "Stocker10","Stocker11","Stocker12","Stocker13","Stocker14","Stocker15","Stocker16","Stocker17","Stocker18",
 
-             "FIMS1","FIMS2","CarrierRobot","WaferRobot","PM1"};
 
-         //string[] moduleNames = new string[] { "Stocker1", "Stocker2", "Stocker3", "Stocker4", "Stocker5", "Stocker6", "Stocker7", "Stocker8", "Stocker9",
 
-         //    "Stocker10","Stocker11","Stocker12","Stocker13","Stocker14","Stocker15","Stocker16","Stocker17","Stocker18"};
 
-         protected override void InvokeBeforeUpdateProperty(Dictionary<string, object> data)
 
-         {
 
-             base.InvokeBeforeUpdateProperty(data);
 
-             _isShowMFCBySetPoint = (bool)QueryDataClient.Instance.Service.GetConfig($"System.ShowMFCBySetPoint");
 
-         }
 
-         protected override void InvokeAfterUpdateProperty(Dictionary<string, object> data)
 
-         {
 
-             UpdateStockerSlots();
 
-             UpdateRecipeProgress();
 
-             var isLoadPortPosition = (string)QueryDataClient.Instance.Service.GetConfig("LoadPort.LoadPortPosition");
 
-             if (isLoadPortPosition == "Upper")
 
-             {
 
-                 IsStockerVisibility = Visibility.Hidden;
 
-                 IsLPVisibility = Visibility.Visible;
 
-             }
 
-             else
 
-             {
 
-                 IsStockerVisibility = Visibility.Visible;
 
-                 IsLPVisibility = Visibility.Hidden;
 
-             }
 
-             foreach (var item in moduleNames)
 
-             {
 
-                 if (ModuleManager.ModuleInfos.ContainsKey(item))
 
-                 {
 
-                     this.GetType().GetProperty($"{item}WaferCount").SetValue(this, ModuleManager.ModuleInfos[item].WaferManager.Wafers.Where(x => x.WaferStatus != 0).Count());
 
-                 }
 
-             }
 
-             NotifyOfPropertyChange("IsStocker1Visibility");
 
-         }
 
-         private void UpdateStockerSlots()
 
-         {
 
-             for (int i = 0; i < _stokcers.Count; i++)
 
-             {
 
-                 bool bHaveAbort = false;
 
-                 var wafers = ModuleManager.ModuleInfos[_stokcers[i].ToString()].WaferManager.Wafers;
 
-                 int waferNumber = 0;
 
-                 string waferType = "";
 
-                 SolidColorBrush _tempFill = _SD_ED_M_Fill;
 
-                 if (wafers != null)
 
-                 {
 
-                     foreach (var wafer in wafers)
 
-                     {
 
-                         if (wafer.WaferStatus != 0)
 
-                         {
 
-                             waferNumber++;
 
-                             waferType = wafer.WaferType.ToString();
 
-                             if (wafer.WaferStatus == 5) // EnumWaferProcessStatus.Failed
 
-                                 bHaveAbort = true;
 
-                             if (wafer.UseCount >= _eDUseWarningLimit)
 
-                             {
 
-                                 _tempFill = _waringFill;
 
-                             }
 
-                             if (wafer.UseCount >= _eDUseAlarmLimit)
 
-                             {
 
-                                 _tempFill = _alarmFill;
 
-                             }
 
-                         }
 
-                     }
 
-                 }
 
-                 StockerSlots[i] = $"{_stokcerWaferType[i]}-{waferNumber}/{_cassetteSlot}";
 
-                 if (_stokcerWaferType[i].Contains("P"))
 
-                 {
 
-                     if (waferNumber > 0)
 
-                     {
 
-                         if (bHaveAbort)
 
-                             StockerBackground[i] = _redBk;
 
-                         else
 
-                             StockerBackground[i] = _productionFill;
 
-                     }
 
-                     else
 
-                     {
 
-                         StockerBackground[i] = _WhiteFill;
 
-                     }
 
-                 }
 
-                 else
 
-                 {
 
-                     if (waferNumber > 0)
 
-                     {
 
-                         if (bHaveAbort)
 
-                             StockerBackground[i] = _redBk;
 
-                         else
 
-                         {
 
-                             StockerBackground[i] = _tempFill;
 
-                         }
 
-                     }
 
-                     else
 
-                     {
 
-                         StockerBackground[i] = _WhiteFill;
 
-                     }
 
-                 }
 
-             }
 
-         }
 
-         private void UpdateRecipeProgress()
 
-         {
 
-             if (!IsPM1Process && !IsPM1PostProcess)
 
-             {
 
-                 RecipeProgress = "";
 
-                 RecipeProgressValue = 0;
 
-                 return;
 
-             }
 
-             if (PM1RecipeTotalTime == 0)
 
-             {
 
-                 RecipeProgress = "";
 
-                 RecipeProgressValue = 0;
 
-             }
 
-             else
 
-             {
 
-                 double totalTime = PM1RecipeTotalTime;
 
-                 double elapseTime = PM1RecipeTotalElapseTime;
 
-                 float percentage = (float)(elapseTime / totalTime * 100);
 
-                 percentage = percentage > 100 ? 100 : percentage;
 
-                 RecipeProgress = $"{percentage.ToString("f1")}%";
 
-                 RecipeProgressValue = (int)(elapseTime / totalTime * 100);
 
-             }
 
-         }
 
-         public void CanvasMouseLeftButtonDown(object sender)
 
-         {
 
-         }
 
-         public Dictionary<string, StationPosition> StationPosition
 
-         {
 
-             get
 
-             {
 
-                 return new Dictionary<string, StationPosition>()
 
-                 {
 
-                     { "ArmA.System", new StationPosition() {
 
-                         StartPosition = new RobotPosition() { Root = 0, Arm = 180, Hand = 180 }
 
-                         ,EndPosition = new RobotPosition() { Root = 0, Arm = 180, Hand = 180 }}}
 
-                     ,{ "Robot", new StationPosition() {
 
-                         StartPosition = new RobotPosition() { X=0, Root = 0, Arm = 180, Hand = 180 }
 
-                         ,EndPosition = new RobotPosition() { Root = 0, Arm = 180, Hand = 180 }}}
 
-                      ,{"ArmA.Stocker1", new StationPosition() {
 
-                          StartPosition = new RobotPosition() { X=-150, Root = 0, Arm = 180, Hand = 180 }
 
-                         ,EndPosition = new RobotPosition() { Root = 0, Arm = 0, Hand = 0 }}}
 
-                      ,{ "ArmA.Stocker2", new StationPosition() {
 
-                          StartPosition = new RobotPosition() { X=-150, Root = 0, Arm = 180, Hand = 180 }
 
-                         ,EndPosition = new RobotPosition() { Root = 0, Arm = -20, Hand = 0 }}}
 
-                       ,{ "ArmA.Stocker3", new StationPosition() {
 
-                          StartPosition = new RobotPosition() { X=-150, Root = 0, Arm =  180, Hand = 180 }
 
-                         ,EndPosition = new RobotPosition() { Root = 0, Arm = -20, Hand = 0 }}}
 
-                      ,{ "ArmA.Stocker4", new StationPosition() {
 
-                          StartPosition = new RobotPosition() { X=-150, Root = 0, Arm = 180, Hand = 180 }
 
-                         ,EndPosition = new RobotPosition() { Root = 0, Arm = -20, Hand = 0 }}}
 
-                      ,{"ArmA.Stocker5", new StationPosition(){
 
-                         StartPosition = new RobotPosition() { X=-240, Root = 0, Arm = 180, Hand = 180 }
 
-                         ,EndPosition = new RobotPosition() { Root = 0, Arm = 0, Hand = 0 }}}
 
-                     ,{"ArmA.Stocker6", new StationPosition(){
 
-                         StartPosition = new RobotPosition() { X=-240, Root = 0, Arm =  180, Hand = 180 }
 
-                         ,EndPosition = new RobotPosition() { Root = 0, Arm = -20, Hand = 0 }}}
 
-                      ,{"ArmA.Stocker7", new StationPosition(){
 
-                          StartPosition = new RobotPosition() { X=-240, Root = 0, Arm =  180, Hand = 180 }
 
-                         ,EndPosition = new RobotPosition() { Root = 0, Arm = -20, Hand = 0 }}}
 
-                       ,{"ArmA.Stocker8", new StationPosition(){
 
-                         StartPosition = new RobotPosition() { X=-240, Root = 0, Arm =  180, Hand = 180 }
 
-                         ,EndPosition = new RobotPosition() { Root = 0, Arm = -20, Hand = 0 }}}
 
-                     ,{ "ArmA.Stocker9", new StationPosition() {
 
-                          StartPosition = new RobotPosition() { X=-325, Root = 0, Arm = 180, Hand = 180 }
 
-                         ,EndPosition = new RobotPosition() { Root = 0, Arm = 0, Hand = 0 }}}
 
-                      ,{ "ArmA.Stocker10", new StationPosition() {
 
-                          StartPosition = new RobotPosition() { X=-325, Root = 0, Arm = 180, Hand = 180 }
 
-                         ,EndPosition = new RobotPosition() { Root = 0, Arm = -20, Hand = 0 }}}
 
-                      ,{ "ArmA.Stocker11", new StationPosition() {
 
-                        StartPosition = new RobotPosition() { X=-325, Root = 0, Arm = 180, Hand = 180 }
 
-                         ,EndPosition = new RobotPosition() { Root = 0, Arm = -20, Hand = 0 }} }
 
-                     ,{"ArmA.Stocker12", new StationPosition(){
 
-                         StartPosition = new RobotPosition() { X =-325, Root = 0, Arm = 180, Hand = 180 }
 
-                      ,EndPosition = new RobotPosition() { Root = 0, Arm = -20, Hand = 0 }}}
 
-                      ,{ "ArmA.Stocker13", new StationPosition() {
 
-                          StartPosition = new RobotPosition() { X=-415, Root = 0, Arm =  180, Hand = 180 }
 
-                         ,EndPosition = new RobotPosition() { Root = 0, Arm = 0, Hand = 0 }}}
 
-                      ,{ "ArmA.Stocker14", new StationPosition() {
 
-                          StartPosition = new RobotPosition() { X=-415, Root = 0, Arm = 180, Hand = 180 }
 
-                         ,EndPosition = new RobotPosition() { Root = 0, Arm = -20, Hand = 0 }}}
 
-                        ,{ "ArmA.Stocker15", new StationPosition() {
 
-                          StartPosition = new RobotPosition() { X=-415, Root = 0, Arm = 180, Hand = 180 }
 
-                         ,EndPosition = new RobotPosition() { Root = 0, Arm = -20, Hand = 0 }}}
 
-                       ,{ "ArmA.Stocker16", new StationPosition() {
 
-                          StartPosition = new RobotPosition() { X=-415, Root = 0, Arm = 180, Hand = 180 }
 
-                         ,EndPosition = new RobotPosition() { Root = 0, Arm = -20, Hand = 0 }}}
 
-                     ,{"ArmA.Stocker17", new StationPosition(){
 
-                         StartPosition = new RobotPosition() { X = -250, Root = 180, Arm = 180, Hand = 180 }
 
-                         ,EndPosition = new RobotPosition() { Root = 180, Arm = -20, Hand = 0 }}}
 
-                     ,{"ArmA.Stocker18", new StationPosition(){
 
-                         StartPosition = new RobotPosition() { X = -250, Root = 180, Arm = 180, Hand = 180 }
 
-                         ,EndPosition = new RobotPosition() { Root = 180, Arm = 23, Hand = 0 }}}
 
-                       ,{"ArmA.FIMS1", new StationPosition(){
 
-                         StartPosition = new RobotPosition() { X = 35, Root = 0, Arm = 180, Hand = 180 }
 
-                         ,EndPosition = new RobotPosition() { Root = 0, Arm = -20, Hand = 0 }}}
 
-                       ,{"ArmA.FIMS2", new StationPosition(){
 
-                         StartPosition = new RobotPosition() { X = -95, Root = 0, Arm = 180, Hand = 180 }
 
-                         ,EndPosition = new RobotPosition() { Root = 0, Arm = -20, Hand = 0 }}}
 
-                       ,{"ArmA.LP1", new StationPosition(){
 
-                         StartPosition = new RobotPosition() { X = -90, Root = 180, Arm = 180, Hand = 180 }
 
-                         ,EndPosition = new RobotPosition() { Root = 180, Arm = -20, Hand = 0 }}}
 
-                       ,{"ArmA.LP2", new StationPosition(){
 
-                         StartPosition = new RobotPosition() { X = -90, Root = 180, Arm = 180, Hand = 180 }
 
-                         ,EndPosition = new RobotPosition() { Root = 180, Arm = 23, Hand = 0 }}}
 
-                     ,{"ArmA.LP3", new StationPosition(){
 
-                         StartPosition = new RobotPosition() { X = -365, Root = 180, Arm = 180, Hand = 180 }
 
-                         ,EndPosition = new RobotPosition() { Root = 180, Arm = -20, Hand = 0 }}}
 
-                     ,{"ArmA.LP4", new StationPosition(){
 
-                         StartPosition = new RobotPosition() { X = -365, Root = 180, Arm = 180, Hand = 180 }
 
-                         ,EndPosition = new RobotPosition() { Root = 180, Arm = 23, Hand = 0 }}}
 
-                 };
 
-             }
 
-         }
 
-         public Dictionary<string, StationPosition> StationPosition2
 
-         {
 
-             get
 
-             {
 
-                 return new Dictionary<string, StationPosition>()
 
-                 {
 
-                     { "ArmA.System", new StationPosition() {
 
-                         StartPosition = new RobotPosition() { X=0, Root = 0, Arm = 180, Hand = 180 }
 
-                         ,EndPosition = new RobotPosition() { Root = 0, Arm = 180, Hand = 180 }}
 
-                     }
 
-                       ,{ "Robot", new StationPosition() {
 
-                         StartPosition = new RobotPosition() { X=0, Root = 0, Arm = 180, Hand = 180 }
 
-                         ,EndPosition = new RobotPosition() { Root = 0, Arm = 180, Hand = 180 }}
 
-                     }
 
-                     ,{ "ArmA.FIMS1", new StationPosition() {
 
-                        StartPosition = new RobotPosition() { X=-20, Root = 180, Arm = 180, Hand = 180 }
 
-                         ,EndPosition = new RobotPosition() { Root = 180, Arm = 0, Hand = 0 }}
 
-                     }
 
-                     ,{ "ArmA.FIMS2", new StationPosition() {
 
-                        StartPosition = new RobotPosition() { X=-168, Root = 180, Arm = 180, Hand = 180 }
 
-                         ,EndPosition = new RobotPosition() { Root = 180, Arm = 0, Hand = 0 }}
 
-                     }
 
-                     ,{ "ArmA.PM1", new StationPosition() {
 
-                        StartPosition = new RobotPosition() { X=-50, Root = 0, Arm = 180, Hand = 180 }
 
-                         ,EndPosition = new RobotPosition() { Root = 0, Arm = 0, Hand = 0 }}
 
-                     }
 
-                 };
 
-             }
 
-         }
 
-         public Dictionary<string, StationPosition> StationPosition3
 
-         {
 
-             get
 
-             {
 
-                 return new Dictionary<string, StationPosition>()
 
-                 {
 
-                     { "HomePosition", new StationPosition() {
 
-                                 StartPosition = new RobotPosition() { X=0, Root = 0, Arm = 0, Hand = 0 }
 
-                                 ,EndPosition = new RobotPosition() { Root = 0, Arm = 0, Hand = 0 }}
 
-                     },
 
-                     { "Position1", new StationPosition() {
 
-                                 StartPosition = new RobotPosition() { X=-50, Root = 0, Arm = 0, Hand = 0 }
 
-                                 ,EndPosition = new RobotPosition() { Root = 0, Arm = 0, Hand = 0 }}
 
-                     },
 
-                     { "Position2", new StationPosition() {
 
-                                 StartPosition = new RobotPosition() { X=-100, Root = 0, Arm = 0, Hand = 0 }
 
-                                 ,EndPosition = new RobotPosition() { Root = 0, Arm = 0, Hand = 0 }}
 
-                     },
 
-                     { "ProcessPosition", new StationPosition() {
 
-                                 StartPosition = new RobotPosition() { X=-280, Root = 0, Arm = 0, Hand = 0 }
 
-                                 ,EndPosition = new RobotPosition() { Root = 0, Arm = 0, Hand = 0 }}
 
-                     }
 
-                 };
 
-             }
 
-         }
 
-         public void PopupPage(string page)
 
-         {
 
-             //var windowManager = IoC.Get<IWindowManager>();
 
-             var windowManager = new WindowManager();
 
-             switch (page)
 
-             {
 
-                 case "PortStatus":
 
-                     //LoadIOPortViewModel portStatusViewModel = new LoadIOPortViewModel();
 
-                     //(windowManager as WindowManager)?.ShowDialogWithTitle(portStatusViewModel, null, "Port Status");
 
-                     break;
 
-                 case "JobStatus":
 
-                     JOBStatusViewModel vm = new JOBStatusViewModel();
 
-                     //bool? ret = windowManager.ShowDialog(vm);
 
-                     (windowManager as WindowManager)?.ShowDialogWithTitle(vm, null, "Job Status View");
 
-                     break;
 
-                 default:
 
-                     break;
 
-             }
 
-         }
 
-         public void StandbyFactor()
 
-         {
 
-             //if (!string.IsNullOrEmpty(PM1MainRecipeName))
 
-             {
 
-                 var windowManager = IoC.Get<IWindowManager>();
 
-                 StandbyFactorViewModel standbyFactorViewModel = new StandbyFactorViewModel();
 
-                 standbyFactorViewModel.MainRecipeName = PM1MainRecipeName;
 
-                 (windowManager as WindowManager)?.ShowDialogWithTitle(standbyFactorViewModel, null, "Standby Factor View");
 
-             }
 
-         }
 
-         public void Skip()
 
-         {
 
-             if (!DialogBox.Confirm("Ara you sure to skip current step?"))
 
-                 return;
 
-             InvokeClient.Instance.Service.DoOperation($"PM1.RecipeSkipStep", "");
 
-         }
 
-         public void Jump()
 
-         {
 
-             //if (!DialogBox.Confirm("Ara you sure to jump current step?"))
 
-             //    return;
 
-             //var recipes = new RecipeDataBase();
 
-             //recipes.PrefixPath = "Furnace\\Process";
 
-             //recipes.Name = PM1MainRecipeName;
 
-             //RecipeProvider _recipeProvider = new RecipeProvider();
 
-             //recipes.Clear();
 
-             //var recipeContent = _recipeProvider.LoadRecipe(recipes.PrefixPath, recipes.Name);
 
-             //if (string.IsNullOrEmpty(recipeContent))
 
-             //{
 
-             //    MessageBox.Show($"{recipes.PrefixPath}\\{recipes.Name} is empty, please confirm the file is valid.");
 
-             //    return;
 
-             //}
 
-             //recipes.RecipeChamberType = "OriginChamber";
 
-             //recipes.InitData(recipes.PrefixPath, recipes.Name, recipeContent, "PM1");
 
-             //var windowManager = IoC.Get<IWindowManager>();
 
-             //RecipeLoopSetViewModel recipeLoopSetViewModel = new RecipeLoopSetViewModel();
 
-             //recipeLoopSetViewModel.StepNames = new ObservableCollection<string>(recipes.Steps.OrderBy(x => x.StepNo).Where(x => x.StepNo != PM1RecipeStepNumber).Select(x => x.Name).ToList());
 
-             //if ((bool)(windowManager as WindowManager)?.ShowDialogWithTitle(recipeLoopSetViewModel, null, "Jump"))
 
-             //{
 
-             //    InvokeClient.Instance.Service.DoOperation($"PM1.RecipeJumpStep", recipeLoopSetViewModel.SelectedIndex);
 
-             //}
 
-         }
 
-         public void Hold()
 
-         {
 
-             if (HoldName == "Hold")
 
-             {
 
-                 if (!DialogBox.Confirm("Ara you sure to hold current recipe?"))
 
-                     return;
 
-                 InvokeClient.Instance.Service.DoOperation($"PM1.RecipePause", "");
 
-             }
 
-             else
 
-             {
 
-                 InvokeClient.Instance.Service.DoOperation($"PM1.RecipeContinue", "");
 
-             }
 
-         }
 
-         public void EmergencyAbort()
 
-         {
 
-             if (!DialogBox.Confirm("Ara you sure to execute EmergencyAbort?"))
 
-                 return;
 
-             InvokeClient.Instance.Service.DoOperation("PM1.Abort");
 
-         }
 
-         private string CalEndTime(DateTime beginTime, double totalTime, double totalElapseTime)
 
-         {
 
-             TimeSpan secondSpan = DateTime.Now - beginTime;
 
-             return beginTime.AddSeconds(secondSpan.TotalSeconds + totalTime - totalElapseTime).ToString("yyyy-MM-dd HH:mm:ss");
 
-         }
 
-     }
 
- }
 
 
  |