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

43 行
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. }