|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105 |
- using System.Collections.ObjectModel;
-
- namespace BPASmartClient.FoodStationTest.Model
- {
- public class TestData
- {
- public volatile static TestData Instance;
- public static TestData GetInstance => Instance ?? (Instance = new TestData());
- public ObservableCollection<RemoteRecipeData> Recipes { get; set; } = new ObservableCollection<RemoteRecipeData>();
- public ObservableCollection<RemoteRecipeRawMaterial> RawMaterials { get; set; } = new ObservableCollection<RemoteRecipeRawMaterial>();
- public TestData()
- {
- string recipeName = "配方1";
- string recipeCode = "10001";
- int Traycode = 1;
-
- float RawmaterialWeight = 10;
- short RawMaterialbarrelNum = 1;
- int RawMaterialLocation = 5;
-
- float RawmaterialWeight1 = 20;
- short RawMaterialbarrelNum1 = 2;
- int RawMaterialLocation1 = 7;
-
- float RawmaterialWeight2 = 30;
- short RawMaterialbarrelNum2 = 3;
- int RawMaterialLocation2 = 9;
- RawMaterials.Add(new RemoteRecipeRawMaterial()
- {
- DeviceIp = RawMaterials.Count + 1,
- RawMaterialWeight = RawmaterialWeight,
- RawMaterialBarrelNum = RawMaterialbarrelNum,
- RawMaterialLocation = RawMaterialLocation
- });
- RawMaterials.Add(new RemoteRecipeRawMaterial()
- {
- DeviceIp = RawMaterials.Count + 1,
- RawMaterialWeight = RawmaterialWeight1,
- RawMaterialBarrelNum = RawMaterialbarrelNum1,
- RawMaterialLocation = RawMaterialLocation1
- });
- RawMaterials.Add(new RemoteRecipeRawMaterial()
- {
- DeviceIp = RawMaterials.Count + 1,
- RawMaterialWeight = RawmaterialWeight2,
- RawMaterialBarrelNum = RawMaterialbarrelNum2,
- RawMaterialLocation = RawMaterialLocation2
- });
-
- Recipes.Add(new Model.RemoteRecipeData()
- {
- RecipeName = recipeName,
- RecipeCode = recipeCode,
- TrayCode = Traycode,
- RawMaterial = RawMaterials
- });
-
- RawMaterials.Clear();
- string recipeName_2 = "配方2";
- string recipeCode_2 = "20001";
- int Traycode_2 = 3;
-
- float RawmaterialWeight_2 = 10;
- short RawMaterialbarrelNum_2 = 1;
- int RawMaterialLocation_2 = 5;
-
- float RawmaterialWeight1_2 = 20;
- short RawMaterialbarrelNum1_2 = 2;
- int RawMaterialLocation1_2 = 7;
-
- float RawmaterialWeight2_2 = 30;
- short RawMaterialbarrelNum2_2 = 3;
- int RawMaterialLocation2_2 = 9;
- RawMaterials.Add(new RemoteRecipeRawMaterial()
- {
- DeviceIp = RawMaterials.Count + 1,
- RawMaterialWeight = RawmaterialWeight_2,
- RawMaterialBarrelNum = RawMaterialbarrelNum_2,
- RawMaterialLocation = RawMaterialLocation_2
- });
- RawMaterials.Add(new RemoteRecipeRawMaterial()
- {
- DeviceIp = RawMaterials.Count + 1,
- RawMaterialWeight = RawmaterialWeight1_2,
- RawMaterialBarrelNum = RawMaterialbarrelNum1_2,
- RawMaterialLocation = RawMaterialLocation1_2
- });
- RawMaterials.Add(new RemoteRecipeRawMaterial()
- {
- DeviceIp = RawMaterials.Count + 1,
- RawMaterialWeight = RawmaterialWeight2_2,
- RawMaterialBarrelNum = RawMaterialbarrelNum2_2,
- RawMaterialLocation = RawMaterialLocation2_2
- });
-
- Recipes.Add(new Model.RemoteRecipeData()
- {
- RecipeName = recipeName_2,
- RecipeCode = recipeCode_2,
- TrayCode = Traycode_2,
- RawMaterial = RawMaterials
- });
- }
- }
- }
|