终端一体化运控平台
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

49 regels
1.6 KiB

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