|
- using BPASmartClient.Helper;
- using BPASmartClient.JXJFoodSmallStation.Model.Siemens;
- using System;
- using System.Collections.Generic;
- using System.Collections.ObjectModel;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
-
- namespace BPASmartClient.JXJFoodSmallStation.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;
-
- double RawmaterialWeight = 10;
- short RawMaterialbarrelNum = 1;
- int RawMaterialLocation = 5;
-
- double RawmaterialWeight1 = 20;
- short RawMaterialbarrelNum1 = 2;
- int RawMaterialLocation1 = 7;
-
- double 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;
-
- double RawmaterialWeight_2 = 10;
- short RawMaterialbarrelNum_2 = 1;
- int RawMaterialLocation_2 = 5;
-
- double RawmaterialWeight1_2 = 20;
- short RawMaterialbarrelNum1_2 = 2;
- int RawMaterialLocation1_2 = 7;
-
- double 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
- });
- }
- }
- }
|