|
123456789101112131415161718192021222324252627282930313233343536373839404142 |
- using BPASmartClient.Helper;
- using BPASmartClient.JXJFoodBigStation.Model.Siemens;
- using System;
- using System.Collections.Generic;
- using System.Collections.ObjectModel;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
-
- namespace BPASmartClient.JXJFoodBigStation.Model
- {
- public class TestData
- {
- public volatile static TestData Instance;
- public static TestData GetInstance => Instance ?? (Instance = new TestData());
- public ObservableCollection<RecipeData> Recipes { get; set; } = new ObservableCollection<RecipeData>();
- public ObservableCollection<RawMaterial> RawMaterials { get; set; } = new ObservableCollection<RawMaterial>();
- public TestData()
- {
- for (int i = 0; i < 5; i++)
- {
- for (int j = 0; j < 10; i++)
- {
- RawMaterials.Add(new RawMaterial()
- {
- DeviceIp = RawMaterials.Count + 1,
- RawMaterialWeight = new Random().Next(),
- RawMaterialBarrelNum = j,
- RawMaterialLocation = j
- });
- }
- Recipes.Add(new Model.RecipeData()
- {
- RecipeName = "配方" + i,
- RecipeCode = new Random().Next(1000,9999) + "",
- TrayCode = new Random().Next(1,3),
- RawMaterial = RawMaterials
- });
- }
- }
- }
- }
|