Nevar pievienot vairāk kā 25 tēmas
Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
|
- 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; }
- /// <summary>
- /// 设备ID
- /// </summary>
- public int DeviceId { get; set; }
- /// <summary>
- /// 设备数据
- /// </summary>
- public ObservableCollection<VariableMonitor> variableMonitors { get; set; }
- public List<string> Coffees { get; set; } = new List<string>();
- 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();
- });
- }
- }
|