终端一体化运控平台
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。
 
 
 

52 行
1.8 KiB

  1. using System;
  2. using System.Collections.Generic;
  3. using System.Collections.ObjectModel;
  4. using System.Linq;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7. using System.Windows;
  8. using BPA.Message;
  9. using BPA.Message.Enum;
  10. using BPASmartClient.Device;
  11. using BPA.Helper;
  12. using BPASmartClient.Model;
  13. using BPA.Helper;
  14. using System.Xml.Linq;
  15. using BPASmartClient.Model.煮面机;
  16. using System.Security.RightsManagement;
  17. namespace BPASmartClient.ViewModel
  18. {
  19. public class OrderStatusViewModel : NotifyBase
  20. {
  21. #region 事件
  22. public BPARelayCommand StartOrder { get; set; }
  23. public BPARelayCommand<object> EditOrder { get; set; }
  24. public BPARelayCommand<object> ExitOrder { get; set; }
  25. #endregion
  26. #region 初始化
  27. public OrderStatusViewModel()
  28. {
  29. NoodOrderCtrl.GetInstance.orderStatusAction = s =>
  30. {
  31. LocalOrder = s;
  32. };
  33. StartOrder = new BPARelayCommand(()=> { NoodOrderCtrl.GetInstance.StartOrder(LocalOrder, OrderAmount); });
  34. EditOrder = new BPARelayCommand<object>(NoodOrderCtrl.GetInstance.EditOrder);
  35. ExitOrder = new BPARelayCommand<object>(NoodOrderCtrl.GetInstance.ExitOrder);
  36. }
  37. #endregion
  38. public ObservableCollection<MorkOrder> orderStatusLists { get; set; } = FoodMenuViewModel.orderStatusLists;
  39. public ObservableCollection<FoodMenuModel> FoodMenus { get; set; } = FoodMenuViewModel.FoodMenus;
  40. public FoodMenuModel LocalOrder { get { return _localOrder; } set { _localOrder = value; OnPropertyChanged(); } }
  41. private FoodMenuModel _localOrder = new FoodMenuModel();
  42. public int OrderAmount { get { return _orderAmount; } set { _orderAmount = value; OnPropertyChanged(); } }
  43. private int _orderAmount = 1;
  44. }
  45. }