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.
 
 

43 lines
1.3 KiB

  1. using Microsoft.Toolkit.Mvvm.ComponentModel;
  2. using Microsoft.Toolkit.Mvvm.Input;
  3. using System;
  4. using System.Collections.Generic;
  5. using System.Linq;
  6. using System.Text;
  7. using System.Threading.Tasks;
  8. using HBLConsole.Interface;
  9. using Newtonsoft.Json;
  10. namespace HBLConsole.Model
  11. {
  12. public class CommunicationSet : ObservableObject
  13. {
  14. /// <summary>
  15. /// 使用特性对接口反序列化
  16. /// </summary>
  17. [JsonProperty(TypeNameHandling = TypeNameHandling.Auto)]
  18. public IDeviceType Device { get { return _mDevice; } set { _mDevice = value; OnPropertyChanged(); } }
  19. private IDeviceType _mDevice;
  20. /// <summary>
  21. /// 是否激活
  22. /// </summary>
  23. public bool IsActive { get { return _mIsActive; } set { _mIsActive = value; OnPropertyChanged(); } }
  24. private bool _mIsActive = true;
  25. /// <summary>
  26. /// 新增设备名称
  27. /// </summary>
  28. public string DeviceName { get { return _mDeviceName; } set { _mDeviceName = value; OnPropertyChanged(); } }
  29. private string _mDeviceName;
  30. /// <summary>
  31. /// 设备类型
  32. /// </summary>
  33. public EDeviceType deviceType { get { return _mdeviceType; } set { _mdeviceType = value; OnPropertyChanged(); } }
  34. private EDeviceType _mdeviceType;
  35. }
  36. }