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; 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; } public ICommand CreateCassetteCommand { get; private set; } public ICommand DeleteCassetteCommand { get; private 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 IsEnableReturnWafer { get { return 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 _PMList { get; set; } = new List() { "PM1" }; private List _LPList { get; set; } = new List() { "LP1", "LP2", "LP3", "LP4", }; private List _FIMSList { get; set; } = new List() { "FIMS1", "FIMS2" }; private List _StockerList { get; set; } = new List() { "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 _stockerWaferType; public List 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"; CreateCassetteCommand = new DelegateCommand(CreateCassette); DeleteCassetteCommand = new DelegateCommand(DeleteCassette); EnableTimer(true); } public void TestBoat() { if (BoatCurrentValue >= 1000) { BoatCurrentValue = 0; } else { BoatCurrentValue += 50; } } public Dictionary StationPosition { get { return new Dictionary() { { "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 StationPosition2 { get { return new Dictionary() { { "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 StationPosition3 { get { return new Dictionary() { { "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; } protected override void OnInitialize() { base.OnInitialize(); //StockerWaferType = new List(); //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 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(); WaferRobotWafer1 = waferInfos[0]; 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 CreateCassette(string module) { InvokeClient.Instance.Service.DoOperation("CreateCarrier", module, 0); } public void DeleteCassette(string module) { InvokeClient.Instance.Service.DoOperation("DeleteCarrier", module, 0); } 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() { InvokeClient.Instance.Service.DoOperation("System.DeleteAllWafer"); } public void DeleteCarrier() { InvokeClient.Instance.Service.DoOperation("System.DeleteAllCarrier"); } public void Reset() { InvokeClient.Instance.Service.DoOperation("System.Reset"); } public void ManualOperation(string deviceName) { var windowManager = IoC.Get(); 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, 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, 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, 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, null, "LP4 Manual"); } break; case "FIMS1": case "FIMS2": { FIMSSensorViewModel fimsSensorViewModel = new FIMSSensorViewModel(); (windowManager as WindowManager)?.ShowDialogWithTitle(fimsSensorViewModel, null, "FIMS Manual"); } break; default: break; } } public void PopupPage(string page) { var windowManager = IoC.Get(); switch (page) { case "SMIFA": { SMIFViewModel smifViewModel = new SMIFViewModel(); (windowManager as WindowManager)?.ShowDialogWithTitle(smifViewModel, null, "SMIF Status"); } break; case "SMIFB": { SMIFViewModel smifViewModel = new SMIFViewModel(); (windowManager as WindowManager)?.ShowDialogWithTitle(smifViewModel, null, "SMIF Status"); } break; case "CassetteRobot": CassetteRobotViewModel cassetteRobotViewModel = new CassetteRobotViewModel(); (windowManager as WindowManager)?.ShowDialogWithTitle(cassetteRobotViewModel, null, "CassetteRobot Status"); break; case "WaferRobot": WaferRobotViewModel waferRobotViewModel = new WaferRobotViewModel(); (windowManager as WindowManager)?.ShowDialogWithTitle(waferRobotViewModel, null, "WaferRobot Status"); break; case "Stage": StageSensorViewModel stageSensorViewModel = new StageSensorViewModel(); (windowManager as WindowManager)?.ShowDialogWithTitle(stageSensorViewModel, null, "Stage Status"); break; case "Stocker": StockerSensorViewModel stockerSensorViewModel = new StockerSensorViewModel(); (windowManager as WindowManager)?.ShowDialogWithTitle(stockerSensorViewModel, null, "Stocker Status"); break; case "Boat": BoatSensorViewModel boatSensorViewModel = new BoatSensorViewModel(); (windowManager as WindowManager)?.ShowDialogWithTitle(boatSensorViewModel, null, "Boat Status"); break; default: break; } } public void CanvasMouseLeftButtonDown(object sender) { //var windowManager = IoC.Get(); //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(); BoatModifyViewModel boatModifyViewModel = new BoatModifyViewModel(ModuleName.PM1.ToString()); (windowManager as WindowManager)?.ShowDialogWithTitle(boatModifyViewModel, null, "Boat Wafer"); } public void PopupModule(string module) { var windowManager = IoC.Get(); switch (module) { case "Init": SelfCheckInitViewModel shelfCheckInitViewModel = new SelfCheckInitViewModel(); (windowManager as WindowManager)?.ShowDialogWithTitle(shelfCheckInitViewModel, null, "Init"); break; case "ManualOperation": SelfCheckManualOperationViewModel shelfCheckManualOperationViewModel = new SelfCheckManualOperationViewModel(); (windowManager as WindowManager)?.ShowDialogWithTitle(shelfCheckManualOperationViewModel, null, "Manual Operation"); break; case "Modify": SelfCheckModifyViewModel shelfCheckModifyViewModel = new SelfCheckModifyViewModel(); (windowManager as WindowManager)?.ShowDialogWithTitle(shelfCheckModifyViewModel, null, "Modify"); break; //case "SensorStatus": // SensorsViewModel sensorsViewModel = new SensorsViewModel(); // (windowManager as WindowManager)?.ShowDialogWithTitle(sensorsViewModel, null, "Sensor Status"); // break; } } public void RobotCommand() { var windowManager = IoC.Get(); RobotCommandViewModel robotCommandViewModel = new RobotCommandViewModel(); (windowManager as WindowManager)?.ShowDialogWithTitle(robotCommandViewModel, null, "Modify"); } public void CloseCmd() { ClientApp.Instance.SwitchPage("status", "main", null); } public void ReturnWafer() { InvokeClient.Instance.Service.DoOperation("System.ReturnAllWafer"); } } }