APCSettingDict.cs 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. using MECF.Framework.UI.Client.CenterViews.Configs.SystemConfig;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Linq;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7. namespace FurnaceUI.Views.ParameterSC
  8. {
  9. class APCSettingDict
  10. {
  11. public Dictionary<string, string> PressureDict { get; set; } = new Dictionary<string, string>();
  12. public Dictionary<string, string> PositionDict { get; set; } = new Dictionary<string, string>();
  13. IEnumerable<string> Generate()
  14. {
  15. for (char c = 'A'; c <= 'Z'; c++)
  16. yield return new string(c, 1);
  17. }
  18. public APCSettingDict()
  19. {
  20. GetSCValue();
  21. }
  22. public void GetSCValue()
  23. {
  24. var temp = Generate();
  25. foreach (var item in temp)
  26. {
  27. PressureDict[item] = SystemConfigProvider.Instance.GetValueByName($"PM1.RecipeEditParameter.APCSetting.Pressure.{item}");
  28. }
  29. foreach (var item in temp)
  30. {
  31. PositionDict[item] = SystemConfigProvider.Instance.GetValueByName($"PM1.RecipeEditParameter.APCSetting.Position.{item}");
  32. }
  33. }
  34. }
  35. }