|
- namespace BPASmartClient.MorkCL.ViewModel
- {
- public class FryPanSelectViewModel : NotifyBase
- {
- public FryPanSelectViewModel()
- {
- SelectFryPanCommand = new((object i) =>
- {
- if (int.TryParse(i.ToString(), out int res))
- {
- switch (res)
- {
- case 1:
- DeviceType = EDeviceType.炒锅1;
- break;
-
- case 2:
- DeviceType = EDeviceType.炒锅2;
- break;
-
- default:
- DeviceType = EDeviceType.无;
- break;
- }
-
- ActionManage.GetInstance.Send("CloseFryPanSelectView", true);
- }
- });
-
- CloseCommand = new(() =>
- {
- ActionManage.GetInstance.Send("CloseFryPanSelectView", false);
- });
- }
-
- /// <summary>选择命令。</summary>
- public BPARelayCommand<object> SelectFryPanCommand { get; set; }
-
- public BPARelayCommand CloseCommand { get; set; }
-
- public static EDeviceType DeviceType { get; set; }
- }
- }
|