using BPASmartClient.Business;
using BPASmartClient.Device;
using BPASmartClient.EventBus;
using BPASmartClient.Helper;
using BPASmartClient.Message;
using BPASmartClient.Model;
using BPASmartClient.Model.乐白机器人;
using BPASmartClient.Model.冰淇淋.Enum;
using BPASmartClient.Model.单片机;
using BPASmartClient.Model.单片机.Enum;
using BPASmartClient.Model.咖啡机.Enum;
using Microsoft.Toolkit.Mvvm.ComponentModel;
using Microsoft.Toolkit.Mvvm.Input;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Threading;
namespace BPASmartClient.MorkTSingle.ViewModel;
public class DebugViewModel : ObservableObject
{
public RelayCommand SimOrderMakeCoffee { get; set; }
///
/// 设备ID
///
public int DeviceId { get; set; }
///
/// 设备数据
///
public ObservableCollection variableMonitors { get; set; }
public List Coffees { get; set; } = new List();
public string SimOrderCoffeeList { get { return _simOrderCoffeeList; } set { _simOrderCoffeeList = value; OnPropertyChanged(); } }
public string _simOrderCoffeeList { get; set; }
public DebugViewModel()
{
foreach (KLMDrinkFaultType code in Enum.GetValues(typeof(KLMDrinkFaultType)))
{
Coffees.Add(code.ToString());
}
SimOrderCoffeeList = Coffees[0];
SimOrderMakeCoffee = new RelayCommand(() =>
{
new MorkTSimOrder() {KLMDrinkFaultCode = (KLMDrinkFaultType)Enum.Parse(typeof(KLMDrinkFaultType), SimOrderCoffeeList) }.Publish();
});
}
}