Recipe.cs 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741
  1. using System;
  2. using System.Collections.ObjectModel;
  3. using System.ComponentModel;
  4. using System.Diagnostics;
  5. using System.IO;
  6. using System.Linq;
  7. using Newtonsoft.Json;
  8. using Newtonsoft.Json.Converters;
  9. using Venus_Core.Attributes;
  10. namespace Venus_Core
  11. {
  12. public enum RecipeType
  13. {
  14. Chuck,
  15. DeChuck,
  16. Process,
  17. Clean,
  18. }
  19. public enum StepType
  20. {
  21. Time,
  22. Stable,
  23. EndPoint,
  24. OverEtch,
  25. }
  26. public enum ProcessModule
  27. {
  28. Pressure,
  29. TCP, // Transformer Coupled Plasma (转换耦合等离子)
  30. Bias,
  31. Gas,
  32. ESC,
  33. Process,
  34. Compound,
  35. }
  36. public enum GeneratorMode
  37. {
  38. Pulsing,
  39. CW,
  40. }
  41. public enum PressureUnitMode
  42. {
  43. Pressure,
  44. Valve
  45. }
  46. public enum Suspect
  47. {
  48. Origin,
  49. Position1,
  50. Position2,
  51. Position3,
  52. Position4,
  53. Position5
  54. }
  55. public enum TargetMode
  56. {
  57. Step,
  58. Cycle
  59. }
  60. public enum ToleranceMode
  61. {
  62. Value,
  63. Percent
  64. }
  65. public class VenusTolerance
  66. {
  67. }
  68. public class Kepler2300Tolerance
  69. {
  70. public bool EnableTolerance { get; set; }
  71. public ToleranceMode ToleranceMode { get; set; }
  72. public int Gas1ToleranceValue { get; set; }
  73. public int Gas1TolerancePercent { get; set; }
  74. public int Gas2ToleranceValue { get; set; }
  75. public int Gas2TolerancePercent { get; set; }
  76. public int Gas3ToleranceValue { get; set; }
  77. public int Gas3TolerancePercent { get; set; }
  78. public int Gas4ToleranceValue { get; set; }
  79. public int Gas4TolerancePercent { get; set; }
  80. public int Gas5ToleranceValue { get; set; }
  81. public int Gas5TolerancePercent { get; set; }
  82. public int Gas6ToleranceValue { get; set; }
  83. public int Gas6TolerancePercent { get; set; }
  84. public int Gas7ToleranceValue { get; set; }
  85. public int Gas7TolerancePercent { get; set; }
  86. public int Gas8ToleranceValue { get; set; }
  87. public int Gas8TolerancePercent { get; set; }
  88. }
  89. public class RecipeHead : INotifyPropertyChanged
  90. {
  91. private string m_name;
  92. [IsOnlyRead]
  93. public string Name
  94. {
  95. get { return m_name; }
  96. set { m_name = value; InvokePropertyChanged("Name"); }
  97. }
  98. private string _Version = "TestVersion";
  99. public string Version
  100. {
  101. get { return _Version; }
  102. set { _Version = value; InvokePropertyChanged("Version"); }
  103. }
  104. private JetChamber _ChamberType = JetChamber.Venus;
  105. public JetChamber ChamberType
  106. {
  107. get { return _ChamberType; }
  108. set { _ChamberType = value; InvokePropertyChanged("ChamberType"); }
  109. }
  110. private RecipeType m_Type;
  111. [JsonConverter(typeof(StringEnumConverter))]
  112. public RecipeType Type
  113. {
  114. get { return m_Type; }
  115. set { m_Type = value; InvokePropertyChanged("Type"); }
  116. }
  117. private string m_ChunckRecipe;
  118. public string ChuckRecipe
  119. {
  120. get { return m_ChunckRecipe; }
  121. set { m_ChunckRecipe = value; InvokePropertyChanged("ChuckRecipe"); }
  122. }
  123. private string m_DechuckRecipe;
  124. public string DechuckRecipe
  125. {
  126. get { return m_DechuckRecipe; }
  127. set { m_DechuckRecipe = value; InvokePropertyChanged("DechuckRecipe"); }
  128. }
  129. private string m_CreateTime;
  130. [IsOnlyRead]
  131. public string CreateTime
  132. {
  133. get { return m_CreateTime; }
  134. set { m_CreateTime = value; InvokePropertyChanged("CreateTime"); }
  135. }
  136. private string m_EditTime;
  137. [IsOnlyRead]
  138. public string EditTime
  139. {
  140. get { return m_EditTime; }
  141. set { m_EditTime = value; InvokePropertyChanged("EditTime"); }
  142. }
  143. private string m_LastModifiedBy;
  144. [IsOnlyRead]
  145. public string LastModifiedBy
  146. {
  147. get { return m_LastModifiedBy; }
  148. set { m_LastModifiedBy = value; InvokePropertyChanged("LastModifiedBy"); }
  149. }
  150. private string m_Barcode;
  151. public string Barcode
  152. {
  153. get { return m_Barcode; }
  154. set { m_Barcode = value; InvokePropertyChanged("Barcode"); }
  155. }
  156. private string m_BasePressure;
  157. public string BasePressure
  158. {
  159. get { return m_BasePressure; }
  160. set { m_BasePressure = value; InvokePropertyChanged("BasePressure"); }
  161. }
  162. private string m_ChillerTemp;
  163. public string ChillerTemp
  164. {
  165. get { return m_ChillerTemp; }
  166. set { m_ChillerTemp = value; InvokePropertyChanged("ChillerTemp"); }
  167. }
  168. private int m_RFHoldTime = 1000;
  169. public int RFHoldTime
  170. {
  171. get { return m_RFHoldTime; }
  172. set { m_RFHoldTime = value; InvokePropertyChanged("RFHoldTime"); }
  173. }
  174. private int m_BiasRFHoldTime = 1000;
  175. public int BiasRFHoldTime
  176. {
  177. get { return m_BiasRFHoldTime; }
  178. set { m_BiasRFHoldTime = value; InvokePropertyChanged("BiasRFHoldTime"); }
  179. }
  180. private string m_Comment;
  181. public string Comment
  182. {
  183. get { return m_Comment; }
  184. set { m_Comment = value; InvokePropertyChanged("Comment"); }
  185. }
  186. //private string m_ChillerTemp1;
  187. //public string ChillerTemp1
  188. //{
  189. // get { return m_ChillerTemp1; }
  190. // set { m_ChillerTemp1 = value; InvokePropertyChanged("ChillerTemp1"); }
  191. //}
  192. //private string m_ChillerTemp2;
  193. //public string ChillerTemp2
  194. //{
  195. // get { return m_ChillerTemp2; }
  196. // set { m_ChillerTemp2 = value; InvokePropertyChanged("ChillerTemp2"); }
  197. //}
  198. //private string m_ChillerTemp3;
  199. //public string ChillerTemp3
  200. //{
  201. // get { return m_ChillerTemp3; }
  202. // set { m_ChillerTemp3 = value; InvokePropertyChanged("ChillerTemp3"); }
  203. //}
  204. //private string m_ChillerTemp4;
  205. //public string ChillerTemp4
  206. //{
  207. // get { return m_ChillerTemp4; }
  208. // set { m_ChillerTemp4 = value; InvokePropertyChanged("ChillerTemp4"); }
  209. //}
  210. public event PropertyChangedEventHandler PropertyChanged;
  211. public void InvokePropertyChanged(string propertyName)
  212. {
  213. if (PropertyChanged != null)
  214. {
  215. PropertyChanged.Invoke(this, new PropertyChangedEventArgs(propertyName));
  216. }
  217. }
  218. }
  219. public class ProcessUnitBase
  220. {
  221. [JsonIgnore]
  222. public Func<ProcessUnitBase, RecipeStep, RState> checker;
  223. [JsonIgnore]
  224. public Func<ProcessUnitBase, RecipeStep, RState> starter;
  225. [JsonIgnore]
  226. public Action<ProcessUnitBase, RecipeStep> end;
  227. //[JsonIgnore]
  228. //public string Name { get; set; }
  229. //[JsonIgnore]
  230. //public ProcessModule Moudle { get; set; }
  231. public RState Start(RecipeStep step)
  232. {
  233. if (starter != null)
  234. return starter(this, step);
  235. return RState.Running;
  236. }
  237. public RState Run(RecipeStep step)
  238. {
  239. if (checker != null)
  240. return checker(this, step);
  241. return RState.Running;
  242. }
  243. public void End(RecipeStep step)
  244. {
  245. if (end != null)
  246. end(this, step);
  247. }
  248. }
  249. [Serializable]
  250. public class RecipeStep : INotifyPropertyChanged
  251. {
  252. [JsonIgnore]
  253. public Func<RecipeStep, RState> checker;
  254. [JsonIgnore]
  255. public Func<RecipeStep, RState> starter;
  256. [JsonIgnore]
  257. public Func<RecipeStep, RState> ender;
  258. private int m_StepNo = 1;
  259. [IsOnlyRead]
  260. public int StepNo
  261. {
  262. get { return m_StepNo; }
  263. set { m_StepNo = value; InvokePropertyChanged("StepNo"); }
  264. }
  265. private StepType m_StepType;
  266. [JsonConverter(typeof(StringEnumConverter))]
  267. public StepType Type
  268. {
  269. get { return m_StepType; }
  270. set { m_StepType = value; InvokePropertyChanged("Type"); }
  271. }
  272. private int m_Time;
  273. public int Time
  274. {
  275. get { return m_Time; }
  276. set { m_Time = value; InvokePropertyChanged("Time"); }
  277. }
  278. private string m_Description;
  279. public string Description
  280. {
  281. get { return m_Description; }
  282. set { m_Description = value; InvokePropertyChanged("Description"); }
  283. }
  284. private string m_EPDConfigName;
  285. public string EPDConfig
  286. {
  287. get { return m_EPDConfigName; }
  288. set { m_EPDConfigName = value; InvokePropertyChanged("EPDConfig"); }
  289. }
  290. private int m_MinEndPointTime;
  291. public int MinEndPointTime
  292. {
  293. get { return m_MinEndPointTime; }
  294. set { m_MinEndPointTime = value; InvokePropertyChanged("MinEndPointTime"); }
  295. }
  296. private int m_MaxEndPointTime;
  297. public int MaxEndPointTime
  298. {
  299. get { return m_MaxEndPointTime; }
  300. set { m_MaxEndPointTime = value; InvokePropertyChanged("MaxEndPointTime"); }
  301. }
  302. //private bool m_EnableRamp;
  303. //public bool EnableRamp
  304. //{
  305. // get { return m_EnableRamp; }
  306. // set { m_EnableRamp = value; InvokePropertyChanged("EnableRamp"); }
  307. //}
  308. private int m_OverEtchPercent;
  309. public int OverEtchPercent
  310. {
  311. get { return m_OverEtchPercent; }
  312. set { m_OverEtchPercent = value; InvokePropertyChanged("OverEtchPercent"); }
  313. }
  314. private bool m_CycleStart;
  315. public bool CycleStart
  316. {
  317. get { return m_CycleStart; }
  318. set { m_CycleStart = value; InvokePropertyChanged("CycleStart"); }
  319. }
  320. private bool m_CycleEnd;
  321. public bool CycleEnd
  322. {
  323. get { return m_CycleEnd; }
  324. set { m_CycleEnd = value; InvokePropertyChanged("CycleEnd"); }
  325. }
  326. private int m_CycleNumber;
  327. public int CycleNumber
  328. {
  329. get { return m_CycleNumber; }
  330. set { m_CycleNumber = value; InvokePropertyChanged("CycleNumber"); }
  331. }
  332. private ObservableCollection<Object> lstUnit = new ObservableCollection<Object>();
  333. public ObservableCollection<Object> LstUnit
  334. {
  335. get { return lstUnit; }
  336. set { lstUnit = value; InvokePropertyChanged("LstUnit"); }
  337. }
  338. private Stopwatch _stepTimer = new Stopwatch();
  339. public long ElapsedTime()
  340. {
  341. return _stepTimer.ElapsedMilliseconds;
  342. }
  343. public void StartStepTimer()
  344. {
  345. _stepTimer.Restart();
  346. }
  347. private long _lastEPDStepTimne = 0;
  348. public void RecordEPDStepTime()
  349. {
  350. _lastEPDStepTimne = _stepTimer.ElapsedMilliseconds;
  351. }
  352. public long GetLastEPDStepTime()
  353. {
  354. return _lastEPDStepTimne;
  355. }
  356. public RState Start()
  357. {
  358. starter(this);
  359. foreach (var unit in lstUnit)
  360. {
  361. var processUnit = unit as ProcessUnitBase;
  362. if (processUnit != null)
  363. {
  364. var state = processUnit.Start(this);
  365. if (state != RState.Running)
  366. return state;
  367. }
  368. else
  369. return RState.Failed;
  370. }
  371. return RState.Running;
  372. }
  373. public RState Start(int steps, int currentstep)
  374. {
  375. starter(this);
  376. foreach (var unit in lstUnit)
  377. {
  378. var processUnit = unit as ProcessUnitBase;
  379. if (processUnit != null)
  380. {
  381. var state = processUnit.Start(this);
  382. if (state != RState.Running)
  383. return state;
  384. }
  385. else
  386. return RState.Failed;
  387. }
  388. return RState.Running;
  389. }
  390. public RState Run()
  391. {
  392. if (checker(this) == RState.End)
  393. return RState.End;
  394. bool bStable = true;
  395. foreach (var unit in lstUnit)
  396. {
  397. var processUnit = unit as ProcessUnitBase;
  398. if (processUnit != null)
  399. {
  400. var state = processUnit.Run(this);
  401. if (Type == StepType.Stable)
  402. {
  403. if (state != RState.Running && state != RState.End)
  404. return state;
  405. if (state == RState.Running)
  406. bStable = false;
  407. }
  408. else
  409. {
  410. if (state != RState.Running)
  411. return state;
  412. }
  413. }
  414. else
  415. return RState.Failed;
  416. }
  417. return (Type == StepType.Stable && bStable) ? RState.End : RState.Running;
  418. }
  419. public void End()
  420. {
  421. foreach (var unit in lstUnit)
  422. {
  423. var processUnit = unit as ProcessUnitBase;
  424. if (processUnit != null)
  425. {
  426. processUnit.End(this);
  427. }
  428. }
  429. ender(this);
  430. }
  431. public double RampFactor()
  432. {
  433. return _stepTimer.ElapsedMilliseconds / (Time * 1000.0);
  434. }
  435. public void AppendUnit(ProcessUnitBase unit)
  436. {
  437. lstUnit.Append(unit);
  438. }
  439. public event PropertyChangedEventHandler PropertyChanged;
  440. public void InvokePropertyChanged(string propertyName)
  441. {
  442. if (PropertyChanged != null)
  443. {
  444. PropertyChanged.Invoke(this, new PropertyChangedEventArgs(propertyName));
  445. }
  446. }
  447. }
  448. public class Recipe : INotifyPropertyChanged
  449. {
  450. private RecipeHead m_Header = new RecipeHead();
  451. public RecipeHead Header
  452. {
  453. get { return m_Header; }
  454. set { m_Header = value; InvokePropertyChanged("Header"); }
  455. }
  456. private ObservableCollection<RecipeStep> m_Steps;
  457. public ObservableCollection<RecipeStep> Steps
  458. {
  459. get { return m_Steps; }
  460. set { m_Steps = value; InvokePropertyChanged("Steps"); }
  461. }
  462. public static Recipe Load(string recipeFile)
  463. {
  464. var recipe = JsonConvert.DeserializeObject<Recipe>(recipeFile);
  465. if (recipe == null)
  466. {
  467. return null;
  468. }
  469. foreach (var step in recipe.Steps)
  470. {
  471. ObservableCollection<ProcessUnitBase> unit = new ObservableCollection<ProcessUnitBase>();
  472. for (int i = 0; i < step.LstUnit.Count; i++)
  473. {
  474. string value = step.LstUnit[i].ToString();
  475. string[] striparr = value.Split(new string[] { "\r\n" }, StringSplitOptions.None);
  476. string item1 = striparr[1].Remove(0, 15);
  477. string item2 = item1.Remove(item1.Length - 2, 2);
  478. switch (item2)
  479. {
  480. case "PressureModeUnit":
  481. unit.Add(JsonConvert.DeserializeObject<PressureByPressureModeUnit>(step.LstUnit[i].ToString()));
  482. break;
  483. //case "PressureByValveModeUnit":
  484. // unit.Add(JsonConvert.DeserializeObject<PressureByValveModeUnit>(step.LstUnit[i].ToString()));
  485. // break;
  486. case "TCPUnit":
  487. unit.Add(JsonConvert.DeserializeObject<TCPUnit>(step.LstUnit[i].ToString()));
  488. break;
  489. case "BiasUnit":
  490. unit.Add(JsonConvert.DeserializeObject<BiasUnit>(step.LstUnit[i].ToString()));
  491. break;
  492. case "GasControlUnit":
  493. unit.Add(JsonConvert.DeserializeObject<GasControlUnit>(step.LstUnit[i].ToString()));
  494. break;
  495. case "ESCHVUnit":
  496. unit.Add(JsonConvert.DeserializeObject<ESCHVUnit>(step.LstUnit[i].ToString()));
  497. break;
  498. case "ProcessKitUnit":
  499. unit.Add(JsonConvert.DeserializeObject<ProcessKitUnit>(step.LstUnit[i].ToString()));
  500. break;
  501. case "HeaterUnit":
  502. unit.Add(JsonConvert.DeserializeObject<HeaterUnit>(step.LstUnit[i].ToString()));
  503. break;
  504. case "GasUnit":
  505. unit.Add(JsonConvert.DeserializeObject<Kepler2200GasControlUnit>(step.LstUnit[i].ToString()));
  506. break;
  507. }
  508. }
  509. step.LstUnit.Clear();
  510. unit.ToList().ForEach(x =>
  511. {
  512. step.LstUnit.Add(x);
  513. });
  514. }
  515. return recipe;
  516. }
  517. public bool Validate()
  518. {
  519. return true;
  520. }
  521. public bool Save(string recipeFile)
  522. {
  523. return true;
  524. }
  525. public event PropertyChangedEventHandler PropertyChanged;
  526. public void InvokePropertyChanged(string propertyName)
  527. {
  528. if (PropertyChanged != null)
  529. {
  530. PropertyChanged.Invoke(this, new PropertyChangedEventArgs(propertyName));
  531. }
  532. }
  533. }
  534. public class RecipeUnity
  535. {
  536. public static string ConvertJsonString(string str)
  537. {
  538. JsonSerializer serializer = new JsonSerializer();
  539. TextReader tr = new StringReader(str);
  540. JsonTextReader jtr = new JsonTextReader(tr);
  541. object obj = serializer.Deserialize(jtr);
  542. if (obj != null)
  543. {
  544. StringWriter textWriter = new StringWriter();
  545. JsonTextWriter jsonWriter = new JsonTextWriter(textWriter)
  546. {
  547. Formatting = Newtonsoft.Json.Formatting.Indented,
  548. Indentation = 4,
  549. IndentChar = ' '
  550. };
  551. serializer.Serialize(jsonWriter, obj);
  552. return textWriter.ToString();
  553. }
  554. else
  555. {
  556. return str;
  557. }
  558. }
  559. public static string RecipeToString(Recipe recipe)
  560. {
  561. return JsonConvert.SerializeObject(recipe);
  562. }
  563. public static String CreateRecipe(JetChamber currentChamber, RecipeType recipeType, string recipeName)
  564. {
  565. Recipe recipe = new Recipe();
  566. recipe.Header = new RecipeHead();
  567. recipe.Header.CreateTime = DateTime.Now.ToString();
  568. recipe.Header.EditTime = DateTime.Now.ToString();
  569. recipe.Header.Type = recipeType;
  570. recipe.Header.ChamberType = currentChamber;
  571. recipe.Header.Name = recipeName;
  572. recipe.Header.LastModifiedBy = "Admin";
  573. recipe.Steps = new ObservableCollection<RecipeStep>();
  574. RecipeStep recipeStep = new RecipeStep();
  575. recipeStep.LstUnit = GetAllUnits(currentChamber, recipeType);
  576. recipe.Steps.Add(recipeStep);
  577. var recipeString = JsonConvert.SerializeObject(recipe);
  578. return recipeString;
  579. }
  580. public static ObservableCollection<Object> GetAllUnits(JetChamber jetChamber)
  581. {
  582. ObservableCollection<Object> LstUnit = new ObservableCollection<object>();
  583. switch (jetChamber)
  584. {
  585. case JetChamber.Venus:
  586. foreach (var item in Enum.GetValues(typeof(VenusUnits)))
  587. {
  588. Type t = Type.GetType($"Venus_Core.{item.ToString()}");
  589. var obj = System.Activator.CreateInstance(t);
  590. LstUnit.Add(obj);
  591. }
  592. break;
  593. case JetChamber.Kepler2300:
  594. foreach (var item in Enum.GetValues(typeof(Kepler2300Uints)))
  595. {
  596. Type t = Type.GetType($"Venus_Core.{item.ToString()}");
  597. var obj = System.Activator.CreateInstance(t);
  598. LstUnit.Add(obj);
  599. }
  600. break;
  601. case JetChamber.Kepler2200A:
  602. foreach (var item in Enum.GetValues(typeof(Kepler2200AUnits)))
  603. {
  604. Type t = Type.GetType($"Venus_Core.{item.ToString()}");
  605. var obj = System.Activator.CreateInstance(t);
  606. LstUnit.Add(obj);
  607. }
  608. break;
  609. }
  610. return LstUnit;
  611. }
  612. public static ObservableCollection<Object> GetAllUnits(JetChamber jetChamber, RecipeType recipeType)
  613. {
  614. ObservableCollection<Object> LstUnit = new ObservableCollection<object>();
  615. switch (jetChamber)
  616. {
  617. case JetChamber.Venus:
  618. if (recipeType == RecipeType.Clean)
  619. {
  620. foreach (var item in Enum.GetValues(typeof(VenusCleanRecipeUnits)))
  621. {
  622. Type t = Type.GetType($"Venus_Core.{item.ToString()}");
  623. var obj = System.Activator.CreateInstance(t);
  624. LstUnit.Add(obj);
  625. }
  626. }
  627. else
  628. {
  629. foreach (var item in Enum.GetValues(typeof(VenusUnits)))
  630. {
  631. Type t = Type.GetType($"Venus_Core.{item.ToString()}");
  632. var obj = System.Activator.CreateInstance(t);
  633. LstUnit.Add(obj);
  634. }
  635. }
  636. break;
  637. case JetChamber.Kepler2300:
  638. if (recipeType == RecipeType.Clean)
  639. {
  640. foreach (var item in Enum.GetValues(typeof(Kepler2300CleanRecipeUints)))
  641. {
  642. Type t = Type.GetType($"Venus_Core.{item.ToString()}");
  643. var obj = System.Activator.CreateInstance(t);
  644. LstUnit.Add(obj);
  645. }
  646. }
  647. else
  648. {
  649. foreach (var item in Enum.GetValues(typeof(Kepler2300Uints)))
  650. {
  651. Type t = Type.GetType($"Venus_Core.{item.ToString()}");
  652. var obj = System.Activator.CreateInstance(t);
  653. LstUnit.Add(obj);
  654. }
  655. }
  656. break;
  657. case JetChamber.Kepler2200A:
  658. foreach (var item in Enum.GetValues(typeof(Kepler2200AUnits)))
  659. {
  660. Type t = Type.GetType($"Venus_Core.{item.ToString()}");
  661. var obj = System.Activator.CreateInstance(t);
  662. LstUnit.Add(obj);
  663. }
  664. break;
  665. }
  666. return LstUnit;
  667. }
  668. }
  669. }