终端一体化运控平台
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

2 лет назад
2 лет назад
2 лет назад
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. using BPASmartClient.Helper;
  2. using BPASmartClient.JXJFoodSmallStation.Model.Siemens;
  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 BPASmartClient.JXJFoodSmallStation.Model
  10. {
  11. public class TestData
  12. {
  13. public volatile static TestData Instance;
  14. public static TestData GetInstance => Instance ?? (Instance = new TestData());
  15. public ObservableCollection<RemoteRecipeData> Recipes { get; set; } = new ObservableCollection<RemoteRecipeData>();
  16. public ObservableCollection<RemoteRecipeRawMaterial> RawMaterials { get; set; } = new ObservableCollection<RemoteRecipeRawMaterial>();
  17. public TestData()
  18. {
  19. string recipeName = "配方1";
  20. long recipeCode = 10001;
  21. int Traycode = 1;
  22. double RawmaterialWeight = 10;
  23. int RawMaterialbarrelNum = 1;
  24. int RawMaterialLocation = 5;
  25. double RawmaterialWeight1 = 20;
  26. int RawMaterialbarrelNum1 = 2;
  27. int RawMaterialLocation1 = 7;
  28. double RawmaterialWeight2 = 30;
  29. int RawMaterialbarrelNum2 = 3;
  30. int RawMaterialLocation2 = 9;
  31. RawMaterials.Add(new RemoteRecipeRawMaterial()
  32. {
  33. DeviceIp = RawMaterials.Count + 1,
  34. RawMaterialWeight = RawmaterialWeight,
  35. RawMaterialBarrelNum = RawMaterialbarrelNum,
  36. RawMaterialLocation = RawMaterialLocation
  37. });
  38. RawMaterials.Add(new RemoteRecipeRawMaterial()
  39. {
  40. DeviceIp = RawMaterials.Count + 1,
  41. RawMaterialWeight = RawmaterialWeight1,
  42. RawMaterialBarrelNum = RawMaterialbarrelNum1,
  43. RawMaterialLocation = RawMaterialLocation1
  44. });
  45. RawMaterials.Add(new RemoteRecipeRawMaterial()
  46. {
  47. DeviceIp = RawMaterials.Count + 1,
  48. RawMaterialWeight = RawmaterialWeight2,
  49. RawMaterialBarrelNum = RawMaterialbarrelNum2,
  50. RawMaterialLocation = RawMaterialLocation2
  51. });
  52. Recipes.Add(new Model.RemoteRecipeData()
  53. {
  54. RecipeName = recipeName,
  55. RecipeCode = recipeCode,
  56. TrayCode = Traycode,
  57. RawMaterial = RawMaterials
  58. });
  59. RawMaterials.Clear();
  60. string recipeName_2 = "配方2";
  61. long recipeCode_2 = 20001;
  62. int Traycode_2 = 3;
  63. double RawmaterialWeight_2 = 10;
  64. int RawMaterialbarrelNum_2 = 1;
  65. int RawMaterialLocation_2 = 5;
  66. double RawmaterialWeight1_2 = 20;
  67. int RawMaterialbarrelNum1_2 = 2;
  68. int RawMaterialLocation1_2 = 7;
  69. double RawmaterialWeight2_2 = 30;
  70. int RawMaterialbarrelNum2_2 = 3;
  71. int RawMaterialLocation2_2 = 9;
  72. RawMaterials.Add(new RemoteRecipeRawMaterial()
  73. {
  74. DeviceIp = RawMaterials.Count + 1,
  75. RawMaterialWeight = RawmaterialWeight_2,
  76. RawMaterialBarrelNum = RawMaterialbarrelNum_2,
  77. RawMaterialLocation = RawMaterialLocation_2
  78. });
  79. RawMaterials.Add(new RemoteRecipeRawMaterial()
  80. {
  81. DeviceIp = RawMaterials.Count + 1,
  82. RawMaterialWeight = RawmaterialWeight1_2,
  83. RawMaterialBarrelNum = RawMaterialbarrelNum1_2,
  84. RawMaterialLocation = RawMaterialLocation1_2
  85. });
  86. RawMaterials.Add(new RemoteRecipeRawMaterial()
  87. {
  88. DeviceIp = RawMaterials.Count + 1,
  89. RawMaterialWeight = RawmaterialWeight2_2,
  90. RawMaterialBarrelNum = RawMaterialbarrelNum2_2,
  91. RawMaterialLocation = RawMaterialLocation2_2
  92. });
  93. Recipes.Add(new Model.RemoteRecipeData()
  94. {
  95. RecipeName = recipeName_2,
  96. RecipeCode = recipeCode_2,
  97. TrayCode = Traycode_2,
  98. RawMaterial = RawMaterials
  99. });
  100. }
  101. }
  102. }