TimeDict.cs 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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. public class TimeDict
  10. {
  11. public Dictionary<string, string> StepTimeDict { get; set; } = new Dictionary<string, string>();
  12. public Dictionary<string, string> CoolTimeDict { 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 TimeDict()
  19. {
  20. GetSCValue();
  21. }
  22. public void GetSCValue()
  23. {
  24. var temp = Generate();
  25. StepTimeDict.Clear();
  26. foreach (var item in temp)
  27. {
  28. StepTimeDict[item] = SystemConfigProvider.Instance.GetValueByName($"PM1.RecipeEditParameter.StepTime.{item}");
  29. }
  30. CoolTimeDict.Clear();
  31. foreach (var item in temp)
  32. {
  33. CoolTimeDict[item] = SystemConfigProvider.Instance.GetValueByName($"PM1.RecipeEditParameter.CoolTime.{item}");
  34. }
  35. }
  36. }
  37. }