| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821 | using System.Collections.Generic;using System.Windows;using System.Windows.Controls;using Aitex.Core.Common;using Aitex.Core.UI.MVVM;using Aitex.Sorter.UI.Controls;using System.Windows.Input;using Aitex.Core.Util;using Aitex.Core.Utilities;using Aitex.Sorter.Common;using MECF.Framework.Common.OperationCenter;using MECF.Framework.Common.CommonData;using System;using EfemUI.Views.CarrierList;using MECF.Framework.Common.Equipment;using System.Collections.ObjectModel;using System.Linq;using Aitex.Sorter.UI.Controls.Common;namespace Aitex.Sorter.UI.ViewModel{    class OperationViewModelLPAB : OperationMultiLPViewModel    {        #region CMD        public ICommand StartCycleCommand { get; set; }        public ICommand SetWaferSize3 { get; set; }        public ICommand SetWaferSize4 { get; set; }        public ICommand SetWaferSize6 { get; set; }        public ICommand SetWaferSize8 { get; set; }        public ICommand SetWaferThick { get; set; }        public ICommand SetWaferThin { get; set; }        public ICommand SetLPSlot13 { get; set; }        public ICommand SetLPSlot25 { get; set; }        public ICommand SetFFUCommand { get; set; }        public ICommand SetTransCarrierTypeCommand { get; set; }        public ICommand MapCommand { get; set; }        public ICommand LoadCommand { get; set; }        public ICommand UnloadCommand { get; set; }        public ICommand ReadLPIDCommand { get; set; }        #endregion        public ObservableCollection<FoupListItem> BufferList { get; set; }        public bool EnablePageControl        {            get { return !IsOnlineMode; }        }        [Subscription("System.Robot.CurrentReadSpeedData")]        public int CurrentReadSpeedData { get; set; }        [Subscription("FFU.FFU1Speed")]        public int FFU1Speed { get; set; }        [Subscription("System.IsOnlineMode")]        public bool IsOnlineMode        {            get;            set;        }        [Subscription("LP1.WaferSizeInfo")]        public string WaferSize1 { get; set; }        [Subscription("LP2.WaferSizeInfo")]        public string WaferSize2 { get; set; }        [Subscription("Aligner1.Aligner1.WaferSizeByWafer")]        public string WaferSizeAligner1 { get; set; }        [Subscription("Aligner2.Aligner2.WaferSizeByWafer")]        public string WaferSizeAligner2 { get; set; }        [Subscription("CoolingBuffer1.CoolingBuffer1.WaferSizeByWafer")]        public string WaferSizeCoolingBuffer1 { get; set; }        [Subscription("CoolingBuffer2.CoolingBuffer2.WaferSizeByWafer")]        public string WaferSizeCoolingBuffer2 { get; set; }        [Subscription("Buffer1.WaferSizeByWafer")]        public string WaferSizeBuffer1 { get; set; }        [Subscription("Buffer2.WaferSizeByWafer")]        public string WaferSizeBuffer2 { get; set; }        [Subscription("LL1.WaferSize")]        public string WaferSizeLL1 { get; set; }        [Subscription("LL2.WaferSize")]        public string WaferSizeLL2 { get; set; }        //[Subscription("Buffer1.WaferSize")]        //public string WaferSizeBuffer1 { get; set; }        //[Subscription("Buffer2.WaferSize")]        //public string WaferSizeBuffer2 { get; set; }        [Subscription("Robot.Blade1WaferSize")]        public string WaferSizeRobot1 { get; set; }        [Subscription("Robot.Blade2WaferSize")]        public string WaferSizeRobot2 { get; set; }        [Subscription("Robot.WaferSize")]        public string WaferSizeRobot { get; set; }        [Subscription("LP1.WaferThickness")]        public string LP1WaferThickness { get; set; }        [Subscription("LP2.WaferThickness")]        public string LP2WaferThickness { get; set; }        [Subscription("Cooling1.WaferThickness")]        public string Cooling1WaferThickness { get; set; }        [Subscription("Cooling2.WaferThickness")]        public string Cooling2WaferThickness { get; set; }        [Subscription("LL1.WaferThickness")]        public string PMAWaferThickness { get; set; }        [Subscription("LL2.WaferThickness")]        public string PMBWaferThickness { get; set; }        [Subscription("Buffer1.WaferThickness")]        public string Buffer1WaferThickness { get; set; }        [Subscription("Buffer2.WaferThickness")]        public string Buffer2WaferThickness { get; set; }        [Subscription("Aligner1.WaferThickness")]        public string Aligner1WaferThickness { get; set; }        [Subscription("Aligner2.WaferThickness")]        public string Aligner2WaferThickness { get; set; }        [Subscription("Upper.WaferThickness")]        public string UpperWaferThickness { get; set; }        [Subscription("Lower.WaferThickness")]        public string LowerWaferThickness { get; set; }        [Subscription("LP1.ValidSlotsNumber")]        public int LP1ValidSlotsNumber { get; set; }        [Subscription("LP2.ValidSlotsNumber")]        public int LP2ValidSlotsNumber { get; set; }         [Subscription("System.IsEnableBufferMap")]        public bool IsBufferMapEnable { get; set; }        [Subscription("System.IsEnableIdentifyThickness")]        public bool IsEnableIdentifyThickness { get; set; }        [Subscription("System.IsEnableMultiWaferSize")]        public bool IsEnableMultiWaferSize { get; set; }        [Subscription("System.IsEnableMultiWaferSizeShow")]        public bool IsEnableMultiWaferSizeShow { get; set; }        [Subscription("System.IsSlotShowOpposite")]        public bool IsSlotShowOpposite { get; set; }        public Visibility SlotShow2 => IsSlotShowOpposite ? Visibility.Hidden : Visibility.Visible;        public Visibility SlotShow1 => !IsSlotShowOpposite ? Visibility.Hidden : Visibility.Visible;        public Visibility EnableIdentifyThickness        {            get            {                if (IsEnableIdentifyThickness)                    return Visibility.Visible;                return Visibility.Hidden;            }        }        public Visibility EnableMultiWaferSize        {            get            {                if (IsEnableMultiWaferSize && IsEnableMultiWaferSizeShow)                    return Visibility.Visible;                return Visibility.Hidden;            }        }        [Subscription(ParamName.ModuleWaferList, DeviceName.CoolingBuffer1)]        public WaferInfo[] CoolingBuffer1Wafers        {            get;            set;        }        public WaferInfo CoolingBuffer1Wafer        {            get => CoolingBuffer1Wafers != null ? CoolingBuffer1Wafers[0] : null;        }        [Subscription(ParamName.ModuleWaferList, DeviceName.CoolingBuffer2)]        public WaferInfo[] CoolingBuffer2Wafers        {            get;            set;        }        public WaferInfo CoolingBuffer2Wafer        {            get => CoolingBuffer2Wafers != null ? CoolingBuffer2Wafers[0] : null;        }        [Subscription(ParamName.ModuleWaferList, DeviceName.Aligner1)]        public WaferInfo[] Aligner1Wafers        {            get;            set;        }        public WaferInfo Aligner1Wafer        {            get => Aligner1Wafers != null ? Aligner1Wafers[0] : null;        }        [Subscription(ParamName.ModuleWaferList, DeviceName.Aligner2)]        public WaferInfo[] Aligner2Wafers        {            get;            set;        }        public WaferInfo Aligner2Wafer        {            get => Aligner2Wafers != null ? Aligner2Wafers[0] : null;        }        [Subscription(ParamName.ModuleWaferList, DeviceName.Buffer)]        public WaferInfo[] LlbWaferInfo        {            get            {                return BufferList.Count >= 1 ? BufferList[0].WaferInfos : null;            }            set => UpdateBufferWafers(value, 0);        }        [Subscription(ParamName.ModuleWaferList, DeviceName.Buffer1)]        public WaferInfo[] LlbWaferInfo1        {            get            {                return BufferList.Count >= 2 ? BufferList[1].WaferInfos : null;            }            set => UpdateBufferWafers(value, 1);        }        [Subscription(ParamName.ModuleWaferList, DeviceName.Buffer2)]        public WaferInfo[] LlbWaferInfo2        {            get            {                return BufferList.Count >= 3 ? BufferList[2].WaferInfos : null;             }            set => UpdateBufferWafers(value, 2);        }        [Subscription("ValidSlotsNumber", DeviceName.Buffer)]        public int ValidSlotsNum        {            get            {                return BufferList.Count >= 1 ? BufferList[0].SlotCount : 0;            }            set            {                if (BufferList.Count >= 1) BufferList[0].SlotCount = value;            }        }        [Subscription("ValidSlotsNumber", DeviceName.Buffer1)]        public int ValidSlotsNum1        {            get             {                return BufferList.Count >= 2 ? BufferList[1].SlotCount : 0;             }            set            {                if (BufferList.Count >= 2) BufferList[1].SlotCount = value;            }        }        [Subscription("ValidSlotsNumber", DeviceName.Buffer2)]        public int ValidSlotsNum2        {            get            {                return BufferList.Count >= 3 ? BufferList[2].SlotCount : 0;            }            set            {                if(BufferList.Count >= 3) BufferList[2].SlotCount = value;            }         }        /// <summary>        /// Update Buffer WaferInfos        /// </summary>        /// <param name="sourceWaferInfos"></param>        /// <param name="index"></param>        private void UpdateBufferWafers(WaferInfo[] sourceWaferInfos, int index)        {            WaferInfo[] wafers;            if (IsSlotShowOpposite)            {                wafers = UpdateWaferInfo(sourceWaferInfos.ToArray());            }            else            {                wafers = UpdateWaferInfo(sourceWaferInfos.Reverse().ToArray());            }                            if (BufferList.Count < index + 1) return;            if (index == 0)            {                BufferList[index].IsShow = BufferEnable;            }            else if (index == 1)            {                BufferList[index].IsShow = Buffer1Enable;            }            else if (index == 2)            {                BufferList[index].IsShow = Buffer2Enable;            }            if (BufferList[index].WaferInfos == null)            {                BufferList[index].WaferInfos = wafers;            }            else            {                for (int i = 0; i < BufferList[index].WaferInfos.Length; i++)                {                    BufferList[index].WaferInfos[i].Update(wafers[i]);                }            }                                  }        #region Cycle        [IgnorePropertyChange]        public ComboBoxItem CycleFrom { get; set; }        [IgnorePropertyChange]        public ComboBoxItem CycleTo { get; set; }        [IgnorePropertyChange]        public bool Ll1IsChecked { get; set; }        [IgnorePropertyChange]        public bool Ll2IsChecked { get; set; }        [IgnorePropertyChange]        public bool Ll3IsChecked { get; set; }        [IgnorePropertyChange]        public bool Ll4IsChecked { get; set; }        [IgnorePropertyChange]        public bool Ll5IsChecked { get; set; }        [IgnorePropertyChange]        public bool Ll6IsChecked { get; set; }        [IgnorePropertyChange]        public bool Ll7IsChecked { get; set; }        [IgnorePropertyChange]        public bool Ll8IsChecked { get; set; }        [IgnorePropertyChange]        public bool CoolingBuffer1IsChecked { get; set; }        [IgnorePropertyChange]        public bool CoolingBuffer2IsChecked { get; set; }        [IgnorePropertyChange]        public bool Aligner1IsChecked { get; set; }        [IgnorePropertyChange]        public bool Aligner2IsChecked { get; set; }        [IgnorePropertyChange]        public bool BufferIsChecked { get; set; }        [IgnorePropertyChange]        public bool Buffer1IsChecked { get; set; }        [IgnorePropertyChange]        public bool Buffer2IsChecked { get; set; }        #endregion        #region Moudle Enable Flag        [Subscription("LP1.IsEnable")]        public bool LP1Enable { get; set; }        [Subscription("LP2.IsEnable")]        public bool LP2Enable { get; set; }        [Subscription("Aligner1.IsEnable")]        public bool Aligner1Enable { get; set; }        [Subscription("Aligner2.IsEnable")]        public bool Aligner2Enable { get; set; }        [Subscription("Buffer.IsEnable")]        public bool BufferEnable { get; set; }        [Subscription("Buffer1.IsEnable")]        public bool Buffer1Enable { get; set; }        [Subscription("Buffer2.IsEnable")]        public bool Buffer2Enable { get; set; }        [Subscription("PMA.IsEnable")]        public bool PMAEnable { get; set; }        [Subscription("PMB.IsEnable")]        public bool PMBEnable { get; set; }        [Subscription("CoolingBuffer1.IsEnable")]        public bool CoolingBuffer1Enable { get; set; }        [Subscription("CoolingBuffer2.IsEnable")]        public bool CoolingBuffer2Enable { get; set; }        #endregion        public Visibility ServerVisibility { get; set; }        [Subscription("System.Robot.IsLeftArmPressureSensorON")]        public bool IsLeftArmPressureSensorON        {            get; set;        }        [Subscription("System.Robot.IsRightArmPressureSensorON")]        public bool IsRightArmPressureSensorON        {            get; set;        }        [Subscription("LP1.InfoPadCarrierTypeInformation")]        public string LP1CarrierType        {            get => _lp1CarrierType;            set => _lp1CarrierType = value;        }        private string _lp1CarrierType;        [Subscription("LP2.InfoPadCarrierTypeInformation")]        public string LP2CarrierType        {            get => _lp2CarrierType;            set => _lp2CarrierType = value;        }        private string _lp2CarrierType;        [Subscription("LP3.InfoPadCarrierTypeInformation")]        public string LP3CarrierType        {            get => _lp3CarrierType;            set => _lp3CarrierType = value;        }        private string _lp3CarrierType;        [Subscription("LP1.IsAutoDetectCarrierType")]        public bool LP1IsAutoDetectCarrierType { get; set; }        [Subscription("LP2.IsAutoDetectCarrierType")]        public bool LP2IsAutoDetectCarrierType { get; set; }        [Subscription("LP3.IsAutoDetectCarrierType")]        public bool LP3IsAutoDetectCarrierType { get; set; }        [Subscription("LP1.ValidCarrierTypeList")]        public Tuple<int, string>[] LP1ValidCarrierTypeList { get; set; }        [Subscription("LP2.ValidCarrierTypeList")]        public Tuple<int, string>[] LP2ValidCarrierTypeList { get; set; }        [Subscription("LP3.ValidCarrierTypeList")]        public Tuple<int, string>[] LP3ValidCarrierTypeList { get; set; }        [Subscription("System.IsNoRunning")]        public bool IsNoRunning { get; set; }        public bool IsShowLP1CarrierType        {            get            { return !LP1IsAutoDetectCarrierType; }        }        public bool IsShowLP2CarrierType        {            get            { return !LP2IsAutoDetectCarrierType; }        }        public bool IsShowLP3CarrierType        {            get            { return !LP3IsAutoDetectCarrierType; }        }        public Thickness _PMThickness = new Thickness(0, 0, 0, 0);        public Thickness PMThickness        {            get            {                if (!IsEnableIdentifyThickness && !IsEnableMultiWaferSize)                {                    _PMThickness.Left = 0;                    _PMThickness.Top = -100;                    _PMThickness.Right = 0;                    _PMThickness.Bottom = 0;                }                else if (!IsEnableIdentifyThickness && IsEnableMultiWaferSize && !IsEnableMultiWaferSizeShow)                {                    _PMThickness.Left = 0;                    _PMThickness.Top = -100;                    _PMThickness.Right = 0;                    _PMThickness.Bottom = 0;                }                else                {                    _PMThickness.Left = 680;                    _PMThickness.Top = 645;                    _PMThickness.Right = 0;                    _PMThickness.Bottom = 50;                }                return _PMThickness;            }        }        public Thickness _RobotThickness = new Thickness(0, 0, 0, 0);        public Thickness RobotThickness        {            get            {                if (!IsEnableIdentifyThickness && !IsEnableMultiWaferSize)                {                    _RobotThickness.Left = 0;                    _RobotThickness.Top = 300;                    _RobotThickness.Right = 0;                    _RobotThickness.Bottom = 0;                }                else if (!IsEnableIdentifyThickness && IsEnableMultiWaferSize && !IsEnableMultiWaferSizeShow)                {                    _RobotThickness.Left = 0;                    _RobotThickness.Top = 300;                    _RobotThickness.Right = 0;                    _RobotThickness.Bottom = 0;                }                else                {                    _RobotThickness.Left = 10;                    _RobotThickness.Top = 633;                    _RobotThickness.Right = 0;                    _RobotThickness.Bottom = 10;                }                return _RobotThickness;            }        }        /// <summary>        /// Update LoadPort WaferInfo        /// </summary>        /// <param name="sourceWaferInfos"></param>        /// <param name="index"></param>        public override void UpdateWafers(WaferInfo[] sourceWaferInfos, int index)        {            if (IsSlotShowOpposite)            {                var wafers = UpdateWaferInfo(sourceWaferInfos);                if(sourceWaferInfos == null) return;                if(index == 0 && FoupList[index] != null)                {                    FoupList[index].IsShow = LP1Enable;                }                if (FoupList[index].WaferInfos == null)                {                    FoupList[index].WaferInfos = wafers;                }                else                {                    for (int i = 0; i < FoupList[index].WaferInfos.Length; i++)                    {                        FoupList[index].WaferInfos[i].Update(wafers[i]);                    }                }            }            else            {                var wafers = UpdateWaferInfo(sourceWaferInfos.Reverse().ToArray());                if (sourceWaferInfos == null) return;                if (index == 0 && FoupList[index] != null)                {                    FoupList[index].IsShow = LP1Enable;                }                if (FoupList[index].WaferInfos == null)                {                    FoupList[index].WaferInfos = wafers;                }                else                {                    for (int i = 0; i < FoupList[index].WaferInfos.Length; i++)                    {                        FoupList[index].WaferInfos[i].Update(wafers[i]);                    }                }            }        }        public OperationViewModelLPAB() : base(1)        {            WaferTransferOptionCommand = new DelegateCommand<WaferTransferOption>(BeforeTransfer);            SetWaferSize3 = new DelegateCommand<string>(PerformSetWaferSize3);            SetWaferSize4 = new DelegateCommand<string>(PerformSetWaferSize4);            SetWaferSize6 = new DelegateCommand<string>(PerformSetWaferSize6);            SetWaferSize8 = new DelegateCommand<string>(PerformSetWaferSize8);            SetWaferThick = new DelegateCommand<string>(PerformSetWaferThick);            SetWaferThin = new DelegateCommand<string>(PerformSetWaferThin);            SetLPSlot13 = new DelegateCommand<string>(PerformSetSlot13);            SetLPSlot25 = new DelegateCommand<string>(PerformSetSlot25);            StartCycleCommand = new DelegateCommand<object>(StartCycle);            SetFFUCommand = new DelegateCommand<string>(SetFFUSpeed);            MapCommand = new DelegateCommand<DependencyObject>(DoMap);            LoadCommand = new DelegateCommand<DependencyObject>(DoLoad);            UnloadCommand = new DelegateCommand<DependencyObject>(DoUnload);            SetTransCarrierTypeCommand = new DelegateCommand<string>(SetTransCarrierType);        }        protected void DoMap(DependencyObject sender)        {            var command = CommandHelper.GetCommandItem(sender);            InvokeClient.Instance.Service.DoOperation(command.CommandName, command.Target);        }        protected void DoLoad(DependencyObject sender)        {            var command = CommandHelper.GetCommandItem(sender);            InvokeClient.Instance.Service.DoOperation(command.CommandName, command.Target);        }        protected void DoUnload(DependencyObject sender)        {            var command = CommandHelper.GetCommandItem(sender);            InvokeClient.Instance.Service.DoOperation(command.CommandName, command.Target);        }        private void SetTransCarrierType(string obj)        {            var LPName = obj;            Tuple<int, string>[] input = null;            switch (LPName)            {                case "LP1":                    input = LP1ValidCarrierTypeList;                    break;                case "LP2":                    input = LP2ValidCarrierTypeList;                    break;                case "LP3":                    input = LP3ValidCarrierTypeList;                    break;                default:                    break;            }            // Tuple<int, string>[] tempTuple = new Tuple<int, string>[] { Tuple.Create(0, "CarrierType0"), Tuple.Create(1, "CarrierType1") };            if (input == null)            {                MessageBox.Show($"{LPName}ValidCarrierTypeList is null", "Value Null");            }            else            {                var SelectCarrierTypeDialog = new SelectCarrierTypeDialog(input);                if ((bool)SelectCarrierTypeDialog.ShowDialog())                {                    InvokeClient.Instance.Service.DoOperation($"{LPName}.SetInfoPadIndex", SelectCarrierTypeDialog.SelectIndex);                }            }        }        private void SetFFUSpeed(string obj)        {            InvokeClient.Instance.Service.DoOperation($"FFU.SetSpeed", new object[] { obj });        }        private void PerformSetSlot13(string obj)        {            InvokeClient.Instance.Service.DoOperation("System.SetSlot13", obj);        }        private void PerformSetSlot25(string obj)        {            InvokeClient.Instance.Service.DoOperation("System.SetSlot25", obj);        }        private void PerformSetWaferSize8(string obj)        {            InvokeClient.Instance.Service.DoOperation("System.SetWaferSize8", obj);        }        private void PerformSetWaferSize6(string obj)        {            InvokeClient.Instance.Service.DoOperation("System.SetWaferSize6", obj);        }        private void PerformSetWaferSize4(string obj)        {            InvokeClient.Instance.Service.DoOperation("System.SetWaferSize4", obj);        }        private void PerformSetWaferSize3(string obj)        {            InvokeClient.Instance.Service.DoOperation("System.SetWaferSize3", obj);        }        private void PerformSetWaferThick(string obj)        {            InvokeClient.Instance.Service.DoOperation("System.SetWaferThick", obj);        }        private void PerformSetWaferThin(string obj)        {            InvokeClient.Instance.Service.DoOperation("System.SetWaferThin", obj);        }        private void StartCycle(object obj)        {            if (CycleFrom == null || CycleTo == null)                return;            List<string> _lstPassThrough = new List<string>()            {            };            if (Aligner1IsChecked)                _lstPassThrough.Add("Aligner1");            if (Aligner2IsChecked)                _lstPassThrough.Add("Aligner2");            if (Ll1IsChecked)                _lstPassThrough.Add("LL1");            if (Ll2IsChecked)                _lstPassThrough.Add("LL2");            if (BufferIsChecked)                _lstPassThrough.Add("Buffer");            if (Buffer1IsChecked)                _lstPassThrough.Add("Buffer1");            if (Buffer2IsChecked)                _lstPassThrough.Add("Buffer2");            if (CoolingBuffer1IsChecked)                _lstPassThrough.Add("CoolingBuffer1");            if (CoolingBuffer2IsChecked)                _lstPassThrough.Add("CoolingBuffer2");            if (obj.ToString() == "Cycle")            {                InvokeClient.Instance.Service.DoOperation("System.StartCycle", new object[] {(string)CycleFrom.Content,                (string)CycleTo.Content, _lstPassThrough.ToArray()                });            }            //else if (obj.ToString() == "Benchmark")            //{            //    InvokeClient.Instance.Service.DoOperation("Benchmark", paramsArgs);            //}        }        public ICommand WaferTransferOptionCommand        {            get; set;        }        protected virtual void BeforeTransfer(WaferTransferOption option)        {            option.Setting.ShowAlign = false;            option.Setting.ShowLaserMarker = false;            option.Setting.ShowT7Code = false;            //option.Setting.ShowBlade = false;        }        protected override void InitFoupList()        {            base.InitFoupList();            FoupList[0].FoupType = Controls.FoupType.Loadport;             InitBufferList(1);            BufferList[0].FoupType = Controls.FoupType.NoButton;                             }        protected readonly ModuleName[] bufferSet = new ModuleName[]        {            ModuleName.Buffer,            ModuleName.Buffer1,            ModuleName.Buffer2,        };        public void InitBufferList(int bufferCount)        {            BufferList = new ObservableCollection<FoupListItem>();            for (var i = 0; i < bufferCount; i++)            {                var foupListItem = new FoupListItem                {                    DeviceName = bufferSet[i].ToString(),                    CarrierName = bufferSet[i].ToString(),                    CarrierMode = LoadPortCarrierMode.Loader,                    Station = bufferSet[i],                    IsShow = true                };                BufferList.Add(foupListItem);            }        }        protected override void InvokeBeforeUpdateProperty(Dictionary<string, object> data)        {            //ServerVisibility = ((bool)QueryDataClient.Instance.Service.GetConfig("System.EfemServerEnable")) ? Visibility.Visible : Visibility.Hidden;            //data[UIKey(UnitName.LoadportA.ToString(), ParamName.FoupDoorState)] = FoupDoorState.Close;            base.InvokeBeforeUpdateProperty(data);        }    }}
 |