Recipe.cs 25 KB

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