using System; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows; using BPA.Message; using BPA.Message.Enum; using BPASmartClient.Device; using BPA.Helper; using BPASmartClient.Model; using BPA.Helper; using System.Xml.Linq; using BPASmartClient.Model.煮面机; using System.Security.RightsManagement; namespace BPASmartClient.ViewModel { public class OrderStatusViewModel : NotifyBase { #region 事件 public BPARelayCommand StartOrder { get; set; } public BPARelayCommand EditOrder { get; set; } public BPARelayCommand ExitOrder { get; set; } #endregion #region 初始化 public OrderStatusViewModel() { NoodOrderCtrl.GetInstance.orderStatusAction = s => { LocalOrder = s; }; StartOrder = new BPARelayCommand(()=> { NoodOrderCtrl.GetInstance.StartOrder(LocalOrder, OrderAmount); }); EditOrder = new BPARelayCommand(NoodOrderCtrl.GetInstance.EditOrder); ExitOrder = new BPARelayCommand(NoodOrderCtrl.GetInstance.ExitOrder); } #endregion public ObservableCollection orderStatusLists { get; set; } = FoodMenuViewModel.orderStatusLists; public ObservableCollection FoodMenus { get; set; } = FoodMenuViewModel.FoodMenus; public FoodMenuModel LocalOrder { get { return _localOrder; } set { _localOrder = value; OnPropertyChanged(); } } private FoodMenuModel _localOrder = new FoodMenuModel(); public int OrderAmount { get { return _orderAmount; } set { _orderAmount = value; OnPropertyChanged(); } } private int _orderAmount = 1; } }