终端一体化运控平台
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 

37 行
1.0 KiB

  1. using BPASmartClient.Helper;
  2. using BPASmartClient.Model;
  3. using BPASmartClient.Model.小炒机;
  4. using Microsoft.Toolkit.Mvvm.ComponentModel;
  5. using Microsoft.Toolkit.Mvvm.Input;
  6. using System;
  7. using System.Collections.Generic;
  8. using System.Collections.ObjectModel;
  9. using System.Linq;
  10. using System.Text;
  11. using System.Threading.Tasks;
  12. namespace BPASmartClient.ViewModel
  13. {
  14. public class FoodMenuViewModel: ObservableObject
  15. {
  16. /// <summary>
  17. /// 菜单
  18. /// </summary>
  19. public ObservableCollection<FoodMenuModel> FoodMenus { get; set; } = new ObservableCollection<FoodMenuModel>();
  20. public RelayCommand<object> StartOrder { get; set; }
  21. public FoodMenuViewModel()
  22. {
  23. Json<MaterialAndFryingTime>.Data.materials?.Keys?.ToList().ForEach(key => FoodMenus.Add(new FoodMenuModel { GoodName = key }));
  24. StartOrder = new RelayCommand<object>((o) =>
  25. {
  26. ActionManage.GetInstance.Send("开始下单", o);
  27. });
  28. }
  29. }
  30. }