using BPASmartClient.Helper;
using FryPot_DosingSystem.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 FryPot_DosingSystem.ViewModel
{
internal class NewRecipeViewModel : ObservableObject
{
///
/// 配方唯一编码,用于编辑配方
///
public string recipeId { get; set; }
///
/// 配料名称
///
private string _recipeName;
public string RecipeName { get { return _recipeName; } set { _recipeName = value; OnPropertyChanged(); } }
public ObservableCollection materials { get; set; } = new ObservableCollection();
public ObservableCollection materialNames { get; set; } = new ObservableCollection() { "肉","葱","蒜"};
public RelayCommand AddRecipe { get; set; }
public RelayCommand RemoveRecipe { get; set; }
public RelayCommand Comfirm { get; set; }
public NewRecipeViewModel()
{
ActionManage.GetInstance.Register(new Action