| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304 | using System;using System.Collections.Generic;using System.Linq;using System.Reflection;using System.Text;using System.Threading.Tasks;namespace MECF.Framework.Common.Utilities{    public interface INode    {    }    public class SCValue4Block : SCValue    {        public class Block4Config : INode        {            public CSB Block1 { get; set; } = new CSB();            public PRB1 Block2 { get; set; } = new PRB1();            public PRB2 Block3 { get; set; } = new PRB2();            public IFB Block4 { get; set; } = new IFB();        }        public Block4Config System_SetUp { get; set; }        public SCValue4Block()        {            System_SetUp = new Block4Config();        }        public override void SetKeys()        {            _fieldMap.Clear();            SetKeys(typeof(SCValue4Block), "", this);        }        public void SetKeys(Type type, string prefix, object objParent)        {            Dictionary<string, object> items = new Dictionary<string, object>();            PropertyInfo[] property = type.GetProperties();            foreach (PropertyInfo fiGroup in property) //System_SetUp_4Block            {                var ttt = fiGroup.PropertyType;                object obj = null;                if (objParent != null)                    obj = fiGroup.GetValue(objParent, null);                if (ttt != typeof(double) && ttt != typeof(string) && ttt != typeof(bool) && ttt != typeof(int))                {                    string fiGroupName = fiGroup.Name;                    if (fiGroupName.Length > 6 && fiGroupName.Substring(0, 6) == "Module")                    {                        fiGroupName = fiGroupName.Replace("Module", "");                    }                    SetKeys(ttt, prefix + fiGroupName + "_", obj);                    continue;                }                string name = $"{prefix}{fiGroup.Name}".Replace("_", ".");                if (_fieldMap.Keys.Contains(name))                {                    _fieldMap[name] = Tuple.Create(objParent, fiGroup);                }                else                {                    _fieldMap.Add(name, Tuple.Create(objParent, fiGroup));                }            }        }        public override void SetParameterValue(MECF.Framework.Common.Utilities.Parameter parameter)        {            if (System_SetUp.Block1 != null)            {                System_SetUp.Block1.Module0.SetParameterValue(parameter.Blocks[0].Modules[0]);                System_SetUp.Block1.Module1.SetParameterValue(parameter.Blocks[0].Modules[1]);                System_SetUp.Block1.Module2.SetParameterValue(parameter.Blocks[0].Modules[2]);                System_SetUp.Block1.Module3.SetParameterValue(parameter.Blocks[0].Modules[3]);                System_SetUp.Block1.Module4.SetParameterValue(parameter.Blocks[0].Modules[4]);                System_SetUp.Block1.Module5.SetParameterValue(parameter.Blocks[0].Modules[5]);                parameter.Blocks[0].TransferArmAccessModules = ParameterManager.GetArmAccessModule(System_SetUp.Block1.Module0.TransferArm);                System_SetUp.Block1.AccessHomePosition.SetParameterValue(parameter.Blocks[0].AccessHomePosition);                System_SetUp.Block1.WaferCheckPosition.SetParameterValue(parameter.Blocks[0].WaferCheckPosition);            }            if (System_SetUp.Block2 != null)            {                System_SetUp.Block2.Module0.SetParameterValue(parameter.Blocks[1].Modules[0]);                System_SetUp.Block2.Module1.SetParameterValue(parameter.Blocks[1].Modules[1]);                System_SetUp.Block2.Module2.SetParameterValue(parameter.Blocks[1].Modules[2]);                System_SetUp.Block2.Module3.SetParameterValue(parameter.Blocks[1].Modules[3]);                System_SetUp.Block2.Module4.SetParameterValue(parameter.Blocks[1].Modules[4]);                System_SetUp.Block2.Module5.SetParameterValue(parameter.Blocks[1].Modules[5]);                System_SetUp.Block2.Module6.SetParameterValue(parameter.Blocks[1].Modules[6]);                System_SetUp.Block2.Module7.SetParameterValue(parameter.Blocks[1].Modules[7]);                System_SetUp.Block2.Module8.SetParameterValue(parameter.Blocks[1].Modules[8]);                System_SetUp.Block2.Module9.SetParameterValue(parameter.Blocks[1].Modules[9]);                System_SetUp.Block2.Module10.SetParameterValue(parameter.Blocks[1].Modules[10]);                System_SetUp.Block2.Module11.SetParameterValue(parameter.Blocks[1].Modules[11]);                System_SetUp.Block2.Module12.SetParameterValue(parameter.Blocks[1].Modules[12]);                System_SetUp.Block2.Module13.SetParameterValue(parameter.Blocks[1].Modules[13]);                System_SetUp.Block2.Module14.SetParameterValue(parameter.Blocks[1].Modules[14]);                System_SetUp.Block2.Module15.SetParameterValue(parameter.Blocks[1].Modules[15]);                System_SetUp.Block2.Module16.SetParameterValue(parameter.Blocks[1].Modules[16]);                System_SetUp.Block2.Module17.SetParameterValue(parameter.Blocks[1].Modules[17]);                System_SetUp.Block2.Module18.SetParameterValue(parameter.Blocks[1].Modules[18]);                System_SetUp.Block2.Module19.SetParameterValue(parameter.Blocks[1].Modules[19]);                System_SetUp.Block2.Module20.SetParameterValue(parameter.Blocks[1].Modules[20]);                System_SetUp.Block2.Module21.SetParameterValue(parameter.Blocks[1].Modules[21]);                System_SetUp.Block2.Module22.SetParameterValue(parameter.Blocks[1].Modules[22]);                System_SetUp.Block2.Module23.SetParameterValue(parameter.Blocks[1].Modules[23]);                System_SetUp.Block2.Module24.SetParameterValue(parameter.Blocks[1].Modules[24]);                System_SetUp.Block2.Module25.SetParameterValue(parameter.Blocks[1].Modules[25]);                System_SetUp.Block2.Module26.SetParameterValue(parameter.Blocks[1].Modules[26]);                System_SetUp.Block2.Module27.SetParameterValue(parameter.Blocks[1].Modules[27]);                System_SetUp.Block2.Module28.SetParameterValue(parameter.Blocks[1].Modules[28]);                System_SetUp.Block2.Module29.SetParameterValue(parameter.Blocks[1].Modules[29]);                parameter.Blocks[1].TransferArmAccessModules = ParameterManager.GetArmAccessModule(System_SetUp.Block2.Module0.TransferArm);                System_SetUp.Block2.AccessHomePosition.SetParameterValue(parameter.Blocks[1].AccessHomePosition);                System_SetUp.Block2.WaferCheckPosition.SetParameterValue(parameter.Blocks[1].WaferCheckPosition);                ParameterManager.Instance.ModuleDispenseConfigList.Clear();                if (ParameterManager.IsSpinModule(System_SetUp.Block2.Module1.Name))                {                    ParameterManager.Instance.ModuleDispenseConfigList.Add(parameter.Blocks[1].Modules[1].ID, GetDispenseConfigs(System_SetUp.Block2.Module1.DispenseConfig, System_SetUp.Block2.Module1.Name));                }                if (ParameterManager.IsSpinModule(System_SetUp.Block2.Module2.Name))                {                    ParameterManager.Instance.ModuleDispenseConfigList.Add(parameter.Blocks[1].Modules[2].ID, GetDispenseConfigs(System_SetUp.Block2.Module2.DispenseConfig, System_SetUp.Block2.Module2.Name));                }                if (ParameterManager.IsSpinModule(System_SetUp.Block2.Module3.Name))                {                    ParameterManager.Instance.ModuleDispenseConfigList.Add(parameter.Blocks[1].Modules[3].ID, GetDispenseConfigs(System_SetUp.Block2.Module3.DispenseConfig, System_SetUp.Block2.Module3.Name));                }                if (ParameterManager.IsSpinModule(System_SetUp.Block2.Module4.Name))                {                    ParameterManager.Instance.ModuleDispenseConfigList.Add(parameter.Blocks[1].Modules[4].ID, GetDispenseConfigs(System_SetUp.Block2.Module4.DispenseConfig, System_SetUp.Block2.Module4.Name));                }                if (ParameterManager.IsADHModule(System_SetUp.Block2.Module5.Name))                {                    ParameterManager.Instance.ModuleDispenseConfigList.Add(parameter.Blocks[1].Modules[5].ID, GetDispenseConfigs(System_SetUp.Block2.Module5.DispenseConfig, System_SetUp.Block2.Module5.Name));                }                if (ParameterManager.IsADHModule(System_SetUp.Block2.Module15.Name))                {                    ParameterManager.Instance.ModuleDispenseConfigList.Add(parameter.Blocks[1].Modules[15].ID, GetDispenseConfigs(System_SetUp.Block2.Module15.DispenseConfig, System_SetUp.Block2.Module15.Name));                }                if (ParameterManager.IsADHModule(System_SetUp.Block2.Module17.Name))                {                    ParameterManager.Instance.ModuleDispenseConfigList.Add(parameter.Blocks[1].Modules[17].ID, GetDispenseConfigs(System_SetUp.Block2.Module17.DispenseConfig, System_SetUp.Block2.Module17.Name));                }            }            if (System_SetUp.Block3 != null)            {                System_SetUp.Block3.Module0.SetParameterValue(parameter.Blocks[2].Modules[0]);                System_SetUp.Block3.Module1.SetParameterValue(parameter.Blocks[2].Modules[1]);                System_SetUp.Block3.Module2.SetParameterValue(parameter.Blocks[2].Modules[2]);                System_SetUp.Block3.Module3.SetParameterValue(parameter.Blocks[2].Modules[3]);                System_SetUp.Block3.Module4.SetParameterValue(parameter.Blocks[2].Modules[4]);                System_SetUp.Block3.Module5.SetParameterValue(parameter.Blocks[2].Modules[5]);                System_SetUp.Block3.Module6.SetParameterValue(parameter.Blocks[2].Modules[6]);                System_SetUp.Block3.Module7.SetParameterValue(parameter.Blocks[2].Modules[7]);                System_SetUp.Block3.Module8.SetParameterValue(parameter.Blocks[2].Modules[8]);                System_SetUp.Block3.Module9.SetParameterValue(parameter.Blocks[2].Modules[9]);                System_SetUp.Block3.Module10.SetParameterValue(parameter.Blocks[2].Modules[10]);                System_SetUp.Block3.Module11.SetParameterValue(parameter.Blocks[2].Modules[11]);                System_SetUp.Block3.Module12.SetParameterValue(parameter.Blocks[2].Modules[12]);                System_SetUp.Block3.Module13.SetParameterValue(parameter.Blocks[2].Modules[13]);                System_SetUp.Block3.Module14.SetParameterValue(parameter.Blocks[2].Modules[14]);                System_SetUp.Block3.Module15.SetParameterValue(parameter.Blocks[2].Modules[15]);                System_SetUp.Block3.Module16.SetParameterValue(parameter.Blocks[2].Modules[16]);                System_SetUp.Block3.Module17.SetParameterValue(parameter.Blocks[2].Modules[17]);                System_SetUp.Block3.Module18.SetParameterValue(parameter.Blocks[2].Modules[18]);                System_SetUp.Block3.Module19.SetParameterValue(parameter.Blocks[2].Modules[19]);                System_SetUp.Block3.Module20.SetParameterValue(parameter.Blocks[2].Modules[20]);                System_SetUp.Block3.Module21.SetParameterValue(parameter.Blocks[2].Modules[21]);                System_SetUp.Block3.Module22.SetParameterValue(parameter.Blocks[2].Modules[22]);                System_SetUp.Block3.Module23.SetParameterValue(parameter.Blocks[2].Modules[23]);                System_SetUp.Block3.Module24.SetParameterValue(parameter.Blocks[2].Modules[24]);                System_SetUp.Block3.Module25.SetParameterValue(parameter.Blocks[2].Modules[25]);                System_SetUp.Block3.Module26.SetParameterValue(parameter.Blocks[2].Modules[26]);                System_SetUp.Block3.Module27.SetParameterValue(parameter.Blocks[2].Modules[27]);                System_SetUp.Block3.Module28.SetParameterValue(parameter.Blocks[2].Modules[28]);                System_SetUp.Block3.Module29.SetParameterValue(parameter.Blocks[2].Modules[29]);                parameter.Blocks[2].TransferArmAccessModules = ParameterManager.GetArmAccessModule(System_SetUp.Block3.Module0.TransferArm);                System_SetUp.Block3.AccessHomePosition.SetParameterValue(parameter.Blocks[2].AccessHomePosition);                System_SetUp.Block3.WaferCheckPosition.SetParameterValue(parameter.Blocks[2].WaferCheckPosition);                if (ParameterManager.IsSpinModule(System_SetUp.Block3.Module1.Name))                {                    ParameterManager.Instance.ModuleDispenseConfigList.Add(parameter.Blocks[2].Modules[1].ID, GetDispenseConfigs(System_SetUp.Block3.Module1.DispenseConfig, System_SetUp.Block3.Module1.Name));                }                if (ParameterManager.IsSpinModule(System_SetUp.Block3.Module2.Name))                {                    ParameterManager.Instance.ModuleDispenseConfigList.Add(parameter.Blocks[2].Modules[2].ID, GetDispenseConfigs(System_SetUp.Block3.Module2.DispenseConfig, System_SetUp.Block3.Module2.Name));                }                if (ParameterManager.IsSpinModule(System_SetUp.Block3.Module3.Name))                {                    ParameterManager.Instance.ModuleDispenseConfigList.Add(parameter.Blocks[2].Modules[3].ID, GetDispenseConfigs(System_SetUp.Block3.Module3.DispenseConfig, System_SetUp.Block3.Module3.Name));                }                if (ParameterManager.IsSpinModule(System_SetUp.Block3.Module4.Name))                {                    ParameterManager.Instance.ModuleDispenseConfigList.Add(parameter.Blocks[2].Modules[4].ID, GetDispenseConfigs(System_SetUp.Block3.Module4.DispenseConfig, System_SetUp.Block3.Module4.Name));                }                if (ParameterManager.IsADHModule(System_SetUp.Block3.Module5.Name))                {                    ParameterManager.Instance.ModuleDispenseConfigList.Add(parameter.Blocks[2].Modules[5].ID, GetDispenseConfigs(System_SetUp.Block3.Module5.DispenseConfig, System_SetUp.Block3.Module5.Name));                }                if (ParameterManager.IsADHModule(System_SetUp.Block3.Module15.Name))                {                    ParameterManager.Instance.ModuleDispenseConfigList.Add(parameter.Blocks[2].Modules[15].ID, GetDispenseConfigs(System_SetUp.Block3.Module15.DispenseConfig, System_SetUp.Block3.Module15.Name));                }                if (ParameterManager.IsADHModule(System_SetUp.Block3.Module17.Name))                {                    ParameterManager.Instance.ModuleDispenseConfigList.Add(parameter.Blocks[2].Modules[17].ID, GetDispenseConfigs(System_SetUp.Block3.Module17.DispenseConfig, System_SetUp.Block3.Module17.Name));                }            }            if (System_SetUp.Block4 != null)            {                System_SetUp.Block4.Module0.SetParameterValue(parameter.Blocks[3].Modules[0]);                System_SetUp.Block4.Module1.SetParameterValue(parameter.Blocks[3].Modules[1]);                System_SetUp.Block4.Module2.SetParameterValue(parameter.Blocks[3].Modules[2]);                System_SetUp.Block4.Module3.SetParameterValue(parameter.Blocks[3].Modules[3]);                System_SetUp.Block4.Module4.SetParameterValue(parameter.Blocks[3].Modules[4]);                System_SetUp.Block4.Module5.SetParameterValue(parameter.Blocks[3].Modules[5]);                parameter.Blocks[3].TransferArmAccessModules = ParameterManager.GetArmAccessModule(System_SetUp.Block4.Module0.TransferArm);                System_SetUp.Block4.AccessHomePosition.SetParameterValue(parameter.Blocks[3].AccessHomePosition);                System_SetUp.Block4.WaferCheckPosition.SetParameterValue(parameter.Blocks[3].WaferCheckPosition);            }        }    }    public class SCValue3Block : SCValue    {        public class Block3Config : INode        {            public CSB Block1 { get; set; } = new CSB();            public PRB1 Block2 { get; set; } = new PRB1();            public IFB Block4 { get; set; } = new IFB();        }        public Block3Config System_SetUp { get; set; }        public SCValue3Block()        {            System_SetUp = new Block3Config();        }        public override void SetKeys()        {            _fieldMap.Clear();            SetKeys(typeof(SCValue3Block), "", this);        }        public void SetKeys(Type type, string prefix, object objParent)        {            Dictionary<string, object> items = new Dictionary<string, object>();            PropertyInfo[] property = type.GetProperties();            foreach (PropertyInfo fiGroup in property) //System_SetUp_4Block            {                var ttt = fiGroup.PropertyType;                object obj = null;                if (objParent != null)                    obj = fiGroup.GetValue(objParent, null);                if (ttt != typeof(double) && ttt != typeof(string) && ttt != typeof(bool) && ttt != typeof(int))                {                    string fiGroupName = fiGroup.Name;                    if (fiGroupName.Length > 6 && fiGroupName.Substring(0, 6) == "Module")                    {                        fiGroupName = fiGroupName.Replace("Module", "");                    }                    SetKeys(ttt, prefix + fiGroupName + "_", obj);                    continue;                }                string name = $"{prefix}{fiGroup.Name}".Replace("_", ".");                if (_fieldMap.Keys.Contains(name))                {                    _fieldMap[name] = Tuple.Create(objParent, fiGroup);                }                else                {                    _fieldMap.Add(name, Tuple.Create(objParent, fiGroup));                }            }        }        public override void SetParameterValue(MECF.Framework.Common.Utilities.Parameter parameter)        {            if (System_SetUp.Block1 != null)            {                System_SetUp.Block1.Module0.SetParameterValue(parameter.Blocks[0].Modules[0]);                System_SetUp.Block1.Module1.SetParameterValue(parameter.Blocks[0].Modules[1]);                System_SetUp.Block1.Module2.SetParameterValue(parameter.Blocks[0].Modules[2]);                System_SetUp.Block1.Module3.SetParameterValue(parameter.Blocks[0].Modules[3]);                System_SetUp.Block1.Module4.SetParameterValue(parameter.Blocks[0].Modules[4]);                System_SetUp.Block1.Module5.SetParameterValue(parameter.Blocks[0].Modules[5]);                parameter.Blocks[0].TransferArmAccessModules = ParameterManager.GetArmAccessModule(System_SetUp.Block1.Module0.TransferArm);                System_SetUp.Block1.AccessHomePosition.SetParameterValue(parameter.Blocks[0].AccessHomePosition);                System_SetUp.Block1.WaferCheckPosition.SetParameterValue(parameter.Blocks[0].WaferCheckPosition);            }            if (System_SetUp.Block2 != null)            {                System_SetUp.Block2.Module0.SetParameterValue(parameter.Blocks[1].Modules[0]);                System_SetUp.Block2.Module1.SetParameterValue(parameter.Blocks[1].Modules[1]);                System_SetUp.Block2.Module2.SetParameterValue(parameter.Blocks[1].Modules[2]);                System_SetUp.Block2.Module3.SetParameterValue(parameter.Blocks[1].Modules[3]);                System_SetUp.Block2.Module4.SetParameterValue(parameter.Blocks[1].Modules[4]);                System_SetUp.Block2.Module5.SetParameterValue(parameter.Blocks[1].Modules[5]);                System_SetUp.Block2.Module6.SetParameterValue(parameter.Blocks[1].Modules[6]);                System_SetUp.Block2.Module7.SetParameterValue(parameter.Blocks[1].Modules[7]);                System_SetUp.Block2.Module8.SetParameterValue(parameter.Blocks[1].Modules[8]);                System_SetUp.Block2.Module9.SetParameterValue(parameter.Blocks[1].Modules[9]);                System_SetUp.Block2.Module10.SetParameterValue(parameter.Blocks[1].Modules[10]);                System_SetUp.Block2.Module11.SetParameterValue(parameter.Blocks[1].Modules[11]);                System_SetUp.Block2.Module12.SetParameterValue(parameter.Blocks[1].Modules[12]);                System_SetUp.Block2.Module13.SetParameterValue(parameter.Blocks[1].Modules[13]);                System_SetUp.Block2.Module14.SetParameterValue(parameter.Blocks[1].Modules[14]);                System_SetUp.Block2.Module15.SetParameterValue(parameter.Blocks[1].Modules[15]);                System_SetUp.Block2.Module16.SetParameterValue(parameter.Blocks[1].Modules[16]);                System_SetUp.Block2.Module17.SetParameterValue(parameter.Blocks[1].Modules[17]);                System_SetUp.Block2.Module18.SetParameterValue(parameter.Blocks[1].Modules[18]);                System_SetUp.Block2.Module19.SetParameterValue(parameter.Blocks[1].Modules[19]);                System_SetUp.Block2.Module20.SetParameterValue(parameter.Blocks[1].Modules[20]);                System_SetUp.Block2.Module21.SetParameterValue(parameter.Blocks[1].Modules[21]);                System_SetUp.Block2.Module22.SetParameterValue(parameter.Blocks[1].Modules[22]);                System_SetUp.Block2.Module23.SetParameterValue(parameter.Blocks[1].Modules[23]);                System_SetUp.Block2.Module24.SetParameterValue(parameter.Blocks[1].Modules[24]);                System_SetUp.Block2.Module25.SetParameterValue(parameter.Blocks[1].Modules[25]);                System_SetUp.Block2.Module26.SetParameterValue(parameter.Blocks[1].Modules[26]);                System_SetUp.Block2.Module27.SetParameterValue(parameter.Blocks[1].Modules[27]);                System_SetUp.Block2.Module28.SetParameterValue(parameter.Blocks[1].Modules[28]);                System_SetUp.Block2.Module29.SetParameterValue(parameter.Blocks[1].Modules[29]);                parameter.Blocks[1].TransferArmAccessModules = ParameterManager.GetArmAccessModule(System_SetUp.Block2.Module0.TransferArm);                System_SetUp.Block2.AccessHomePosition.SetParameterValue(parameter.Blocks[1].AccessHomePosition);                System_SetUp.Block2.WaferCheckPosition.SetParameterValue(parameter.Blocks[1].WaferCheckPosition);                ParameterManager.Instance.ModuleDispenseConfigList.Clear();                if (ParameterManager.IsSpinModule(System_SetUp.Block2.Module1.Name))                {                    ParameterManager.Instance.ModuleDispenseConfigList.Add(parameter.Blocks[1].Modules[1].ID, GetDispenseConfigs(System_SetUp.Block2.Module1.DispenseConfig, System_SetUp.Block2.Module1.Name));                }                if (ParameterManager.IsSpinModule(System_SetUp.Block2.Module2.Name))                {                    ParameterManager.Instance.ModuleDispenseConfigList.Add(parameter.Blocks[1].Modules[2].ID, GetDispenseConfigs(System_SetUp.Block2.Module2.DispenseConfig, System_SetUp.Block2.Module2.Name));                }                if (ParameterManager.IsSpinModule(System_SetUp.Block2.Module3.Name))                {                    ParameterManager.Instance.ModuleDispenseConfigList.Add(parameter.Blocks[1].Modules[3].ID, GetDispenseConfigs(System_SetUp.Block2.Module3.DispenseConfig, System_SetUp.Block2.Module3.Name));                }                if (ParameterManager.IsSpinModule(System_SetUp.Block2.Module4.Name))                {                    ParameterManager.Instance.ModuleDispenseConfigList.Add(parameter.Blocks[1].Modules[4].ID, GetDispenseConfigs(System_SetUp.Block2.Module4.DispenseConfig, System_SetUp.Block2.Module4.Name));                }                if (ParameterManager.IsADHModule(System_SetUp.Block2.Module5.Name))                {                    ParameterManager.Instance.ModuleDispenseConfigList.Add(parameter.Blocks[1].Modules[5].ID, GetDispenseConfigs(System_SetUp.Block2.Module5.DispenseConfig, System_SetUp.Block2.Module5.Name));                }                if (ParameterManager.IsADHModule(System_SetUp.Block2.Module15.Name))                {                    ParameterManager.Instance.ModuleDispenseConfigList.Add(parameter.Blocks[1].Modules[15].ID, GetDispenseConfigs(System_SetUp.Block2.Module15.DispenseConfig, System_SetUp.Block2.Module15.Name));                }                if (ParameterManager.IsADHModule(System_SetUp.Block2.Module17.Name))                {                    ParameterManager.Instance.ModuleDispenseConfigList.Add(parameter.Blocks[1].Modules[17].ID, GetDispenseConfigs(System_SetUp.Block2.Module17.DispenseConfig, System_SetUp.Block2.Module17.Name));                }            }            if (System_SetUp.Block4 != null)            {                System_SetUp.Block4.Module0.SetParameterValue(parameter.Blocks[2].Modules[0]);                System_SetUp.Block4.Module1.SetParameterValue(parameter.Blocks[2].Modules[1]);                System_SetUp.Block4.Module2.SetParameterValue(parameter.Blocks[2].Modules[2]);                System_SetUp.Block4.Module3.SetParameterValue(parameter.Blocks[2].Modules[3]);                System_SetUp.Block4.Module4.SetParameterValue(parameter.Blocks[2].Modules[4]);                System_SetUp.Block4.Module5.SetParameterValue(parameter.Blocks[2].Modules[5]);                parameter.Blocks[2].TransferArmAccessModules = ParameterManager.GetArmAccessModule(System_SetUp.Block4.Module0.TransferArm);                System_SetUp.Block4.AccessHomePosition.SetParameterValue(parameter.Blocks[2].AccessHomePosition);                System_SetUp.Block4.WaferCheckPosition.SetParameterValue(parameter.Blocks[2].WaferCheckPosition);            }        }    }    public class SCValue2Block : SCValue    {        public class Block2Config : INode        {            public CSB Block1 { get; set; } = new CSB();            public PRB1 Block2 { get; set; } = new PRB1();        }        public Block2Config System_SetUp { get; set; }        public SCValue2Block()        {            System_SetUp = new Block2Config();        }        public override void SetKeys()        {            _fieldMap.Clear();            SetKeys(typeof(SCValue2Block), "", this);        }        public void SetKeys(Type type, string prefix, object objParent)        {            Dictionary<string, object> items = new Dictionary<string, object>();            PropertyInfo[] property = type.GetProperties();            foreach (PropertyInfo fiGroup in property) //System_SetUp_4Block            {                var ttt = fiGroup.PropertyType;                object obj = null;                if (objParent != null)                    obj = fiGroup.GetValue(objParent, null);                if (ttt != typeof(double) && ttt != typeof(string) && ttt != typeof(bool) && ttt != typeof(int))                {                    string fiGroupName = fiGroup.Name;                    if (fiGroupName.Length > 6 && fiGroupName.Substring(0, 6) == "Module")                    {                        fiGroupName = fiGroupName.Replace("Module", "");                    }                    SetKeys(ttt, prefix + fiGroupName + "_", obj);                    continue;                }                string name = $"{prefix}{fiGroup.Name}".Replace("_", ".");                if (_fieldMap.Keys.Contains(name))                {                    _fieldMap[name] = Tuple.Create(objParent, fiGroup);                }                else                {                    _fieldMap.Add(name, Tuple.Create(objParent, fiGroup));                }            }        }        public override void SetParameterValue(MECF.Framework.Common.Utilities.Parameter parameter)        {            if (System_SetUp.Block1 != null)            {                System_SetUp.Block1.Module0.SetParameterValue(parameter.Blocks[0].Modules[0]);                System_SetUp.Block1.Module1.SetParameterValue(parameter.Blocks[0].Modules[1]);                System_SetUp.Block1.Module2.SetParameterValue(parameter.Blocks[0].Modules[2]);                System_SetUp.Block1.Module3.SetParameterValue(parameter.Blocks[0].Modules[3]);                System_SetUp.Block1.Module4.SetParameterValue(parameter.Blocks[0].Modules[4]);                System_SetUp.Block1.Module5.SetParameterValue(parameter.Blocks[0].Modules[5]);                parameter.Blocks[0].TransferArmAccessModules = ParameterManager.GetArmAccessModule(System_SetUp.Block1.Module0.TransferArm);                System_SetUp.Block1.AccessHomePosition.SetParameterValue(parameter.Blocks[0].AccessHomePosition);                System_SetUp.Block1.WaferCheckPosition.SetParameterValue(parameter.Blocks[0].WaferCheckPosition);            }            if (System_SetUp.Block2 != null)            {                System_SetUp.Block2.Module0.SetParameterValue(parameter.Blocks[1].Modules[0]);                System_SetUp.Block2.Module1.SetParameterValue(parameter.Blocks[1].Modules[1]);                System_SetUp.Block2.Module2.SetParameterValue(parameter.Blocks[1].Modules[2]);                System_SetUp.Block2.Module3.SetParameterValue(parameter.Blocks[1].Modules[3]);                System_SetUp.Block2.Module4.SetParameterValue(parameter.Blocks[1].Modules[4]);                System_SetUp.Block2.Module5.SetParameterValue(parameter.Blocks[1].Modules[5]);                System_SetUp.Block2.Module6.SetParameterValue(parameter.Blocks[1].Modules[6]);                System_SetUp.Block2.Module7.SetParameterValue(parameter.Blocks[1].Modules[7]);                System_SetUp.Block2.Module8.SetParameterValue(parameter.Blocks[1].Modules[8]);                System_SetUp.Block2.Module9.SetParameterValue(parameter.Blocks[1].Modules[9]);                System_SetUp.Block2.Module10.SetParameterValue(parameter.Blocks[1].Modules[10]);                System_SetUp.Block2.Module11.SetParameterValue(parameter.Blocks[1].Modules[11]);                System_SetUp.Block2.Module12.SetParameterValue(parameter.Blocks[1].Modules[12]);                System_SetUp.Block2.Module13.SetParameterValue(parameter.Blocks[1].Modules[13]);                System_SetUp.Block2.Module14.SetParameterValue(parameter.Blocks[1].Modules[14]);                System_SetUp.Block2.Module15.SetParameterValue(parameter.Blocks[1].Modules[15]);                System_SetUp.Block2.Module16.SetParameterValue(parameter.Blocks[1].Modules[16]);                System_SetUp.Block2.Module17.SetParameterValue(parameter.Blocks[1].Modules[17]);                System_SetUp.Block2.Module18.SetParameterValue(parameter.Blocks[1].Modules[18]);                System_SetUp.Block2.Module19.SetParameterValue(parameter.Blocks[1].Modules[19]);                System_SetUp.Block2.Module20.SetParameterValue(parameter.Blocks[1].Modules[20]);                System_SetUp.Block2.Module21.SetParameterValue(parameter.Blocks[1].Modules[21]);                System_SetUp.Block2.Module22.SetParameterValue(parameter.Blocks[1].Modules[22]);                System_SetUp.Block2.Module23.SetParameterValue(parameter.Blocks[1].Modules[23]);                System_SetUp.Block2.Module24.SetParameterValue(parameter.Blocks[1].Modules[24]);                System_SetUp.Block2.Module25.SetParameterValue(parameter.Blocks[1].Modules[25]);                System_SetUp.Block2.Module26.SetParameterValue(parameter.Blocks[1].Modules[26]);                System_SetUp.Block2.Module27.SetParameterValue(parameter.Blocks[1].Modules[27]);                System_SetUp.Block2.Module28.SetParameterValue(parameter.Blocks[1].Modules[28]);                System_SetUp.Block2.Module29.SetParameterValue(parameter.Blocks[1].Modules[29]);                parameter.Blocks[1].TransferArmAccessModules = ParameterManager.GetArmAccessModule(System_SetUp.Block2.Module0.TransferArm);                System_SetUp.Block2.AccessHomePosition.SetParameterValue(parameter.Blocks[1].AccessHomePosition);                System_SetUp.Block2.WaferCheckPosition.SetParameterValue(parameter.Blocks[1].WaferCheckPosition);                ParameterManager.Instance.ModuleDispenseConfigList.Clear();                if (ParameterManager.IsSpinModule(System_SetUp.Block2.Module1.Name))                {                    ParameterManager.Instance.ModuleDispenseConfigList.Add(parameter.Blocks[1].Modules[1].ID, GetDispenseConfigs(System_SetUp.Block2.Module1.DispenseConfig, System_SetUp.Block2.Module1.Name));                }                if (ParameterManager.IsSpinModule(System_SetUp.Block2.Module2.Name))                {                    ParameterManager.Instance.ModuleDispenseConfigList.Add(parameter.Blocks[1].Modules[2].ID, GetDispenseConfigs(System_SetUp.Block2.Module2.DispenseConfig, System_SetUp.Block2.Module2.Name));                }                if (ParameterManager.IsSpinModule(System_SetUp.Block2.Module3.Name))                {                    ParameterManager.Instance.ModuleDispenseConfigList.Add(parameter.Blocks[1].Modules[3].ID, GetDispenseConfigs(System_SetUp.Block2.Module3.DispenseConfig, System_SetUp.Block2.Module3.Name));                }                if (ParameterManager.IsSpinModule(System_SetUp.Block2.Module4.Name))                {                    ParameterManager.Instance.ModuleDispenseConfigList.Add(parameter.Blocks[1].Modules[4].ID, GetDispenseConfigs(System_SetUp.Block2.Module4.DispenseConfig, System_SetUp.Block2.Module4.Name));                }                if (ParameterManager.IsADHModule(System_SetUp.Block2.Module5.Name))                {                    ParameterManager.Instance.ModuleDispenseConfigList.Add(parameter.Blocks[1].Modules[5].ID, GetDispenseConfigs(System_SetUp.Block2.Module5.DispenseConfig, System_SetUp.Block2.Module5.Name));                }                if (ParameterManager.IsADHModule(System_SetUp.Block2.Module15.Name))                {                    ParameterManager.Instance.ModuleDispenseConfigList.Add(parameter.Blocks[1].Modules[15].ID, GetDispenseConfigs(System_SetUp.Block2.Module15.DispenseConfig, System_SetUp.Block2.Module15.Name));                }                if (ParameterManager.IsADHModule(System_SetUp.Block2.Module17.Name))                {                    ParameterManager.Instance.ModuleDispenseConfigList.Add(parameter.Blocks[1].Modules[17].ID, GetDispenseConfigs(System_SetUp.Block2.Module17.DispenseConfig, System_SetUp.Block2.Module17.Name));                }            }        }    }    public class SCValue    {        public Dictionary<string, DispenseConfig> GetDispenseConfigs(string strFileDispense, string noduleName)        {            Dictionary<string, DispenseConfig> dispenseConfigList = new Dictionary<string, DispenseConfig>();            if (strFileDispense != null && strFileDispense != "")            {                string[] listDispense = strFileDispense.Split(new string[] { "\r\n" }, StringSplitOptions.RemoveEmptyEntries);                Dictionary<string, string> dictDispense = new Dictionary<string, string>();                for (int x = 0; x < listDispense.Length; x++)                {                    string[] sigDispense = listDispense[x].Split(':');                    dictDispense.Add(sigDispense[0], sigDispense[1]);                }                switch (noduleName)                {                    case "COT":                        for (int j = 0; j < ParameterManager.COTDispenseNozzleStrs.Length; j++)                        {                            if (ParameterManager.COTDispenseNozzleStrs[j] != "")                            {                                dispenseConfigList.Add(ParameterManager.COTDispenseNozzleStrs[j], new DispenseConfig(dictDispense[ParameterManager.COTDispenseNozzleStrs[j]]));                            }                        }                        break;                    case "DEV":                        for (int j = 0; j < ParameterManager.DEVDispenseNozzleStrs.Length; j++)                        {                            if (ParameterManager.DEVDispenseNozzleStrs[j] != "")                            {                                dispenseConfigList.Add(ParameterManager.DEVDispenseNozzleStrs[j], new DispenseConfig(dictDispense[ParameterManager.DEVDispenseNozzleStrs[j]]));                            }                        }                        break;                    case "ADH":                        for (int j = 0; j < ParameterManager.ADHDispenseNozzleStrs.Length; j++)                        {                            if (ParameterManager.ADHDispenseNozzleStrs[j] != "")                            {                                dispenseConfigList.Add(ParameterManager.ADHDispenseNozzleStrs[j], new DispenseConfig(dictDispense[ParameterManager.ADHDispenseNozzleStrs[j]]));                            }                        }                        break;                    default:                        break;                }            }            if (strFileDispense == null || strFileDispense == "" || dispenseConfigList.Count == 0)            {                switch (noduleName)                {                    case "COT":                        for (int j = 0; j < ParameterManager.COTDispenseNozzleStrs.Length; j++)                        {                            if (ParameterManager.COTDispenseNozzleStrs[j] != "")                            {                                dispenseConfigList.Add(ParameterManager.COTDispenseNozzleStrs[j], new DispenseConfig());                            }                        }                        break;                    case "DEV":                        for (int j = 0; j < ParameterManager.DEVDispenseNozzleStrs.Length; j++)                        {                            if (ParameterManager.DEVDispenseNozzleStrs[j] != "")                            {                                dispenseConfigList.Add(ParameterManager.DEVDispenseNozzleStrs[j], new DispenseConfig());                            }                        }                        break;                    case "ADH":                        for (int j = 0; j < ParameterManager.ADHDispenseNozzleStrs.Length; j++)                        {                            if (ParameterManager.ADHDispenseNozzleStrs[j] != "")                            {                                dispenseConfigList.Add(ParameterManager.ADHDispenseNozzleStrs[j], new DispenseConfig());                            }                        }                        break;                    default:                        break;                }            }            return dispenseConfigList;        }        protected Dictionary<string, Tuple<object, PropertyInfo>> _fieldMap =            new Dictionary<string, Tuple<object, PropertyInfo>>();        public SCValue()        {        }        public List<string> GetKeys()        {            return _fieldMap.Keys.ToList();        }        public void AddKey(string key)        {            PropertyInfo[] property = typeof(SCValue).GetProperties();            foreach (PropertyInfo fiGroup in property)            {                object objGroup = fiGroup.GetValue(this, null);                foreach (PropertyInfo fiItem in objGroup.GetType().GetProperties())                {                    string name = String.Format("{0}_{1}", fiGroup.Name, fiItem.Name);                    if (key == name)                    {                        _fieldMap[name] = Tuple.Create(objGroup, fiItem);                        return;                    }                }            }        }        public virtual void SetKeys()        {        }        public void SetKeys(Type type, string prefix, object objParent)        {            Dictionary<string, object> items = new Dictionary<string, object>();            PropertyInfo[] property = type.GetProperties();            foreach (PropertyInfo fiGroup in property)            {                var ttt = fiGroup.PropertyType;                object obj = null;                if (objParent != null)                    obj = fiGroup.GetValue(objParent, null);                if (ttt != typeof(double) && ttt != typeof(string) && ttt != typeof(bool) && ttt != typeof(int))                {                    string fiGroupName = fiGroup.Name;                    SetKeys(ttt, prefix + fiGroupName + "_", obj);                    continue;                }                string name = $"{prefix}{fiGroup.Name}".Replace("_", ".");                if (_fieldMap.Keys.Contains(name))                {                    _fieldMap[name] = Tuple.Create(objParent, fiGroup);                }                else                {                    _fieldMap.Add(name, Tuple.Create(objParent, fiGroup));                }            }        }        public virtual Dictionary<string, string> GetScValue(string type, string filter)        {            Dictionary<string, string> result = new Dictionary<string, string>();            foreach (var tuple in _fieldMap)            {                if (tuple.Key.Contains(filter))                {                    result.Add(tuple.Key, tuple.Value.Item2.GetValue(tuple.Value.Item1).ToString());                }            }            return result;        }        public virtual void SetParameterValue(MECF.Framework.Common.Utilities.Parameter parameter)        { }        public void RetrieveAll()        {            SetKeys();        }        public void Update(Dictionary<string, object> result)        {            if (result == null) return;            foreach (KeyValuePair<string, object> item in result)            {                if (_fieldMap.ContainsKey(item.Key))                {                    Update(item.Key, item.Value.ToString());                    //_fieldMap[item.Key].Item2.SetValue(_fieldMap[item.Key].Item1, item.Value, null);                }            }        }        public void Update(string key, string value)        {            if (!_fieldMap.ContainsKey(key))                return;            if (_fieldMap[key].Item1 == null)                return;            try            {                if (_fieldMap[key].Item2.PropertyType == typeof(double))                {                    _fieldMap[key].Item2.SetValue(_fieldMap[key].Item1, Convert.ToDouble(value));                }                else if (_fieldMap[key].Item2.PropertyType == typeof(int))                {                    _fieldMap[key].Item2.SetValue(_fieldMap[key].Item1, Convert.ToInt32(value));                }                else if (_fieldMap[key].Item2.PropertyType == typeof(string))                {                    _fieldMap[key].Item2.SetValue(_fieldMap[key].Item1, value);                }                else if (_fieldMap[key].Item2.PropertyType == typeof(bool))                {                    _fieldMap[key].Item2.SetValue(_fieldMap[key].Item1, Convert.ToBoolean(value));                }            }            catch (Exception ex)            {            }        }        public Dictionary<string, object> GetValue()        {            Dictionary<string, object> result = new Dictionary<string, object>();            foreach (var item in _fieldMap)            {                result[item.Key] = item.Value.Item2.GetValue(item.Value.Item1, null);            }            return result;        }        public class CSB : INode        {            public ArmPosition AccessHomePosition { get; set; } = new ArmPosition();            public ArmPosition WaferCheckPosition { get; set; } = new ArmPosition();            public ArmModule Module0 { get; set; } = new ArmModule();            public UNCModule Module1 { get; set; } = new UNCModule();            public UNCModule Module2 { get; set; } = new UNCModule();            public UNCModule Module3 { get; set; } = new UNCModule();            public UNCModule Module4 { get; set; } = new UNCModule();            public UNCModule Module5 { get; set; } = new UNCModule();        }        public class ArmPosition        {            public int X1 { get; set; }            public int X2 { get; set; }            public int X3 { get; set; }            public void SetParameterValue(MECF.Framework.Common.Utilities.ArmPosition armPosition)            {                armPosition.X1 = X1;                armPosition.X2 = X2;                armPosition.X3 = X3;            }        }        public class PRB1 : INode        {            public ArmPosition AccessHomePosition { get; set; } = new ArmPosition();            public ArmPosition WaferCheckPosition { get; set; } = new ArmPosition();            public ArmModule Module0 { get; set; } = new ArmModule();            public COTAndDEVMoudle Module1 { get; set; } = new COTAndDEVMoudle();            public COTAndDEVMoudle Module2 { get; set; } = new COTAndDEVMoudle();            public COTAndDEVMoudle Module3 { get; set; } = new COTAndDEVMoudle();            public COTAndDEVMoudle Module4 { get; set; } = new COTAndDEVMoudle();            public CPLOrADHModule Module5 { get; set; } = new CPLOrADHModule();            public CPLOrADHModule Module6 { get; set; } = new CPLOrADHModule();            public LinkCPLOrADHModule Module7 { get; set; } = new LinkCPLOrADHModule();            public LinkCPLOrADHModule Module8 { get; set; } = new LinkCPLOrADHModule();            public CPLOrADHModule Module9 { get; set; } = new CPLOrADHModule();            public CPLOrADHModule Module10 { get; set; } = new CPLOrADHModule();            public CPLOrADHModule Module11 { get; set; } = new CPLOrADHModule();            public CPLOrADHModule Module12 { get; set; } = new CPLOrADHModule();            public CPLOrADHModule Module13 { get; set; } = new CPLOrADHModule();            public CPLOrADHModule Module14 { get; set; } = new CPLOrADHModule();            public CPLOrADHModule Module15 { get; set; } = new CPLOrADHModule();            public CPLOrADHModule Module16 { get; set; } = new CPLOrADHModule();            public CPLOrADHModule Module17 { get; set; } = new CPLOrADHModule();            public CPLOrADHModule Module18 { get; set; } = new CPLOrADHModule();            public CPLOrADHModule Module19 { get; set; } = new CPLOrADHModule();            public CPLOrADHModule Module20 { get; set; } = new CPLOrADHModule();            public CPLOrADHModule Module21 { get; set; } = new CPLOrADHModule();            public CPLOrADHModule Module22 { get; set; } = new CPLOrADHModule();            public CPLOrADHModule Module23 { get; set; } = new CPLOrADHModule();            public CPLOrADHModule Module24 { get; set; } = new CPLOrADHModule();            public CPLOrADHModule Module25 { get; set; } = new CPLOrADHModule();            public CPLOrADHModule Module26 { get; set; } = new CPLOrADHModule();            public CPLOrADHModule Module27 { get; set; } = new CPLOrADHModule();            public CPLOrADHModule Module28 { get; set; } = new CPLOrADHModule();            public CPLOrADHModule Module29 { get; set; } = new CPLOrADHModule();        }        public class PRB2 : INode        {            public ArmPosition AccessHomePosition { get; set; } = new ArmPosition();            public ArmPosition WaferCheckPosition { get; set; } = new ArmPosition();            public ArmModule Module0 { get; set; } = new ArmModule();            public COTAndDEVMoudle Module1 { get; set; } = new COTAndDEVMoudle();            public COTAndDEVMoudle Module2 { get; set; } = new COTAndDEVMoudle();            public COTAndDEVMoudle Module3 { get; set; } = new COTAndDEVMoudle();            public COTAndDEVMoudle Module4 { get; set; } = new COTAndDEVMoudle();            public CPLOrADHModule Module5 { get; set; } = new CPLOrADHModule();            public CPLOrADHModule Module6 { get; set; } = new CPLOrADHModule();            public CPLOrADHModule Module7 { get; set; } = new CPLOrADHModule();            public CPLOrADHModule Module8 { get; set; } = new CPLOrADHModule();            public CPLOrADHModule Module9 { get; set; } = new CPLOrADHModule();            public CPLOrADHModule Module10 { get; set; } = new CPLOrADHModule();            public CPLOrADHModule Module11 { get; set; } = new CPLOrADHModule();            public CPLOrADHModule Module12 { get; set; } = new CPLOrADHModule();            public CPLOrADHModule Module13 { get; set; } = new CPLOrADHModule();            public CPLOrADHModule Module14 { get; set; } = new CPLOrADHModule();            public CPLOrADHModule Module15 { get; set; } = new CPLOrADHModule();            public CPLOrADHModule Module16 { get; set; } = new CPLOrADHModule();            public CPLOrADHModule Module17 { get; set; } = new CPLOrADHModule();            public CPLOrADHModule Module18 { get; set; } = new CPLOrADHModule();            public CPLOrADHModule Module19 { get; set; } = new CPLOrADHModule();            public CPLOrADHModule Module20 { get; set; } = new CPLOrADHModule();            public CPLOrADHModule Module21 { get; set; } = new CPLOrADHModule();            public CPLOrADHModule Module22 { get; set; } = new CPLOrADHModule();            public CPLOrADHModule Module23 { get; set; } = new CPLOrADHModule();            public CPLOrADHModule Module24 { get; set; } = new CPLOrADHModule();            public CPLOrADHModule Module25 { get; set; } = new CPLOrADHModule();            public CPLOrADHModule Module26 { get; set; } = new CPLOrADHModule();            public CPLOrADHModule Module27 { get; set; } = new CPLOrADHModule();            public CPLOrADHModule Module28 { get; set; } = new CPLOrADHModule();            public CPLOrADHModule Module29 { get; set; } = new CPLOrADHModule();        }        public class IFB : INode        {            public ArmPosition AccessHomePosition { get; set; } = new ArmPosition();            public ArmPosition WaferCheckPosition { get; set; } = new ArmPosition();            public ArmModule Module0 { get; set; } = new ArmModule();            public IFBMoudle Module1 { get; set; } = new IFBMoudle();            public IFBMoudle Module2 { get; set; } = new IFBMoudle();            public IFBMoudle Module3 { get; set; } = new IFBMoudle();            public IFBMoudle Module4 { get; set; } = new IFBMoudle();            public IFBMoudle Module5 { get; set; } = new IFBMoudle();        }        public class ArmModule : ModuleBase, INode        {            public string TransferArm { get; set; }            public ArmAxis X1axis { get; set; } = new ArmAxis();            public ArmAxis X2axis { get; set; } = new ArmAxis();            public ArmAxis X3axis { get; set; } = new ArmAxis();            public ArmAxis Yaxis { get; set; } = new ArmAxis();            public ArmAxis Zaxis { get; set; } = new ArmAxis();            public ArmAxis Raxis { get; set; } = new ArmAxis();            public override void SetParameterValue(DeviceModule deviceModule)            {                base.SetParameterValue(deviceModule);                deviceModule.ArmAxisList.Clear();                deviceModule.ArmAxisList.Add(X1axis.ChangedArmAxis());                deviceModule.ArmAxisList.Add(X2axis.ChangedArmAxis());                deviceModule.ArmAxisList.Add(X3axis.ChangedArmAxis());                deviceModule.ArmAxisList.Add(Yaxis.ChangedArmAxis());                deviceModule.ArmAxisList.Add(Zaxis.ChangedArmAxis());                deviceModule.ArmAxisList.Add(Raxis.ChangedArmAxis());            }        }        public class UNCModule : ModuleBase, INode        {            public string MappingType { get; set; }            public int WaferThickness { get; set; }            public int PositiveTolerance { get; set; }            public int NegativeTolerance { get; set; }            public int FirstSlotposition { get; set; }            public string SlotEditingType { get; set; }            public int SlotPitch { get; set; }            public int MappingStartPosition { get; set; }            public int MappingEndPosition { get; set; }            public int SlotNo { get; set; }            public TransferArmPosition TransferArmPosition { get; set; } = new TransferArmPosition();            public override void SetParameterValue(DeviceModule deviceModule)            {                base.SetParameterValue(deviceModule);                deviceModule.MappingType.CurrentValue = MappingType;                deviceModule.WaferThickness = WaferThickness;                deviceModule.PositiveTolerance = PositiveTolerance;                deviceModule.NegativeTolerance = NegativeTolerance;                deviceModule.FirstSlotposition = FirstSlotposition;                deviceModule.SlotEditingType.CurrentValue = SlotEditingType;                deviceModule.SlotPitch = SlotPitch;                deviceModule.MappingStartPosition = MappingStartPosition;                deviceModule.MappingEndPosition = MappingEndPosition;                deviceModule.SlotNo = SlotNo;                deviceModule.ParameterTransferArmPosition = TransferArmPosition.ChangedTransferArmPosition();            }        }        public class CPLOrADHModule : ModuleBase, INode        {            public string ControlForm { get; set; }            public double InitialData { get; set; }            public double OverTemp { get; set; }            public double SettlingDetermineTime { get; set; }            public double SettlingTimeOut { get; set; }            public double UsePointOffset { get; set; }            public string BandStartMonitorForm { get; set; }            public string BandInvalidTime { get; set; }            public string BandProcessMonitorForm { get; set; }            public string BandDeterminationTime { get; set; }            public string BandProcessValue { get; set; }            public string BandProcessPIDSetFormat { get; set; }            public string BandProcessPIDP { get; set; }            public string BandProcessPIDI { get; set; }            public string BandProcessPIDD { get; set; }            public string BandProcessOffset { get; set; }            public string BandProcessOffsetValue { get; set; }            public string AConstant { get; set; }            public string SetValue { get; set; }            public string RangeValueMin { get; set; }            public string RangeValueMax { get; set; }            public string DispenseConfig { get; set; }            public TransferArmPosition TransferArmPosition { get; set; } = new TransferArmPosition();            public override void SetParameterValue(DeviceModule deviceModule)            {                base.SetParameterValue(deviceModule);                deviceModule.ParameterTransferArmPosition = TransferArmPosition.ChangedTransferArmPosition();            }        }        public class LinkCPLOrADHModule : CPLOrADHModule, INode        {            public TransferArmPosition LinkTransferArmPosition { get; set; } = new TransferArmPosition();            public override void SetParameterValue(DeviceModule deviceModule)            {                base.SetParameterValue(deviceModule);                deviceModule.ParameterTransferArmPosition = TransferArmPosition.ChangedTransferArmPosition();                deviceModule.LinkParameterTransferArmPosition = LinkTransferArmPosition.ChangedTransferArmPosition();            }        }        public class COTAndDEVMoudle : ModuleBase        {            public int ArmCount { get; set; }            public int ShakeArmNo { get; set; }            public int UpperLimitSpinSpeed { get; set; }            public int UpperLimitAcceleration { get; set; }            public int SpinOutSpeed { get; set; }            public double SpinOutTime { get; set; }            public NozzleChanger NozzleChanger { get; set; } = new NozzleChanger();            public NozzleArmInformat NozzleArmInformat1 { get; set; } = new NozzleArmInformat();            public NozzleArmInformat NozzleArmInformat2 { get; set; } = new NozzleArmInformat();            public TransferArmPosition TransferArmPosition { get; set; } = new TransferArmPosition();            public string DispenseConfig { get; set; }            public override void SetParameterValue(DeviceModule deviceModule)            {                base.SetParameterValue(deviceModule);                SpinerModule spinerModule = new SpinerModule()                {                    ArmCount = this.ArmCount.ToString(),                    ShakeArmNo = this.ShakeArmNo.ToString(),                    UpperLimitSpinSpeed = this.UpperLimitSpinSpeed.ToString(),                    UpperLimitAcceleration = this.UpperLimitAcceleration.ToString(),                    SpinOutSpeed = this.SpinOutSpeed.ToString(),                    SpinOutTime = this.SpinOutTime.ToString(),                    NozzleChanger = this.NozzleChanger.ChangedNozzleChanger(),                    NozzleArmInformat1 = this.NozzleArmInformat1.ChangedNozzleArmInformat(),                    NozzleArmInformat2 = this.NozzleArmInformat2.ChangedNozzleArmInformat(),                };                deviceModule.ParameterTransferArmPosition = TransferArmPosition.ChangedTransferArmPosition();                deviceModule.ModuleSpiner = spinerModule;            }        }        public class IFBMoudle : ModuleBase        {            public TransferArmPosition TransferArmPosition { get; set; } = new TransferArmPosition();            public override void SetParameterValue(DeviceModule deviceModule)            {                base.SetParameterValue(deviceModule);                deviceModule.ParameterTransferArmPosition = TransferArmPosition.ChangedTransferArmPosition();            }        }        public class NozzleChanger : INode        {            public string IsNozzleChangerEnable { get; set; }            public double MotorPulseRate { get; set; }            public int MaxSpeed { get; set; }            public int MoveSpeed { get; set; }            public string Data { get; set; }            public MECF.Framework.Common.Utilities.NozzleChanger ChangedNozzleChanger()            {                var nozzleChanger = new MECF.Framework.Common.Utilities.NozzleChanger()                {                    IsNozzleChangerEnable = IsNozzleChangerEnable,                    MotorPulseRate = this.MotorPulseRate.ToString(),                    MaxSpeed = this.MaxSpeed.ToString(),                    MoveSpeed = this.MoveSpeed.ToString(),                };                nozzleChanger.SetNozzleChangerDataList(this.Data);                return nozzleChanger;            }        }        public class NozzleArmInformat : INode        {            public string IsNozzleArmEnable { get; set; }            public string ArmDriveFormat { get; set; }            public string NozzleForm { get; set; }            public double MotorPulsesRate { get; set; }            public double StartPosition { get; set; }            public double EndPosition { get; set; }            public double StartCupPosition { get; set; }            public double EndCupPosition { get; set; }            public double MaintenaceSpeed { get; set; }            public string Home { get; set; }            public string DmyDisp { get; set; }            public string Standby { get; set; }            public string Maintenace1 { get; set; }            public string Maintenace2 { get; set; }            public string Maintenace3 { get; set; }            public string Begin { get; set; }            public string Center { get; set; }            public string Center2 { get; set; }            public string End { get; set; }            public string Dispense1 { get; set; }            public string Dispense2 { get; set; }            public string Dispense3 { get; set; }            public string Dispense4 { get; set; }            public string Dispense5 { get; set; }            public MECF.Framework.Common.Utilities.NozzleArmInformat ChangedNozzleArmInformat()            {                var nozzleArmInformat = new MECF.Framework.Common.Utilities.NozzleArmInformat()                {                    IsNozzleArmEnable = this.IsNozzleArmEnable,                    ArmDriveFormat = this.ArmDriveFormat,                    NozzleForm = this.NozzleForm,                    MotorPulsesRate = this.MotorPulsesRate.ToString(),                    StartPosition = this.StartPosition.ToString("f2"),                    EndPosition = this.EndPosition.ToString("f2"),                    StartCupPosition = this.StartCupPosition.ToString("f2"),                    EndCupPosition = this.EndCupPosition.ToString("f2"),                    MaintenaceSpeed = this.MaintenaceSpeed.ToString("f2"),                    Home = new TransferArmRecipePositionData(this.Home),                    DmyDisp = new TransferArmRecipePositionData(this.DmyDisp),                    Standby = new TransferArmRecipePositionData(this.Standby),                    Maintenace1 = new TransferArmRecipePositionData(this.Maintenace1),                    Maintenace2 = new TransferArmRecipePositionData(this.Maintenace2),                    Maintenace3 = new TransferArmRecipePositionData(this.Maintenace3),                    Begin = new TransferArmRecipePositionData(this.Begin),                    Center = new TransferArmRecipePositionData(this.Center),                    Center2 = new TransferArmRecipePositionData(this.Center2),                    End = new TransferArmRecipePositionData(this.End),                    Dispense1 = new TransferArmRecipePositionData(this.Dispense1),                    Dispense2 = new TransferArmRecipePositionData(this.Dispense2),                    Dispense3 = new TransferArmRecipePositionData(this.Dispense3),                    Dispense4 = new TransferArmRecipePositionData(this.Dispense4),                    Dispense5 = new TransferArmRecipePositionData(this.Dispense5),                };                return nozzleArmInformat;            }        }        public class TransferArmPosition : INode        {            public Zaxis Zaxis { get; set; } = new Zaxis();            public Pincette pincette1 { get; set; } = new Pincette();            public Pincette pincette2 { get; set; } = new Pincette();            public Pincette pincette3 { get; set; } = new Pincette();            public MECF.Framework.Common.Utilities.TransferArmPosition ChangedTransferArmPosition()            {                return new MECF.Framework.Common.Utilities.TransferArmPosition()                {                    EndOffset = Zaxis.EndOffset,                    SlowSpeedRate = Zaxis.SlowSpeedRate,                    StartOffset = Zaxis.StartOffset,                    TransferMode = Zaxis.TransferMode,                    PincetteList = new Dictionary<string, MECF.Framework.Common.Utilities.Pincette>                    { { "pincette1", pincette1.ChangedPincette() },                    { "pincette2", pincette2.ChangedPincette() },                    { "pincette3", pincette3.ChangedPincette() }}                };            }        }        public class Zaxis : INode        {            public string TransferMode { get; set; }            public double StartOffset { get; set; }            public double EndOffset { get; set; }            public int SlowSpeedRate { get; set; }        }        public class Pincette : INode        {            public double XaxisReceive { get; set; }            public double XaxisSend { get; set; }            public double YaxisReceive { get; set; }            public double YaxisSend { get; set; }            public double ZaxisReceive { get; set; }            public double ZaxisSend { get; set; }            public double RaxisReceive { get; set; }            public double RaxisSend { get; set; }            public double StrokeZaxisReceive { get; set; }            public double StrokeZaxisSend { get; set; }            public int ZaxisReceivePer { get; set; }            public int ZaxisSendPer { get; set; }            public MECF.Framework.Common.Utilities.Pincette ChangedPincette()            {                return new MECF.Framework.Common.Utilities.Pincette()                {                    XaxisReceive = this.XaxisReceive,                    XaxisSend = this.XaxisSend,                    YaxisReceive = this.YaxisReceive,                    YaxisSend = this.YaxisSend,                    ZaxisReceive = this.ZaxisReceive,                    ZaxisSend = this.ZaxisSend,                    RaxisReceive = this.RaxisReceive,                    RaxisSend = this.RaxisSend,                    StrokeZaxisReceive = this.StrokeZaxisReceive,                    StrokeZaxisSend = this.StrokeZaxisSend,                    ZaxisReceivePer = this.ZaxisReceivePer,                    ZaxisSendPer = this.ZaxisSendPer                };            }        }        public class ModuleBase : INode        {            public string Name { get; set; }            public string SYNEXC { get; set; }            public int MaterialCount { get; set; }            public int StartSlot { get; set; }            public string AGVConnect { get; set; }            public virtual void SetParameterValue(DeviceModule deviceModule)            {                deviceModule.Name = Name;                deviceModule.SYNEXC.CurrentValue = SYNEXC;                if (deviceModule.ID.Split('-')[0] == "2")                {                    deviceModule.MaterialCount = 1;                }                else                {                    deviceModule.MaterialCount = MaterialCount;                }                deviceModule.StartSlot = StartSlot;                deviceModule.AGVConnect.CurrentValue = AGVConnect;            }        }        public class ArmAxis : INode        {            public int SpeedInitial { get; set; }            public int SpeedMovementbetweenmod { get; set; }            public int SpeedReceive { get; set; }            public int SpeedSend { get; set; }            public int SpeedMapping { get; set; }            public int SpeedMaintenance { get; set; }            public int SpeedInching { get; set; }            public string MultiMovementbetweenmod { get; set; }            public int PassMovementbetweenmod { get; set; }            public int PassReceive { get; set; }            public int PassSpeedSend { get; set; }            public int PassSpeedMapping { get; set; }            public MECF.Framework.Common.Utilities.ArmAxis ChangedArmAxis()            {                return new MECF.Framework.Common.Utilities.ArmAxis()                {                    SpeedInitial = this.SpeedInitial,                    SpeedMovementbetweenmod = this.SpeedMovementbetweenmod,                    SpeedReceive = this.SpeedReceive,                    SpeedSend = this.SpeedSend,                    SpeedMapping = this.SpeedMapping,                    SpeedMaintenance = this.SpeedMaintenance,                    SpeedInching = this.SpeedInching,                    MultiMovementbetweenmod = this.MultiMovementbetweenmod,                    PassMovementbetweenmod = this.PassMovementbetweenmod,                    PassReceive = this.PassReceive,                    PassSpeedSend = this.PassSpeedSend,                    PassSpeedMapping = this.PassSpeedMapping                };            }        }        public class TransferConfigValue : INode        {            public double InitAllTimeout { get; set; }            public double MotorPushBarInAcceleration { get; set; }            public double MotorPushBarInDeceleration { get; set; }            public double MotorPushBarInStartFrequency { get; set; }            public double MotorPushBarInDefaultServoSpeed { get; set; }            public double MotorPushBarInDefaultManualSpeed { get; set; }            public double MotorPushBarInServoOnTimeout { get; set; }            public double MotorPushBarInMoveTimeout { get; set; }            public double MotorPushBarInStopTimeout { get; set; }            public double MotorPushBarInResetAlarmTimeout { get; set; }            public double MotorPushBarInHomeTimeout { get; set; }            public double MotorLoadStationInAcceleration { get; set; }            public double MotorLoadStationInDeceleration { get; set; }            public double MotorLoadStationInStartFrequency { get; set; }            public double MotorLoadStationInDefaultServoSpeed { get; set; }            public double MotorLoadStationInDefaultManualSpeed { get; set; }            public double MotorLoadStationInServoOnTimeout { get; set; }            public double MotorLoadStationInMoveTimeout { get; set; }            public double MotorLoadStationInStopTimeout { get; set; }            public double MotorLoadStationInResetAlarmTimeout { get; set; }            public double MotorLoadStationInHomeTimeout { get; set; }            public double MotorPushBarChamberAcceleration { get; set; }            public double MotorPushBarChamberDeceleration { get; set; }            public double MotorPushBarChamberStartFrequency { get; set; }            public double MotorPushBarChamberDefaultServoSpeed { get; set; }            public double MotorPushBarChamberDefaultManualSpeed { get; set; }            public double MotorPushBarChamberServoOnTimeout { get; set; }            public double MotorPushBarChamberMoveTimeout { get; set; }            public double MotorPushBarChamberStopTimeout { get; set; }            public double MotorPushBarChamberResetAlarmTimeout { get; set; }            public double MotorPushBarChamberHomeTimeout { get; set; }            public double MotorLoadStationOutAcceleration { get; set; }            public double MotorLoadStationOutDeceleration { get; set; }            public double MotorLoadStationOutStartFrequency { get; set; }            public double MotorLoadStationOutDefaultServoSpeed { get; set; }            public double MotorLoadStationOutDefaultManualSpeed { get; set; }            public double MotorLoadStationOutServoOnTimeout { get; set; }            public double MotorLoadStationOutMoveTimeout { get; set; }            public double MotorLoadStationOutStopTimeout { get; set; }            public double MotorLoadStationOutResetAlarmTimeout { get; set; }            public double MotorLoadStationOutHomeTimeout { get; set; }        }    }}
 |