终端一体化运控平台
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

43 lines
1.3 KiB

  1. namespace BPASmartClient.MorkCL.ViewModel
  2. {
  3. public class FryPanSelectViewModel : NotifyBase
  4. {
  5. public FryPanSelectViewModel()
  6. {
  7. SelectFryPanCommand = new((object i) =>
  8. {
  9. if (int.TryParse(i.ToString(), out int res))
  10. {
  11. switch (res)
  12. {
  13. case 1:
  14. DeviceType = EDeviceType.炒锅1;
  15. break;
  16. case 2:
  17. DeviceType = EDeviceType.炒锅2;
  18. break;
  19. default:
  20. DeviceType = EDeviceType.无;
  21. break;
  22. }
  23. ActionManage.GetInstance.Send("CloseFryPanSelectView", true);
  24. }
  25. });
  26. CloseCommand = new(() =>
  27. {
  28. ActionManage.GetInstance.Send("CloseFryPanSelectView", false);
  29. });
  30. }
  31. /// <summary>选择命令。</summary>
  32. public BPARelayCommand<object> SelectFryPanCommand { get; set; }
  33. public BPARelayCommand CloseCommand { get; set; }
  34. public static EDeviceType DeviceType { get; set; }
  35. }
  36. }