终端一体化运控平台
Não pode escolher mais do que 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 
 

53 linhas
1.7 KiB

  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using BPA.Helper;
  7. using System.Collections.Concurrent;
  8. using System.Collections.ObjectModel;
  9. using System.Windows;
  10. using BPASmartClient.DosingSystemSingle.View;
  11. namespace BPASmartClient.DosingSystemSingle.ViewModel
  12. {
  13. public class DeviceListViewModel : ViewModelBase
  14. {
  15. public DeviceListViewModel()
  16. {
  17. DetailsCommand = new BPARelayCommand<object>((o) =>
  18. {
  19. if (o != null && o is string str)
  20. {
  21. ChangeDeviceNameView cdn = new ChangeDeviceNameView();
  22. ActionManage.GetInstance.Send("ChangeDeviceNameViewOpen", str);
  23. cdn.ShowDialog();
  24. }
  25. });
  26. devices = DeviceInquire.GetInstance.devices;
  27. }
  28. //public BPARelayCommand<object> ChangeNameCommand { get; set; }
  29. //public static ObservableCollection<Devices> devices { get; set; } = new ObservableCollection<Devices>();
  30. public ObservableCollection<Devices> devices { get; set; }
  31. }
  32. public class Devices : NotifyBase
  33. {
  34. public string IpAddress { get { return _mIpAddress; } set { _mIpAddress = value; OnPropertyChanged(); } }
  35. private string _mIpAddress;
  36. /// <summary>
  37. /// 设备编号
  38. /// </summary>
  39. public int DeviceNum { get { return _mDeviceNum; } set { _mDeviceNum = value; OnPropertyChanged(); } }
  40. private int _mDeviceNum;
  41. public string DeviceName { get { return _mDeviceName; } set { _mDeviceName = value; OnPropertyChanged(); } }
  42. private string _mDeviceName;
  43. }
  44. }