using BPASmartClient.Business;
using BPASmartClient.Device;
using BPA.Helper;
using BPASmartClient.Model;
using BPASmartClient.Model.乐白机器人;
using BPASmartClient.Model.冰淇淋.Enum;
using BPASmartClient.Model.单片机;
using BPASmartClient.Model.单片机.Enum;
using BPASmartClient.Model.咖啡机.Enum;
using BPA.Helper;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Threading;
namespace BPASmartClient.MorkTSingle.ViewModel;
public class DebugViewModel : NotifyBase
{
public BPARelayCommand 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 BPARelayCommand(() =>
{
new MorkTSimOrder() {KLMDrinkFaultCode = (KLMDrinkFaultType)Enum.Parse(typeof(KLMDrinkFaultType), SimOrderCoffeeList) }.Publish();
});
}
}