using BPASmartClient.Helper; using BPASmartClient.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.ViewModel { public class FoodMenuViewModel: ObservableObject { public ObservableCollection FoodMenus { get; set; } = GlobalFoodMenu.LocalFoodMenus; public RelayCommand StartOrder { get; set; } public FoodMenuViewModel() { FoodMenus.Add(new FoodMenuModel { GoodKey = "1111", GoodName = "小炒肉" }); FoodMenus.Add(new FoodMenuModel { GoodKey = "222", GoodName = "大炒肉大炒肉大炒肉" }); StartOrder = new RelayCommand((o) => { ActionManage.GetInstance.Send("开始下单", o); }); } } }