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