| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550 | 
							- using Aitex.Core.UI.MVVM;
 
- using Aitex.Core.Util;
 
- using MECF.Framework.Common.DataCenter;
 
- using MECF.Framework.Common.CommonData;
 
- using MECF.Framework.Common.Equipment;
 
- using MECF.Framework.Common.OperationCenter;
 
- using MECF.Framework.Common.SubstrateTrackings;
 
- using MECF.Framework.UI.Client.ClientBase;
 
- using System.Collections.Generic;
 
- using System.Linq;
 
- using System.Windows;
 
- using System.Windows.Input;
 
- using FurnaceUI.Models;
 
- using FurnaceUI;
 
- using FurnaceUI.Controls.Common;
 
- using FurnaceUI.Client;
 
- using Caliburn.Micro;
 
- using Caliburn.Micro.Core;
 
- using FurnaceUI.Views.Maintenances;
 
- using OpenSEMI.ClientBase;
 
- namespace FurnaceUI.Views.Operations
 
- {
 
-     public class SelfCheckViewModel : FurnaceUIViewModelBase
 
-     {
 
-         #region Subscription Properties
 
-         [Subscription("WaferRobot.MappingResult")]
 
-         public string MappingResult { get; set; }
 
-         [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("System.SensorStage1CASSPresence.Value")]
 
-         public bool SensorStage1CASSPresence { get; set; }
 
-         [Subscription("System.SensorStage2CASSPresence.Value")]
 
-         public bool SensorStage2CASSPresence { 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("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; }
 
-         [Subscription("CarrierRobot.Carrier")]
 
-         public CarrierInfo CassetteRobotCarrierData { get; set; }
 
-         [Subscription("CarrierRobot.RobotMoveInfo")]
 
-         public RobotMoveInfo CassetteRobotMoveInfo { get; set; }
 
-         [Subscription("WaferRobot.RobotMoveInfo")]
 
-         public RobotMoveInfo WaferRobotMoveInfo { get; set; }
 
-         [Subscription("CarrierRobot.Status")]
 
-         public string CassetteRobotStatus { get; set; }
 
-         public bool IsCassetteRobotInitialized
 
-         {
 
-             get
 
-             {
 
-                 return CassetteRobotStatus != "Init" && CassetteRobotStatus != "Homing";
 
-             }
 
-         }
 
-         [Subscription("WaferRobot.Status")]
 
-         public string WaferRobotStatus { get; set; }
 
-         [Subscription("LP1.Status")]
 
-         public string LP1Status { get; set; }
 
-         [Subscription("LP2.Status")]
 
-         public string LP2Status { get; set; }
 
-         [Subscription("LP3.Status")]
 
-         public string LP3Status { get; set; }
 
-         [Subscription("LP4.Status")]
 
-         public string LP4Status { get; set; }
 
-         [Subscription("BoatElevatorRobot.Status")]
 
-         public string BoatElevatorRobotStatus { get; set; }
 
-         private string _boatPosition;
 
-         [Subscription("Boat.BoatPosition")]
 
-         public string BoatPosition
 
-         {
 
-             get => _boatPosition;
 
-             set
 
-             {
 
-                 _boatPosition = value;
 
-                 NotifyOfPropertyChange(nameof(BoatPosition));
 
-             }
 
-         }
 
-         [Subscription("Boat.BoatZCurrentPosition")]
 
-         public int BoatCurrentValue { get; set; }
 
-         private int _boatZMinValue;
 
-         public int BoatZMinValue
 
-         {
 
-             get => _boatZMinValue;
 
-             set
 
-             {
 
-                 _boatZMinValue = value;
 
-                 NotifyOfPropertyChange(nameof(BoatZMinValue));
 
-             }
 
-         }
 
-         private int _boatZMaxValue;
 
-         public int BoatZMaxValue
 
-         {
 
-             get => _boatZMaxValue;
 
-             set
 
-             {
 
-                 _boatZMaxValue = value;
 
-                 NotifyOfPropertyChange(nameof(BoatZMaxValue));
 
-             }
 
-         }
 
-         public bool IsWaferRobotInitialized
 
-         {
 
-             get
 
-             {
 
-                 return WaferRobotStatus != "Init" && WaferRobotStatus != "Homing";
 
-             }
 
-         }
 
-         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 string SMIFAStatusPath
 
-         {
 
-             get
 
-             {
 
-                 switch (LP1Status)
 
-                 {
 
-                     case "Homing":
 
-                     case "Init":
 
-                         return "/FurnaceUI;component/Resources/Images/Controls/smif-yellow.png";
 
-                     case "Idle":
 
-                     case "InTransfer":
 
-                     case "Picking":
 
-                     case "Placing":
 
-                         return "/FurnaceUI;component/Resources/Images/Controls/smif-green.png";
 
-                     case "Error":
 
-                         return "/FurnaceUI;component/Resources/Images/Controls/smif-red.png";
 
-                     default:
 
-                         break;
 
-                 }
 
-                 return "/FurnaceUI;component/Resources/Images/Controls/smif-green.png";
 
-             }
 
-         }
 
-         public string SMIFBStatusPath
 
-         {
 
-             get
 
-             {
 
-                 switch (LP2Status)
 
-                 {
 
-                     case "Homing":
 
-                     case "Init":
 
-                         return "/FurnaceUI;component/Resources/Images/Controls/smif-yellow.png";
 
-                     case "Idle":
 
-                     case "InTransfer":
 
-                     case "Picking":
 
-                     case "Placing":
 
-                         return "/FurnaceUI;component/Resources/Images/Controls/smif-green.png";
 
-                     case "Error":
 
-                         return "/FurnaceUI;component/Resources/Images/Controls/smif-red.png";
 
-                     default:
 
-                         break;
 
-                 }
 
-                 return "/FurnaceUI;component/Resources/Images/Controls/smif-green.png";
 
-             }
 
-         }
 
-         [Subscription("PM1.Status")]
 
-         public string PM1Status { get; set; }
 
-         public bool IsPM1Initialized
 
-         {
 
-             get
 
-             {
 
-                 return PM1Status != "Init" && PM1Status != "Homing";
 
-             }
 
-         }
 
-         private string _boatStatus;
 
-         [Subscription("Boat.Status")]
 
-         public string BoatStatus
 
-         {
 
-             get => _boatStatus;
 
-             set
 
-             {
 
-                 _boatStatus = value;
 
-                 NotifyOfPropertyChange(nameof(BoatStatus));
 
-             }
 
-         }
 
-         public bool IsBoatInitialized
 
-         {
 
-             get
 
-             {
 
-                 return BoatStatus != "Init" && BoatStatus != "Homing";
 
-             }
 
-         }
 
-         [Subscription("System.IsInitialized")]
 
-         public bool SystemIsInitialized { get; set; }
 
-         [Subscription("Rt.Status")]
 
-         public string RtStatus { get; set; }
 
-         public bool IsAuto
 
-         {
 
-             get { return RtStatus == "AutoRunning" || RtStatus == "AutoIdle"; }
 
-         }
 
-         public bool IsRtRunning
 
-         {
 
-             get
 
-             {
 
-                 return RtStatus != "Init" && RtStatus != "Idle" && RtStatus != "AutoIdle";
 
-             }
 
-         }
 
-         public bool IsRtInitialized
 
-         {
 
-             get
 
-             {
 
-                 return RtStatus != "Init" && RtStatus != "Initializing";
 
-             }
 
-         }
 
-         public bool IsEnableInitialize
 
-         {
 
-             get { return !IsAuto && !IsRtRunning; }
 
-         }
 
-         private bool _isShowBoatElevatorRobot = true;
 
-         public bool IsShowBoatElevatorRobot
 
-         {
 
-             get => _isShowBoatElevatorRobot;
 
-             set
 
-             {
 
-                 _isShowBoatElevatorRobot = value;
 
-                 NotifyOfPropertyChange(nameof(IsShowBoatElevatorRobot));
 
-             }
 
-         }
 
-         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;
 
-         public int FIMS1WaferCount { get; set; } = 0;
 
-         public int FIMS2WaferCount { get; set; } = 0;
 
-         public int LP1WaferCount { get; set; } = 0;
 
-         public int LP2WaferCount { get; set; } = 0;
 
-         public int CarrierRobotWaferCount { get; set; } = 0;
 
-         public int WaferRobotWaferCount { get; set; } = 0;
 
-         public int PM1WaferCount { get; set; } = 0;
 
-         #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
 
-         private WaferInfo _waferRobotWafer1;
 
-         public WaferInfo WaferRobotWafer1
 
-         {
 
-             get
 
-             {
 
-                 return _waferRobotWafer1;
 
-             }
 
-             set
 
-             {
 
-                 _waferRobotWafer1 = value;
 
-                 NotifyOfPropertyChange(nameof(WaferRobotWafer1));
 
-             }
 
-         }
 
-         private WaferInfo _waferRobotWafer2;
 
-         public WaferInfo WaferRobotWafer2
 
-         {
 
-             get
 
-             {
 
-                 return _waferRobotWafer2;
 
-             }
 
-             set
 
-             {
 
-                 _waferRobotWafer2 = value;
 
-                 NotifyOfPropertyChange(nameof(WaferRobotWafer2));
 
-             }
 
-         }
 
-         [Subscription("CarrierRobot.Status")]
 
-         public string CarrierRobotStatus { get; set; }
 
-         [Subscription("CarrierRobot.SwapCycledCount")]
 
-         public int SwapCycledCount { get; set; }
 
-         [Subscription("CarrierRobot.CycleSwapCycledCount")]
 
-         public int CycleSwapCycledCount { get; set; }
 
-         [Subscription("WaferRobot.SwapCycledCount")]
 
-         public int WaferRobotSwapCycledCount { get; set; }
 
-         private Visibility _cycleCountVisibility;
 
-         public Visibility CycleCountVisibility
 
-         {
 
-             get => _cycleCountVisibility;
 
-             set
 
-             {
 
-                 _cycleCountVisibility = value;
 
-                 NotifyOfPropertyChange(nameof(CycleCountVisibility));
 
-             }
 
-         }
 
-         private int _cycleNumber { get; set; }
 
-         private int _cycleSwapNumber { get; set; }
 
-         public string CycleCountDisplay
 
-         {
 
-             get
 
-             {
 
-                 if (CarrierRobotStatus == "Swaping")
 
-                 {
 
-                     return $"{SwapCycledCount + 1}/{_cycleNumber}";
 
-                 }
 
-                 if (CarrierRobotStatus == "CycleSwaping")
 
-                 {
 
-                     return $"{CycleSwapCycledCount}/{_cycleSwapNumber}";
 
-                 }
 
-                 return "--";
 
-             }
 
-         }
 
-         private Visibility _waferRobotCycleCountVisibility;
 
-         public Visibility WaferRobotCycleCountVisibility
 
-         {
 
-             get => _waferRobotCycleCountVisibility;
 
-             set
 
-             {
 
-                 _waferRobotCycleCountVisibility = value;
 
-                 NotifyOfPropertyChange(nameof(WaferRobotCycleCountVisibility));
 
-             }
 
-         }
 
-         private int _waferRobotCycleNumber { get; set; }
 
-         public string WaferRobotCycleCountDisplay
 
-         {
 
-             get
 
-             {
 
-                 if (WaferRobotStatus == "Swaping")
 
-                 {
 
-                     return $"{WaferRobotSwapCycledCount + 1}/{_waferRobotCycleNumber}";
 
-                 }
 
-                 return "--";
 
-             }
 
-         }
 
-         #endregion
 
-         public bool IsManagerPermission { get => this.Permission == 3; }
 
-         public bool IsEnableReturnWafer
 
-         {
 
-             get
 
-             {
 
-                 return IsManagerPermission && (RtStatus == "Idle" || RtStatus == "AutoIdle");
 
-             }
 
-         }
 
-         public bool PM1Installed { get; set; }
 
-         public bool LP1Installed { get; set; }
 
-         public bool LP2Installed { get; set; }
 
-         public bool LP3Installed { get; set; }
 
-         public bool LP4Installed { get; set; }
 
-         public bool FIMS1Installed { get; set; }
 
-         public bool FIMS2Installed { get; set; }
 
-         private bool _stocker1Installed;
 
-         public bool Stocker1Installed
 
-         {
 
-             get { return _stocker1Installed; }
 
-             set { _stocker1Installed = value; this.NotifyOfPropertyChange(nameof(Stocker1Installed)); }
 
-         }
 
-         private bool _stocker2Installed;
 
-         public bool Stocker2Installed
 
-         {
 
-             get { return _stocker2Installed; }
 
-             set { _stocker2Installed = value; this.NotifyOfPropertyChange(nameof(Stocker2Installed)); }
 
-         }
 
-         private bool _stocker3Installed;
 
-         public bool Stocker3Installed
 
-         {
 
-             get { return _stocker3Installed; }
 
-             set { _stocker3Installed = value; this.NotifyOfPropertyChange(nameof(Stocker3Installed)); }
 
-         }
 
-         private bool _stocker4Installed;
 
-         public bool Stocker4Installed
 
-         {
 
-             get { return _stocker4Installed; }
 
-             set { _stocker4Installed = value; this.NotifyOfPropertyChange(nameof(Stocker4Installed)); }
 
-         }
 
-         private bool _stocker5Installed;
 
-         public bool Stocker5Installed
 
-         {
 
-             get { return _stocker5Installed; }
 
-             set { _stocker5Installed = value; this.NotifyOfPropertyChange(nameof(Stocker5Installed)); }
 
-         }
 
-         private bool _stocker6Installed;
 
-         public bool Stocker6Installed
 
-         {
 
-             get { return _stocker6Installed; }
 
-             set { _stocker6Installed = value; this.NotifyOfPropertyChange(nameof(Stocker6Installed)); }
 
-         }
 
-         private bool _stocker7Installed;
 
-         public bool Stocker7Installed
 
-         {
 
-             get { return _stocker7Installed; }
 
-             set { _stocker7Installed = value; this.NotifyOfPropertyChange(nameof(Stocker7Installed)); }
 
-         }
 
-         private bool _stocker8Installed;
 
-         public bool Stocker8Installed
 
-         {
 
-             get { return _stocker8Installed; }
 
-             set { _stocker8Installed = value; this.NotifyOfPropertyChange(nameof(Stocker8Installed)); }
 
-         }
 
-         private bool _stocker9Installed;
 
-         public bool Stocker9Installed
 
-         {
 
-             get { return _stocker9Installed; }
 
-             set { _stocker9Installed = value; this.NotifyOfPropertyChange(nameof(Stocker9Installed)); }
 
-         }
 
-         private bool _stocker10Installed;
 
-         public bool Stocker10Installed
 
-         {
 
-             get { return _stocker10Installed; }
 
-             set { _stocker10Installed = value; this.NotifyOfPropertyChange(nameof(Stocker10Installed)); }
 
-         }
 
-         private bool _stocker11Installed;
 
-         public bool Stocker11Installed
 
-         {
 
-             get { return _stocker11Installed; }
 
-             set { _stocker11Installed = value; this.NotifyOfPropertyChange(nameof(Stocker11Installed)); }
 
-         }
 
-         private bool _stocker12Installed;
 
-         public bool Stocker12Installed
 
-         {
 
-             get { return _stocker12Installed; }
 
-             set { _stocker12Installed = value; this.NotifyOfPropertyChange(nameof(Stocker12Installed)); }
 
-         }
 
-         private bool _stocker13Installed;
 
-         public bool Stocker13Installed
 
-         {
 
-             get { return _stocker13Installed; }
 
-             set { _stocker13Installed = value; this.NotifyOfPropertyChange(nameof(Stocker13Installed)); }
 
-         }
 
-         private bool _stocker14Installed;
 
-         public bool Stocker14Installed
 
-         {
 
-             get { return _stocker14Installed; }
 
-             set { _stocker14Installed = value; this.NotifyOfPropertyChange(nameof(Stocker14Installed)); }
 
-         }
 
-         private bool _stocker15Installed;
 
-         public bool Stocker15Installed
 
-         {
 
-             get { return _stocker15Installed; }
 
-             set { _stocker15Installed = value; this.NotifyOfPropertyChange(nameof(Stocker15Installed)); }
 
-         }
 
-         private bool _stocker16Installed;
 
-         public bool Stocker16Installed
 
-         {
 
-             get { return _stocker16Installed; }
 
-             set { _stocker16Installed = value; this.NotifyOfPropertyChange(nameof(Stocker16Installed)); }
 
-         }
 
-         private bool _stocker17Installed;
 
-         public bool Stocker17Installed
 
-         {
 
-             get { return _stocker17Installed; }
 
-             set { _stocker17Installed = value; this.NotifyOfPropertyChange(nameof(Stocker17Installed)); }
 
-         }
 
-         private bool _stocker18Installed;
 
-         public bool Stocker18Installed
 
-         {
 
-             get { return _stocker18Installed; }
 
-             set { _stocker18Installed = value; this.NotifyOfPropertyChange(nameof(Stocker18Installed)); }
 
-         }
 
-         public bool Stocker19Installed { get; set; }
 
-         public bool Stocker20Installed { get; set; }
 
-         public bool Stocker21Installed { get; set; }
 
-         public bool Stocker1InstalledVisible { get; set; }
 
-         public bool Stocker2InstalledVisible { get; set; }
 
-         public bool Stocker3InstalledVisible { get; set; }
 
-         public bool Stocker4InstalledVisible { get; set; }
 
-         public bool Stocker5InstalledVisible { get; set; }
 
-         public bool Stocker6InstalledVisible { get; set; }
 
-         public bool Stocker7InstalledVisible { get; set; }
 
-         public bool Stocker8InstalledVisible { get; set; }
 
-         public bool Stocker9InstalledVisible { get; set; }
 
-         public bool Stocker10InstalledVisible { get; set; }
 
-         public bool Stocker11InstalledVisible { get; set; }
 
-         public bool Stocker12InstalledVisible { get; set; }
 
-         public bool Stocker13InstalledVisible { get; set; }
 
-         public bool Stocker14InstalledVisible { get; set; }
 
-         public bool Stocker15InstalledVisible { get; set; }
 
-         public bool Stocker16InstalledVisible { get; set; }
 
-         public bool Stocker17InstalledVisible { get; set; }
 
-         public bool Stocker18InstalledVisible { get; set; }
 
-         public bool Stocker19InstalledVisible { get; set; }
 
-         public bool Stocker20InstalledVisible { get; set; }
 
-         public bool Stocker21InstalledVisible { get; set; }
 
-         private List<string> _PMList { get; set; } = new List<string>() { "PM1" };
 
-         private List<string> _LPList { get; set; } = new List<string>() { "LP1", "LP2", "LP3", "LP4", };
 
-         private List<string> _FIMSList { get; set; } = new List<string>() { "FIMS1", "FIMS2" };
 
-         private List<string> _StockerList { get; set; } = new List<string>() { "Stocker1", "Stocker2", "Stocker3", "Stocker4", "Stocker5"
 
-                                                                                  , "Stocker6", "Stocker7", "Stocker8", "Stocker9", "Stocker10"
 
-                                                                                  , "Stocker11", "Stocker12", "Stocker13", "Stocker14", "Stocker15"
 
-                                                                                  , "Stocker16", "Stocker17", "Stocker18" };
 
-         private int _boatSlotCount;
 
-         private int _boatPWaferCount;
 
-         public int BoatPWaferCount
 
-         {
 
-             get => _boatPWaferCount;
 
-             set
 
-             {
 
-                 _boatPWaferCount = value;
 
-                 NotifyOfPropertyChange(nameof(BoatPWaferCount));
 
-             }
 
-         }
 
-         private int _boatM1WaferCount;
 
-         public int BoatM1WaferCount
 
-         {
 
-             get => _boatM1WaferCount;
 
-             set
 
-             {
 
-                 _boatM1WaferCount = value;
 
-                 NotifyOfPropertyChange(nameof(BoatM1WaferCount));
 
-             }
 
-         }
 
-         private int _boatM2WaferCount;
 
-         public int BoatM2WaferCount
 
-         {
 
-             get => _boatM2WaferCount;
 
-             set
 
-             {
 
-                 _boatM2WaferCount = value;
 
-                 NotifyOfPropertyChange(nameof(BoatM2WaferCount));
 
-             }
 
-         }
 
-         private int _boatSDWaferCount;
 
-         public int BoatSDWaferCount
 
-         {
 
-             get => _boatSDWaferCount;
 
-             set
 
-             {
 
-                 _boatSDWaferCount = value;
 
-                 NotifyOfPropertyChange(nameof(BoatSDWaferCount));
 
-             }
 
-         }
 
-         private int _boatEDWaferCount;
 
-         public int BoatEDWaferCount
 
-         {
 
-             get => _boatEDWaferCount;
 
-             set
 
-             {
 
-                 _boatEDWaferCount = value;
 
-                 NotifyOfPropertyChange(nameof(BoatEDWaferCount));
 
-             }
 
-         }
 
-         private int _boatEmptyWaferCount;
 
-         public int BoatEmptyWaferCount
 
-         {
 
-             get => _boatEmptyWaferCount;
 
-             set
 
-             {
 
-                 _boatEmptyWaferCount = value;
 
-                 NotifyOfPropertyChange(nameof(BoatEmptyWaferCount));
 
-             }
 
-         }
 
-         private string _boatAllWaferCount;
 
-         public string BoatAllWaferCount
 
-         {
 
-             get => _boatAllWaferCount;
 
-             set
 
-             {
 
-                 _boatAllWaferCount = value;
 
-                 NotifyOfPropertyChange(nameof(BoatAllWaferCount));
 
-             }
 
-         }
 
-         private List<string> _stockerWaferType;
 
-         public List<string> StockerWaferType
 
-         {
 
-             get => _stockerWaferType;
 
-             set
 
-             {
 
-                 _stockerWaferType = value;
 
-                 NotifyOfPropertyChange(nameof(StockerWaferType));
 
-             }
 
-         }
 
-         public Visibility IsStockerVisibility { get; set; }
 
-         public Visibility IsLPVisibility { get; set; }
 
-         public int LPPortCanvasTop { get; set; }
 
-         public SelfCheckViewModel()
 
-         {
 
-             this.DisplayName = "SelfCheckViewModel";
 
-             EnableTimer(true);
 
-         }
 
-         public void TestBoat()
 
-         {
 
-             if (BoatCurrentValue >= 1000)
 
-             {
 
-                 BoatCurrentValue = 0;
 
-             }
 
-             else
 
-             {
 
-                 BoatCurrentValue += 50;
 
-             }
 
-         }
 
-         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=-230, Root = 0, Arm = 180, Hand = 180 }
 
-                         ,EndPosition = new RobotPosition() { Root = 0, Arm = 0, Hand = 0 }}}
 
-                     ,{"ArmA.Stocker2", new StationPosition(){
 
-                         StartPosition = new RobotPosition() { X=-230, Root = 0, Arm =  180, Hand = 180 }
 
-                         ,EndPosition = new RobotPosition() { Root = 0, Arm = -20, Hand = 0 }}}
 
-                      ,{"ArmA.Stocker3", new StationPosition(){
 
-                          StartPosition = new RobotPosition() { X=-230, Root = 0, Arm =  180, Hand = 180 }
 
-                         ,EndPosition = new RobotPosition() { Root = 0, Arm = -20, Hand = 0 }}}
 
-                       ,{"ArmA.Stocker4", new StationPosition(){
 
-                         StartPosition = new RobotPosition() { X=-230, Root = 0, Arm =  180, Hand = 180 }
 
-                         ,EndPosition = new RobotPosition() { Root = 0, Arm = -20, Hand = 0 }}}
 
-                     ,{ "ArmA.Stocker5", new StationPosition() {
 
-                          StartPosition = new RobotPosition() { X=-325, Root = 0, Arm = 180, Hand = 180 }
 
-                         ,EndPosition = new RobotPosition() { Root = 0, Arm = 0, Hand = 0 }}}
 
-                      ,{ "ArmA.Stocker6", new StationPosition() {
 
-                          StartPosition = new RobotPosition() { X=-325, Root = 0, Arm = 180, Hand = 180 }
 
-                         ,EndPosition = new RobotPosition() { Root = 0, Arm = -20, Hand = 0 }}}
 
-                      ,{ "ArmA.Stocker7", new StationPosition() {
 
-                        StartPosition = new RobotPosition() { X=-325, Root = 0, Arm = 180, Hand = 180 }
 
-                         ,EndPosition = new RobotPosition() { Root = 0, Arm = -20, Hand = 0 }} }
 
-                     ,{"ArmA.Stocker8", new StationPosition(){
 
-                         StartPosition = new RobotPosition() { X =-325, Root = 0, Arm = 180, Hand = 180 }
 
-                      ,EndPosition = new RobotPosition() { Root = 0, Arm = -20, Hand = 0 }}}
 
-                      ,{ "ArmA.Stocker9", new StationPosition() {
 
-                          StartPosition = new RobotPosition() { X=-415, Root = 0, Arm =  180, Hand = 180 }
 
-                         ,EndPosition = new RobotPosition() { Root = 0, Arm = 0, Hand = 0 }}}
 
-                      ,{ "ArmA.Stocker10", new StationPosition() {
 
-                          StartPosition = new RobotPosition() { X=-415, Root = 0, Arm = 180, Hand = 180 }
 
-                         ,EndPosition = new RobotPosition() { Root = 0, Arm = -20, Hand = 0 }}}
 
-                        ,{ "ArmA.Stocker11", new StationPosition() {
 
-                          StartPosition = new RobotPosition() { X=-415, Root = 0, Arm = 180, Hand = 180 }
 
-                         ,EndPosition = new RobotPosition() { Root = 0, Arm = -20, Hand = 0 }}}
 
-                       ,{ "ArmA.Stocker12", new StationPosition() {
 
-                          StartPosition = new RobotPosition() { X=-415, Root = 0, Arm = 180, Hand = 180 }
 
-                         ,EndPosition = new RobotPosition() { Root = 0, Arm = -20, Hand = 0 }}}
 
-                       ,{"ArmA.Stocker13", new StationPosition() {
 
-                          StartPosition = new RobotPosition() { X=-500, Root = 0, Arm = 180, Hand = 180 }
 
-                         ,EndPosition = new RobotPosition() { Root = 0, Arm = 0, Hand = 0 }}}
 
-                      ,{ "ArmA.Stocker14", new StationPosition() {
 
-                          StartPosition = new RobotPosition() { X=-500, Root = 0, Arm = 180, Hand = 180 }
 
-                         ,EndPosition = new RobotPosition() { Root = 0, Arm = -20, Hand = 0 }}}
 
-                       ,{ "ArmA.Stocker15", new StationPosition() {
 
-                          StartPosition = new RobotPosition() { X=-500, Root = 0, Arm =  180, Hand = 180 }
 
-                         ,EndPosition = new RobotPosition() { Root = 0, Arm = -20, Hand = 0 }}}
 
-                      ,{ "ArmA.Stocker16", new StationPosition() {
 
-                          StartPosition = new RobotPosition() { X=-500, Root = 0, Arm = 180, Hand = 180 }
 
-                         ,EndPosition = new RobotPosition() { Root = 0, Arm = -20, Hand = 0 }}}
 
-                     ,{"ArmA.Stocker17", new StationPosition(){
 
-                         StartPosition = new RobotPosition() { X = -310, Root = 180, Arm = 180, Hand = 180 }
 
-                         ,EndPosition = new RobotPosition() { Root = 180, Arm = -20, Hand = 0 }}}
 
-                     ,{"ArmA.Stocker18", new StationPosition(){
 
-                         StartPosition = new RobotPosition() { X = -310, 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 = -210, Root = 180, Arm = 180, Hand = 180 }
 
-                         ,EndPosition = new RobotPosition() { Root = 180, Arm = -20, Hand = 0 }}}
 
-                       ,{"ArmA.LP2", new StationPosition(){
 
-                         StartPosition = new RobotPosition() { X = -210, Root = 180, Arm = 180, Hand = 180 }
 
-                         ,EndPosition = new RobotPosition() { Root = 180, Arm = 23, Hand = 0 }}}
 
-                     ,{"ArmA.LP3", new StationPosition(){
 
-                         StartPosition = new RobotPosition() { X = -453, Root = 180, Arm = 180, Hand = 180 }
 
-                         ,EndPosition = new RobotPosition() { Root = 180, Arm = -20, Hand = 0 }}}
 
-                     ,{"ArmA.LP4", new StationPosition(){
 
-                         StartPosition = new RobotPosition() { X = -453, 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=20, 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 bool IsSimulateMode { get; set; }
 
-         [Subscription("PM1.RunningModeIsDebug")]
 
-         public bool RunningModeIsDebug { get; set; }
 
-         protected override void OnInitialize()
 
-         {
 
-             base.OnInitialize();
 
-             //StockerWaferType = new List<string>();
 
-             //for (int i = 1; i <= 18; i++)
 
-             //{
 
-             //    var type = (string)QueryDataClient.Instance.Service.GetConfig($"System.Stocker.Stocker{i}WaferType").ToString().Replace("1", "").Replace("2", ""); ;
 
-             //    StockerWaferType.Add(type.ToString());
 
-             //}
 
-             #region GetModuleInstalled
 
-             foreach (var item in _PMList)
 
-             {
 
-                 var test = this.GetType().GetProperty($"{item}Installed");
 
-                 var test1 = this.GetType();
 
-                 this.GetType().GetProperty($"{item}Installed").SetValue(this, (bool)QueryDataClient.Instance.Service.GetConfig($"System.SetUp.Is{item}Installed"));
 
-             }
 
-             foreach (var item in _LPList)
 
-             {
 
-                 this.GetType().GetProperty($"{item}Installed").SetValue(this, (bool)QueryDataClient.Instance.Service.GetConfig($"System.SetUp.Is{item}Installed"));
 
-             }
 
-             foreach (var item in _FIMSList)
 
-             {
 
-                 this.GetType().GetProperty($"{item}Installed").SetValue(this, (bool)QueryDataClient.Instance.Service.GetConfig($"System.SetUp.Is{item}Installed"));
 
-             }
 
-             foreach (var item in _StockerList)
 
-             {
 
-                 this.GetType().GetProperty($"{item}Installed").SetValue(this, (bool)QueryDataClient.Instance.Service.GetConfig($"System.SetUp.Is{item}Installed"));
 
-             }
 
-             #endregion
 
-             base.InitFOUP();
 
-             //base.InitLL();
 
-             //base.InitTM();
 
-             //base.InitEFEM();
 
-             base.InitPM();
 
-             base.InitBuffer();
 
-         }
 
-         protected override void OnViewLoaded(object view)
 
-         {
 
-             base.OnViewLoaded(view);
 
-         }
 
-         protected override void OnActivate()
 
-         {
 
-             EnableTimer(true);
 
-             base.OnActivate();
 
-             _boatSlotCount = (int)QueryDataClient.Instance.Service.GetConfig("Boat.SlotCount");
 
-             BoatZMinValue = (int)QueryDataClient.Instance.Service.GetConfig("Boat.ZMinPosition");
 
-             BoatZMaxValue = (int)QueryDataClient.Instance.Service.GetConfig("Boat.ZMaxPosition");
 
-             IsSimulateMode = (bool)QueryDataClient.Instance.Service.GetConfig("System.IsSimulatorMode");
 
-             _cycleNumber = (int)QueryDataClient.Instance.Service.GetConfig("CarrierRobot.TransferModeNumber");
 
-             _cycleSwapNumber = (int)QueryDataClient.Instance.Service.GetConfig("CarrierRobot.RunToRunNumber");
 
-             _waferRobotCycleNumber = (int)QueryDataClient.Instance.Service.GetConfig("WaferRobot.TransferModeNumber");
 
-             CycleCountVisibility = (bool)QueryDataClient.Instance.Service.GetConfig("CarrierRobot.TransferMode") ? Visibility.Visible : Visibility.Hidden;
 
-             WaferRobotCycleCountVisibility = (bool)QueryDataClient.Instance.Service.GetConfig("WaferRobot.TransferMode") ? Visibility.Visible : Visibility.Hidden;
 
-             Stocker1Installed = (bool)QueryDataClient.Instance.Service.GetConfig($"System.SetUp.IsStocker1Installed");
 
-             Stocker2Installed = (bool)QueryDataClient.Instance.Service.GetConfig($"System.SetUp.IsStocker2Installed");
 
-             Stocker3Installed = (bool)QueryDataClient.Instance.Service.GetConfig($"System.SetUp.IsStocker3Installed");
 
-             Stocker4Installed = (bool)QueryDataClient.Instance.Service.GetConfig($"System.SetUp.IsStocker4Installed");
 
-             Stocker5Installed = (bool)QueryDataClient.Instance.Service.GetConfig($"System.SetUp.IsStocker5Installed");
 
-             Stocker6Installed = (bool)QueryDataClient.Instance.Service.GetConfig($"System.SetUp.IsStocker6Installed");
 
-             Stocker7Installed = (bool)QueryDataClient.Instance.Service.GetConfig($"System.SetUp.IsStocker7Installed");
 
-             Stocker8Installed = (bool)QueryDataClient.Instance.Service.GetConfig($"System.SetUp.IsStocker8Installed");
 
-             Stocker9Installed = (bool)QueryDataClient.Instance.Service.GetConfig($"System.SetUp.IsStocker9Installed");
 
-             Stocker10Installed = (bool)QueryDataClient.Instance.Service.GetConfig($"System.SetUp.IsStocker10Installed");
 
-             Stocker11Installed = (bool)QueryDataClient.Instance.Service.GetConfig($"System.SetUp.IsStocker11Installed");
 
-             Stocker12Installed = (bool)QueryDataClient.Instance.Service.GetConfig($"System.SetUp.IsStocker12Installed");
 
-             Stocker13Installed = (bool)QueryDataClient.Instance.Service.GetConfig($"System.SetUp.IsStocker13Installed");
 
-             Stocker14Installed = (bool)QueryDataClient.Instance.Service.GetConfig($"System.SetUp.IsStocker14Installed");
 
-             Stocker15Installed = (bool)QueryDataClient.Instance.Service.GetConfig($"System.SetUp.IsStocker15Installed");
 
-             Stocker16Installed = (bool)QueryDataClient.Instance.Service.GetConfig($"System.SetUp.IsStocker16Installed");
 
-             Stocker17Installed = (bool)QueryDataClient.Instance.Service.GetConfig($"System.SetUp.IsStocker17Installed");
 
-             Stocker18Installed = (bool)QueryDataClient.Instance.Service.GetConfig($"System.SetUp.IsStocker18Installed");
 
-         }
 
-         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",
 
-         //    "FIMS1","FIMS2","CarrierRobot","LP1","LP2","LP3","LP4"};
 
-         protected override void InvokeAfterUpdateProperty(Dictionary<string, object> data)
 
-         {
 
-             base.InvokeAfterUpdateProperty(data);
 
-             //IsShowBoatElevatorRobot = RefreshBoatWafersTask();
 
-             //  if (Stocker1CarrierData != null)
 
-             // Stocker1CarrierData = new CarrierInfo(10)
 
-             // { Status = CarrierStatus.Normal, HasWaferIn=true };
 
-             //  Stocker1CassetteType = "ED";//(bool)QueryDataClient.Instance.Service.GetConfig("System.SetUp.IsStocker1Installed") && Stocker1CarrierData?.Status.ToString() == "Normal" ? Stocker1CarrierData?.CarrierType.ToString() : "";
 
-             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());
 
-                 }
 
-             }
 
-             if (ModuleManager.ModuleInfos.ContainsKey("WaferRobot"))
 
-             {
 
-                 WaferInfo[] waferInfos = ModuleManager.ModuleInfos["WaferRobot"].WaferManager.Wafers.ToArray();
 
-                 if (waferInfos.Count() > 0)
 
-                 {
 
-                     WaferRobotWafer1 = waferInfos[0];
 
-                 }
 
-                 if (waferInfos.Count() > 1)
 
-                 {
 
-                     WaferRobotWafer2 = waferInfos[1];
 
-                 }
 
-             }
 
-             var isLoadPortPosition = (string)QueryDataClient.Instance.Service.GetConfig("LoadPort.LoadPortPosition");
 
-             if (isLoadPortPosition == "Upper")
 
-             {
 
-                 IsStockerVisibility = Visibility.Hidden;
 
-                 IsLPVisibility = Visibility.Visible;
 
-                 LPPortCanvasTop = 5;
 
-             }
 
-             else
 
-             {
 
-                 IsStockerVisibility = Visibility.Visible;
 
-                 IsLPVisibility = Visibility.Hidden;
 
-                 LPPortCanvasTop = 352;
 
-             }
 
-             RefreshBoatWafers();
 
-         }
 
-         private void RefreshBoatWafers()
 
-         {
 
-             var wafers = ModuleManager.ModuleInfos["PM1"].WaferManager.Wafers.Reverse().ToList();
 
-             int NumberP = 0, NumberM1 = 0, NumberM2 = 0, NumberSD = 0, NumberED = 0, NumberT = 0, NumberXD = 0;
 
-             for (int i = 0; i < wafers.Count; i++)
 
-             {
 
-                 if (ModuleManager.ModuleInfos["PM1"].WaferManager.Wafers.Count > i)
 
-                 {
 
-                     var wafer = wafers[i];
 
-                     if (wafer.WaferStatus != 0)//empty
 
-                     {
 
-                         switch (wafer.WaferType.ToString())
 
-                         {
 
-                             case "P":
 
-                                 NumberP++;
 
-                                 break;
 
-                             case "M1":
 
-                                 NumberM1++;
 
-                                 break;
 
-                             case "M2":
 
-                                 NumberM2++;
 
-                                 break;
 
-                             case "SD":
 
-                                 NumberSD++;
 
-                                 break;
 
-                             case "ED":
 
-                                 NumberED++;
 
-                                 break;
 
-                         }
 
-                     }
 
-                 }
 
-             }
 
-             BoatPWaferCount = NumberP;
 
-             BoatM1WaferCount = NumberM1;
 
-             BoatM2WaferCount = NumberM2;
 
-             BoatSDWaferCount = NumberSD;
 
-             BoatEDWaferCount = NumberED;
 
-             BoatEmptyWaferCount = _boatSlotCount - BoatPWaferCount - BoatM1WaferCount - BoatM2WaferCount - BoatSDWaferCount - BoatEDWaferCount;
 
-             BoatAllWaferCount = $"{BoatPWaferCount + BoatM1WaferCount + BoatM2WaferCount + BoatSDWaferCount + BoatEDWaferCount}/{_boatSlotCount}";
 
-         }
 
-         private bool RefreshBoatWafersTask()
 
-         {
 
-             var wafers = ModuleManager.ModuleInfos["PM1"].WaferManager.Wafers.Reverse().ToList();
 
-             for (int i = 0; i < (int)QueryDataClient.Instance.Service.GetConfig("Boat.SlotCount"); i++)
 
-             {
 
-                 if (ModuleManager.ModuleInfos["PM1"].WaferManager.Wafers.Count > i)
 
-                 {
 
-                     var wafer = wafers[i];
 
-                     if (wafer.WaferStatus != 0)//empty
 
-                     {
 
-                         return true;
 
-                     }
 
-                 }
 
-             }
 
-             return false;
 
-         }
 
-         public void SwitchPage(string page)
 
-         {
 
-         }
 
-         public void Abort()
 
-         {
 
-             InvokeClient.Instance.Service.DoOperation("System.Abort");
 
-         }
 
-         public void Home(string module)
 
-         {
 
-             InvokeClient.Instance.Service.DoOperation($"{module}.Home");
 
-         }
 
-         public void HomeAll()
 
-         {
 
-             InvokeClient.Instance.Service.DoOperation("System.HomeAll");
 
-         }
 
-         public void CassetteIn()
 
-         {
 
-             InvokeClient.Instance.Service.DoOperation($"{ModuleName.CassetteRobot}.In");
 
-         }
 
-         public void CassetteOut()
 
-         {
 
-             InvokeClient.Instance.Service.DoOperation($"{ModuleName.CassetteRobot}.Out");
 
-         }
 
-         public void ShowSensors()
 
-         {
 
-             //WindowManager wm = new WindowManager();
 
-             //SensorsViewModel svm = new SensorsViewModel();
 
-             //wm.ShowDialogWithTitle(svm, null, "Sensor Information");
 
-         }
 
-         public void BoatWafers()
 
-         {
 
-             //WindowManager wm = new WindowManager();
 
-             //BoatWaferViewModel svm = new BoatWaferViewModel();
 
-             //wm.ShowDialogWithTitle(svm, null, "Boat Wafer");
 
-         }
 
-         public void WaferRobotWafers()
 
-         {
 
-             //WindowManager wm = new WindowManager();
 
-             //WaferRobotWaferViewModel svm = new WaferRobotWaferViewModel();
 
-             //wm.ShowDialogWithTitle(svm, null, "Wafer Robot Wafer");
 
-         }
 
-         public void StageWafers()
 
-         {
 
-             //WindowManager wm = new WindowManager();
 
-             //StageCassetteViewModel svm = new StageCassetteViewModel();
 
-             //wm.ShowDialogWithTitle(svm, null, "Stage Wafer");
 
-         }
 
-         public void CassetteRobotWafers()
 
-         {
 
-             //WindowManager wm = new WindowManager();
 
-             //CassetteRobotWaferViewModel svm = new CassetteRobotWaferViewModel();
 
-             //wm.ShowDialogWithTitle(svm, null, "Cassette Robot Wafer");
 
-         }
 
-         protected override void Poll()
 
-         {
 
-             if (GetView() != null)
 
-             {
 
-                 //Application.Current.Dispatcher.Invoke(() =>
 
-                 //{
 
-                 //    ((SelfCheckView)GetView()).ATMArmRobotTwo.Wafer1 = WaferRobotWafer1;
 
-                 //}
 
-                 //);
 
-             }
 
-             base.Poll();
 
-         }
 
-         public void DeleteWafer()
 
-         {
 
-             if (DialogBox.Confirm("Are you sure you want to DeleteAllWafer?"))
 
-                 InvokeClient.Instance.Service.DoOperation("System.DeleteAllWafer");
 
-         }
 
-         public void DeleteCarrier()
 
-         {
 
-             if (DialogBox.Confirm("Are you sure you want to DeleteAllCarrier?"))
 
-                 InvokeClient.Instance.Service.DoOperation("System.DeleteAllCarrier");
 
-         }
 
-         public void Reset()
 
-         {
 
-             if (DialogBox.Confirm("Are you sure you want to Reset?"))
 
-                 InvokeClient.Instance.Service.DoOperation("System.Reset");
 
-         }
 
-         public void ManualOperation(string deviceName)
 
-         {
 
-             var windowManager = IoC.Get<IWindowManager>();
 
-             switch (deviceName)
 
-             {
 
-                 case "LP1":
 
-                     {
 
-                         LPSensorViewModel lpViewModel = new LPSensorViewModel();
 
-                         lpViewModel.LP1BorderVisibility = true;
 
-                         lpViewModel.LP2BorderVisibility = false;
 
-                         lpViewModel.LP3BorderVisibility = false;
 
-                         lpViewModel.LP4BorderVisibility = false;
 
-                         lpViewModel.TabSelectIndex = 0;
 
-                         (windowManager as WindowManager)?.ShowDialogWithTitle(lpViewModel, this, null, "LP1 Manual");
 
-                     }
 
-                     break;
 
-                 case "LP2":
 
-                     {
 
-                         LPSensorViewModel lpViewModel = new LPSensorViewModel();
 
-                         lpViewModel.LP1BorderVisibility = false;
 
-                         lpViewModel.LP2BorderVisibility = true;
 
-                         lpViewModel.LP3BorderVisibility = false;
 
-                         lpViewModel.LP4BorderVisibility = false;
 
-                         lpViewModel.TabSelectIndex = 1;
 
-                         (windowManager as WindowManager)?.ShowDialogWithTitle(lpViewModel, this, null, "LP2 Manual");
 
-                     }
 
-                     break;
 
-                 case "LP3":
 
-                     {
 
-                         LPSensorViewModel lpViewModel = new LPSensorViewModel();
 
-                         lpViewModel.LP1BorderVisibility = false;
 
-                         lpViewModel.LP2BorderVisibility = false;
 
-                         lpViewModel.LP3BorderVisibility = true;
 
-                         lpViewModel.LP4BorderVisibility = false;
 
-                         lpViewModel.TabSelectIndex = 2;
 
-                         (windowManager as WindowManager)?.ShowDialogWithTitle(lpViewModel, this, null, "LP3 Manual");
 
-                     }
 
-                     break;
 
-                 case "LP4":
 
-                     {
 
-                         LPSensorViewModel lpViewModel = new LPSensorViewModel();
 
-                         lpViewModel.LP1BorderVisibility = false;
 
-                         lpViewModel.LP2BorderVisibility = false;
 
-                         lpViewModel.LP3BorderVisibility = false;
 
-                         lpViewModel.LP4BorderVisibility = true;
 
-                         lpViewModel.TabSelectIndex = 3;
 
-                         (windowManager as WindowManager)?.ShowDialogWithTitle(lpViewModel, this, null, "LP4 Manual");
 
-                     }
 
-                     break;
 
-                 case "FIMS1":
 
-                 case "FIMS2":
 
-                     {
 
-                         FIMSSensorViewModel fimsSensorViewModel = new FIMSSensorViewModel();
 
-                         (windowManager as WindowManager)?.ShowDialogWithTitle(fimsSensorViewModel, this, null, "FIMS Manual");
 
-                     }
 
-                     break;
 
-                 default:
 
-                     break;
 
-             }
 
-         }
 
-         public void PopupPage(string page)
 
-         {
 
-             var windowManager = IoC.Get<IWindowManager>();
 
-             switch (page)
 
-             {
 
-                 case "SMIFA":
 
-                     {
 
-                         SMIFViewModel smifViewModel = new SMIFViewModel();
 
-                         (windowManager as WindowManager)?.ShowDialogWithTitle(smifViewModel, this, null, "SMIF Status");
 
-                     }
 
-                     break;
 
-                 case "SMIFB":
 
-                     {
 
-                         SMIFViewModel smifViewModel = new SMIFViewModel();
 
-                         (windowManager as WindowManager)?.ShowDialogWithTitle(smifViewModel, this, null, "SMIF Status");
 
-                     }
 
-                     break;
 
-                 case "CassetteRobot":
 
-                     CassetteRobotViewModel cassetteRobotViewModel = new CassetteRobotViewModel();
 
-                     cassetteRobotViewModel.SystemName = "SMIFA";
 
-                     (windowManager as WindowManager)?.ShowDialogWithTitle(cassetteRobotViewModel, this, null, "FTR Operate");
 
-                     break;
 
-                 case "WaferRobot":
 
-                     WaferRobotViewModel waferRobotViewModel = new WaferRobotViewModel();
 
-                     (windowManager as WindowManager)?.ShowDialogWithTitle(waferRobotViewModel, this, null, "WTR Operate");
 
-                     break;
 
-                 case "Stage":
 
-                     StageSensorViewModel stageSensorViewModel = new StageSensorViewModel();
 
-                     (windowManager as WindowManager)?.ShowDialogWithTitle(stageSensorViewModel, this, null, "Stage Status");
 
-                     break;
 
-                 case "Stocker":
 
-                     StockerSensorViewModel stockerSensorViewModel = new StockerSensorViewModel();
 
-                     (windowManager as WindowManager)?.ShowDialogWithTitle(stockerSensorViewModel, this, null, "Stocker Status");
 
-                     break;
 
-                 case "Boat":
 
-                     BoatSensorViewModel boatSensorViewModel = new BoatSensorViewModel();
 
-                     (windowManager as WindowManager)?.ShowDialogWithTitle(boatSensorViewModel, this, null, "Boat Operate");
 
-                     break;
 
-                 default:
 
-                     break;
 
-             }
 
-         }
 
-         public void CanvasMouseLeftButtonDown(object sender)
 
-         {
 
-             //var windowManager = IoC.Get<IWindowManager>();
 
-             //Point pp = Mouse.GetPosition((IInputElement)sender);
 
-             //if ((pp.X > 80 && pp.X < 310 && pp.Y > 80 && pp.Y < 340) || (pp.X > 350 && pp.X < 550 && pp.Y > 80 && pp.Y < 400))
 
-             //{
 
-             //    StockerSensorViewModel stockerSensorViewModel = new StockerSensorViewModel();
 
-             //    (windowManager as WindowManager)?.ShowDialogWithTitle(stockerSensorViewModel, null, "Stocker Status");
 
-             //}
 
-             //else if (pp.X > 350 && pp.X < 500 && pp.Y > 410 && pp.Y < 625)
 
-             //{
 
-             //    StageSensorViewModel stageSensorViewModel = new StageSensorViewModel();
 
-             //    (windowManager as WindowManager)?.ShowDialogWithTitle(stageSensorViewModel, null, "Stage Status");
 
-             //}
 
-             //else if (pp.X > 590 && pp.X < 755 && pp.Y > 100 && pp.Y < 620)
 
-             //{
 
-             //    BoatSensorViewModel boatSensorViewModel = new BoatSensorViewModel();
 
-             //    (windowManager as WindowManager)?.ShowDialogWithTitle(boatSensorViewModel, null, "Boat Status");
 
-             //}
 
-         }
 
-         public void BoatModify()
 
-         {
 
-             var windowManager = IoC.Get<IWindowManager>();
 
-             BoatModifyViewModel boatModifyViewModel = new BoatModifyViewModel(ModuleName.PM1.ToString());
 
-             (windowManager as WindowManager)?.ShowDialogWithTitle(boatModifyViewModel, this, null, "Boat Wafer");
 
-         }
 
-         public void PopupModule(string module)
 
-         {
 
-             var windowManager = IoC.Get<IWindowManager>();
 
-             switch (module)
 
-             {
 
-                 case "Init":
 
-                     SelfCheckInitViewModel shelfCheckInitViewModel = new SelfCheckInitViewModel();
 
-                     (windowManager as WindowManager)?.ShowDialogWithTitle(shelfCheckInitViewModel, this, null, "Init");
 
-                     break;
 
-                 case "ManualOperation":
 
-                     SelfCheckManualOperationViewModel shelfCheckManualOperationViewModel = new SelfCheckManualOperationViewModel();
 
-                     (windowManager as WindowManager)?.ShowDialogWithTitle(shelfCheckManualOperationViewModel, this, null, "Manual Operation");
 
-                     break;
 
-                 case "Modify":
 
-                     SelfCheckModifyViewModel shelfCheckModifyViewModel = new SelfCheckModifyViewModel();
 
-                     (windowManager as WindowManager)?.ShowDialogWithTitle(shelfCheckModifyViewModel, this, null, "Modify Wafers");
 
-                     break;
 
-                     //case "SensorStatus":
 
-                     //    SensorsViewModel sensorsViewModel = new SensorsViewModel();
 
-                     //    (windowManager as WindowManager)?.ShowDialogWithTitle(sensorsViewModel, null, "Sensor Status");
 
-                     //    break;
 
-             }
 
-         }
 
-    
 
-         public void RobotCommand()
 
-         {
 
-             var windowManager = IoC.Get<IWindowManager>();
 
-             RobotCommandViewModel robotCommandViewModel = new RobotCommandViewModel();
 
-             (windowManager as WindowManager)?.ShowDialogWithTitle(robotCommandViewModel, this, null, "Modify");
 
-         }
 
-         public void CloseCmd()
 
-         {
 
-             ClientApp.Instance.SwitchPage("status", "main", null);
 
-         }
 
-         public void ReturnWafer()
 
-         {
 
-             if (DialogBox.Confirm("Are you sure you want to ReturnAllWafer?"))
 
-                 InvokeClient.Instance.Service.DoOperation("System.ReturnAllWafer");
 
-         }
 
-     }
 
- }
 
 
  |