终端一体化运控平台
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.
 
 
 

48 rindas
1.6 KiB

  1. using BPASmartClient.Business;
  2. using BPASmartClient.Device;
  3. using BPA.Helper;
  4. using BPASmartClient.Model;
  5. using BPASmartClient.Model.乐白机器人;
  6. using BPASmartClient.Model.冰淇淋.Enum;
  7. using BPASmartClient.Model.单片机;
  8. using BPASmartClient.Model.单片机.Enum;
  9. using BPASmartClient.Model.咖啡机.Enum;
  10. using BPA.Helper;
  11. using System;
  12. using System.Collections.Generic;
  13. using System.Collections.ObjectModel;
  14. using System.Linq;
  15. using System.Threading;
  16. namespace BPASmartClient.MorkTSingle.ViewModel;
  17. public class DebugViewModel : NotifyBase
  18. {
  19. public BPARelayCommand SimOrderMakeCoffee { get; set; }
  20. /// <summary>
  21. /// 设备ID
  22. /// </summary>
  23. public int DeviceId { get; set; }
  24. /// <summary>
  25. /// 设备数据
  26. /// </summary>
  27. public ObservableCollection<VariableMonitor> variableMonitors { get; set; }
  28. public List<string> Coffees { get; set; } = new List<string>();
  29. public string SimOrderCoffeeList { get { return _simOrderCoffeeList; } set { _simOrderCoffeeList = value; OnPropertyChanged(); } }
  30. public string _simOrderCoffeeList { get; set; }
  31. public DebugViewModel()
  32. {
  33. foreach (KLMDrinkFaultType code in Enum.GetValues(typeof(KLMDrinkFaultType)))
  34. {
  35. Coffees.Add(code.ToString());
  36. }
  37. SimOrderCoffeeList = Coffees[0];
  38. SimOrderMakeCoffee = new BPARelayCommand(() =>
  39. {
  40. new MorkTSimOrder() {KLMDrinkFaultCode = (KLMDrinkFaultType)Enum.Parse(typeof(KLMDrinkFaultType), SimOrderCoffeeList) }.Publish();
  41. });
  42. }
  43. }