Nelze vybrat více než 25 témat
Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.
|
- 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; }
- /// <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 RelayCommand(() =>
- {
- new MorkTSimOrder() {KLMDrinkFaultCode = (KLMDrinkFaultType)Enum.Parse(typeof(KLMDrinkFaultType), SimOrderCoffeeList) }.Publish();
- });
- }
- }
|