123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Reflection;
- using System.Text;
- using System.Threading.Tasks;
- using MECF.Framework.Common.DataCenter;
- using System.Xml.Serialization;
- using System.Windows.Documents;
- using System.Xml.Linq;
- namespace MECF.Framework.UI.Core.View.Common
- {
- public class SCValue
- {
- public Block4Config System_SetUp_4Block { get; set; }
- private Dictionary<string, Tuple<object, PropertyInfo>> _fieldMap =
- new Dictionary<string, Tuple<object, PropertyInfo>>();
- public SCValue()
- {
- System_SetUp_4Block = new Block4Config();
- }
- public List<string> GetKeys()
- {
- return _fieldMap.Keys.ToList();
- }
- public void SetKeys()
- {
- _fieldMap.Clear();
- Dictionary<string, object> items = new Dictionary<string, object>();
- PropertyInfo[] property = typeof(SCValue).GetProperties();
- foreach (PropertyInfo fiGroup in property)
- {
- object objGroup = fiGroup.GetValue(this, null);
- foreach (PropertyInfo fiItem in objGroup.GetType().GetProperties())
- {
- var type=fiItem.PropertyType;
- foreach (PropertyInfo moduleItem in fiItem.PropertyType.GetProperties())
- {
- string name = String.Format("{0}_{1}_{2}", fiGroup.Name, fiItem.Name, moduleItem.Name.Replace("Module", ""));
- if (_fieldMap.Keys.Contains(name))
- {
- _fieldMap[name] = Tuple.Create((object)type, moduleItem);
- }
- else
- {
- _fieldMap.Add(name, Tuple.Create((object)type, moduleItem));
- }
- }
- }
- }
- }
- 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 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))
- {
- _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].Item2.PropertyType == typeof(double))
- {
- _fieldMap[key].Item2.SetValue(_fieldMap[key].Item1, Convert.ToDouble(value), null);
- }
- else if (_fieldMap[key].Item2.PropertyType == typeof(int))
- {
- _fieldMap[key].Item2.SetValue(_fieldMap[key].Item1, Convert.ToInt32(value), null);
- }
- else if (_fieldMap[key].Item2.PropertyType == typeof(string))
- {
- _fieldMap[key].Item2.SetValue(_fieldMap[key].Item1, value, null);
- }
- else if (_fieldMap[key].Item2.PropertyType == typeof(bool))
- {
- _fieldMap[key].Item2.SetValue(_fieldMap[key].Item1, Convert.ToBoolean(value), null);
- }
- }
- 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 Block4Config
- {
- public CSB Block1 { get; set; }
- public PRB Block2 { get; set; }
- public PRB Block3 { get; set; }
- public IFB Block4 { get; set; }
- }
- public class Block3Config
- {
- public CSB Block1 { get; set; }
- public PRB Block2 { get; set; }
- public IFB Block4 { get; set; }
- }
- public class Block2Config
- {
- public CSB Block1 { get; set; }
- public PRB Block2 { get; set; }
- }
- public class CSB
- {
- public ArmModule Module0 { get; set; }
- public UNCModule Module1 { get; set; }
- public UNCModule Module2 { get; set; }
- public UNCModule Module3 { get; set; }
- public UNCModule Module4 { get; set; }
- }
- public class PRB
- {
- public ArmModule Module0 { get; set; }
- public COTAndDEVMoudle Module1 { get; set; }
- public COTAndDEVMoudle Module2 { get; set; }
- public COTAndDEVMoudle Module3 { get; set; }
- public COTAndDEVMoudle Module4 { get; set; }
- public CPLOrADHModule Module5 { get; set; }
- public CPLOrADHModule Module6 { get; set; }
- public CPLOrADHModule Module7 { get; set; }
- public CPLOrADHModule Module8 { get; set; }
- public CPLOrADHModule Module9 { get; set; }
- public CPLOrADHModule Module10 { get; set; }
- public CPLOrADHModule Module11 { get; set; }
- public CPLOrADHModule Module12 { get; set; }
- public CPLOrADHModule Module13 { get; set; }
- public CPLOrADHModule Module14 { get; set; }
- public CPLOrADHModule Module15 { get; set; }
- public CPLOrADHModule Module16 { get; set; }
- public CPLOrADHModule Module17 { get; set; }
- public CPLOrADHModule Module18 { get; set; }
- public CPLOrADHModule Module19 { get; set; }
- public CPLOrADHModule Module20 { get; set; }
- public CPLOrADHModule Module21 { get; set; }
- public CPLOrADHModule Module22 { get; set; }
- public CPLOrADHModule Module23 { get; set; }
- public CPLOrADHModule Module24 { get; set; }
- public CPLOrADHModule Module25 { get; set; }
- public CPLOrADHModule Module26 { get; set; }
- public CPLOrADHModule Module27 { get; set; }
- public CPLOrADHModule Module28 { get; set; }
- public CPLOrADHModule Module29 { get; set; }
- }
- public class IFB
- {
- public ArmModule Module0 { get; set; }
- public IFBMoudle Module1 { get; set; }
- public IFBMoudle Module2 { get; set; }
- public IFBMoudle Module3 { get; set; }
- public IFBMoudle Module4 { get; set; }
- public IFBMoudle Module5 { get; set; }
- }
- public class ArmModule : ModuleBase
- {
- public string TransferArm { get; set; }
- public ArmAxis X1axis { get; set; }
- public ArmAxis X2axis { get; set; }
- public ArmAxis X3axis { get; set; }
- public ArmAxis Yaxis { get; set; }
- public ArmAxis Zaxis { get; set; }
- public ArmAxis Raxis { get; set; }
- }
- public class UNCModule : ModuleBase
- {
- 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; }
- }
- public class CPLOrADHModule : ModuleBase
- {
- 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 TransferArmPosition TransferArmPosition { get; set; }
- }
- 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 SpinOffSpeed { get; set; }
- public int SpinOffTime { get; set; }
- public NozzleChanger NozzleChanger { get; set; }
- public NozzleArmInformat NozzleArmInformat1 { get; set; }
- public NozzleArmInformat NozzleArmInformat2 { get; set; }
- public TransferArmPosition TransferArmPosition { get; set; }
- }
- public class IFBMoudle : ModuleBase
- {
- public TransferArmPosition TransferArmPosition { get; set; }
- }
- public class NozzleChanger
- {
- public string IsNozzleChangerEnable { get; set; }
- public double MotorPulseRate { get; set; }
- public int MaxSpeed { get; set; }
- public string Data { get; set; }
- }
- public class NozzleArmInformat
- {
- 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 string Home { get; set; }
- public string DmyDisp { get; set; }
- public string Standby1 { get; set; }
- public string Standby2 { get; set; }
- public string Begin { get; set; }
- public string Center { 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 class TransferArmPosition
- {
- public Zaxis Zaxis { get; set; }
- public Pincette pincette1 { get; set; }
- public Pincette pincette2 { get; set; }
- public Pincette pincette3 { get; set; }
- }
- public class Zaxis
- {
- public string TransferMode { get; set; }
- public int StartOffset { get; set; }
- public int EndOffset { get; set; }
- public int SlowSpeedRate { get; set; }
- }
- public class Pincette
- {
- public int XaxisReceive { get; set; }
- public int XaxisSend { get; set; }
- public int YaxisReceive { get; set; }
- public int YaxisSend { get; set; }
- public int ZaxisReceive { get; set; }
- public int ZaxisSend { get; set; }
- public int RaxisReceive { get; set; }
- public int RaxisSend { get; set; }
- public int StrokeZaxisReceive { get; set; }
- public int StrokeZaxisSend { get; set; }
- public int ZaxisReceivePer { get; set; }
- public int ZaxisSendPer { get; set; }
- }
- public class ModuleBase
- {
- 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 class ArmAxis
- {
- 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 class TransferConfigValue
- {
- 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; }
- }
- }
- }
|