终端一体化运控平台
No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.
 
 
 

46 líneas
1.4 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.JXJFoodSmallStation.View;
  13. namespace BPASmartClient.JXJFoodSmallStation.ViewModel
  14. {
  15. public class DeviceListViewModel : ObservableObject
  16. {
  17. public DeviceListViewModel()
  18. {
  19. ChangeNameCommand = 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. }
  29. public RelayCommand<object> ChangeNameCommand { get; set; }
  30. public static ObservableCollection<Devices> devices { get; set; } = new ObservableCollection<Devices>();
  31. }
  32. public class Devices : ObservableObject
  33. {
  34. public string IpAddress { get { return _mIpAddress; } set { _mIpAddress = value; OnPropertyChanged(); } }
  35. private string _mIpAddress;
  36. public string DeviceName { get { return _mDeviceName; } set { _mDeviceName = value; OnPropertyChanged(); } }
  37. private string _mDeviceName;
  38. }
  39. }