Du kan inte välja fler än 25 ämnen
Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.
|
- using BPASmartClient.Helper;
- using BPASmartClient.JXJFoodBigStation.Model;
- using Microsoft.Toolkit.Mvvm.ComponentModel;
- using Microsoft.Toolkit.Mvvm.Input;
- using System;
- using System.Collections.Generic;
- using System.Collections.ObjectModel;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
-
- namespace BPASmartClient.JXJFoodBigStation.ViewModel
- {
- internal class RecipeSendDownViewModel:ObservableObject
- {
-
- public ObservableCollection<RecipeData> Recipes { get; set; } = Json<LocalRecipe>.Data.Recipes;
- /// <summary>
- /// 当前正在制作的配方
- /// </summary>
- public static ObservableCollection<RawMaterial> recipeProcesses { get; set; } = new ObservableCollection<RawMaterial>();
- /// <summary>
- /// 等待制作的配方
- /// </summary>
- public static ObservableCollection<RecipeData> UserTreeWait { get; set; } = new ObservableCollection<RecipeData>();
- /// <summary>
- /// 已完成的配方
- /// </summary>
- public static ObservableCollection<RecipeData> UserTreeCompelete { get; set; } = new ObservableCollection<RecipeData>();
-
- public RelayCommand<string> StartCommand { get; set; }
-
- public RecipeSendDownViewModel()
- {
- StartCommand = new RelayCommand<string>((recipeName) => {
- if (recipeName != null)
- {
- //配方下发逻辑
- var res = Recipes.FirstOrDefault(p => p.RecipeName == recipeName);
- if (res != null)
- ActionManage.GetInstance.Send("手动下发本地配方", res);
- }
- });
- }
- }
- }
|