APCPIDTable.cs 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. using Caliburn.Micro.Core;
  2. using RecipeEditorLib.RecipeModel.Params;
  3. using System;
  4. using System.Collections.Generic;
  5. using System.Collections.ObjectModel;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Threading.Tasks;
  9. namespace MECF.Framework.UI.Client.CenterViews.Parameter
  10. {
  11. public class APCPIDTable : ParameterTable
  12. {
  13. public APCPIDTable() : base()
  14. {
  15. }
  16. private DoubleParam _p;
  17. public DoubleParam P
  18. {
  19. get => _p;
  20. set
  21. {
  22. _p = value;
  23. NotifyOfPropertyChange(nameof(P));
  24. }
  25. }
  26. private DoubleParam _i;
  27. public DoubleParam I
  28. {
  29. get => _i;
  30. set
  31. {
  32. _i = value;
  33. NotifyOfPropertyChange(nameof(I));
  34. }
  35. }
  36. private DoubleParam _d;
  37. public DoubleParam D
  38. {
  39. get => _d;
  40. set
  41. {
  42. _d = value;
  43. NotifyOfPropertyChange(nameof(D));
  44. }
  45. }
  46. private DoubleParam _a;
  47. public DoubleParam A
  48. {
  49. get => _a;
  50. set
  51. {
  52. _a = value;
  53. NotifyOfPropertyChange(nameof(A));
  54. }
  55. }
  56. private DoubleParam _offset;
  57. public DoubleParam Offset
  58. {
  59. get => _offset;
  60. set
  61. {
  62. _offset = value;
  63. NotifyOfPropertyChange(nameof(Offset));
  64. }
  65. }
  66. private DoubleParam _ch;
  67. public DoubleParam CH
  68. {
  69. get => _ch;
  70. set
  71. {
  72. _ch = value;
  73. NotifyOfPropertyChange(nameof(CH));
  74. }
  75. }
  76. private DoubleParam _cl;
  77. public DoubleParam CL
  78. {
  79. get => _cl;
  80. set
  81. {
  82. _cl = value;
  83. NotifyOfPropertyChange(nameof(CL));
  84. }
  85. }
  86. public APCPIDTable(ParameterDataBase recipeData)
  87. {
  88. if (recipeData.Steps.Count <= 0) return;
  89. SetCurrentRecipeStep(recipeData, recipeData.Steps[0]);
  90. }
  91. public APCPIDTable(ParameterDataBase recipeData, int selectedStepNo)
  92. {
  93. ParameterTable step = recipeData.Steps.Where(x => x.StepNo == selectedStepNo).FirstOrDefault();
  94. SetCurrentRecipeStep(recipeData, step);
  95. }
  96. }
  97. }