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

DeviceConfigModel.cs 6.4 KiB

2 jaren geleden
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181
  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.ObjectModel;
  8. //using Microsoft.Toolkit.Mvvm.Input;
  9. //using System.Windows;
  10. //namespace BPASmartClient.ViewModel.Model
  11. //{
  12. // /// <summary>
  13. // /// 店铺设备
  14. // /// </summary>
  15. // public class DeviceConfigModel : ObservableObject
  16. // {
  17. // /// <summary>
  18. // /// 店铺名称
  19. // /// </summary>
  20. // public string ShopName { get { return _mShopName; } set { _mShopName = value; OnPropertyChanged(); } }
  21. // private string _mShopName = string.Empty;
  22. // /// <summary>
  23. // /// 店铺ID
  24. // /// </summary>
  25. // public string ShopId { get { return _mShopId; } set { _mShopId = value; OnPropertyChanged(); } }
  26. // private string _mShopId = string.Empty;
  27. // /// <summary>
  28. // /// 设备集合
  29. // /// </summary>
  30. // public ObservableCollection<DeviceModel> deviceModels { get; set; } = new ObservableCollection<DeviceModel>();
  31. // }
  32. // /// <summary>
  33. // /// 启动模块
  34. // /// </summary>
  35. // public class DeviceModel : ObservableObject
  36. // {
  37. // /// <summary>
  38. // /// 设备名称
  39. // /// </summary>
  40. // public string DeviceName { get { return _mDeviceName; } set { _mDeviceName = value; OnPropertyChanged(); } }
  41. // private string _mDeviceName = string.Empty;
  42. // /// <summary>
  43. // /// 启动设备模块
  44. // /// </summary>
  45. // public string DeviceModule { get { return _mDeviceModule; } set { _mDeviceModule = value; OnPropertyChanged(); } }
  46. // private string _mDeviceModule = string.Empty;
  47. // public string DeviceNamespace { get; set; }
  48. // public string Id { get { return _mId; } set { _mId = value; OnPropertyChanged(); } }
  49. // private string _mId = string.Empty;
  50. // /// <summary>
  51. // /// 设备ID
  52. // /// </summary>
  53. // public string DeviceId { get { return _mDeviceId; } set { _mDeviceId = value; OnPropertyChanged(); } }
  54. // private string _mDeviceId = string.Empty;
  55. // /// <summary>
  56. // /// 通讯模块
  57. // /// </summary>
  58. // public ObservableCollection<CommunicationModel> communicationDevcies { get; set; } = new ObservableCollection<CommunicationModel>();
  59. // }
  60. // /// <summary>
  61. // /// 通讯模块
  62. // /// </summary>
  63. // public class CommunicationModel : ObservableObject
  64. // {
  65. // /// <summary>
  66. // /// 通讯启动模块
  67. // /// </summary>
  68. // public string CommunicationModule { get { return _mCommunicationModule; } set { _mCommunicationModule = value; OnPropertyChanged(); } }
  69. // private string _mCommunicationModule = string.Empty;
  70. // public string CommunicationNamespace { get; set; }
  71. // public string CommunicationName { get { return _mCommunicationName; } set { _mCommunicationName = value; OnPropertyChanged(); } }
  72. // private string _mCommunicationName = string.Empty;
  73. // public string DeviceModelId { get { return _mDeviceModelId; } set { _mDeviceModelId = value; OnPropertyChanged(); } }
  74. // private string _mDeviceModelId = string.Empty;
  75. // public CommunicationPar communicationPar { get { return _mcommunicationPar; } set { _mcommunicationPar = value; OnPropertyChanged(); } }
  76. // private CommunicationPar _mcommunicationPar = new CommunicationPar();
  77. // }
  78. // /// <summary>
  79. // /// 通讯参数
  80. // /// </summary>
  81. // public class CommunicationPar : ObservableObject
  82. // {
  83. // /// <summary>
  84. // /// 选择网口通讯
  85. // /// </summary>
  86. // public bool IsNetworkPort { get { return _mIsNetworkPort; } set { _mIsNetworkPort = value; OnPropertyChanged(); } }
  87. // private bool _mIsNetworkPort = false;
  88. // /// <summary>
  89. // /// 选择串口通讯
  90. // /// </summary>
  91. // public bool IsSerialPort { get { return _mIsSerialPort; } set { _mIsSerialPort = value; OnPropertyChanged(); } }
  92. // private bool _mIsSerialPort = true;
  93. // /// <summary>
  94. // /// IP地址
  95. // /// </summary>
  96. // public string IPAddress { get { return _mIPAddress; } set { _mIPAddress = value; OnPropertyChanged(); } }
  97. // private string _mIPAddress;
  98. // /// <summary>
  99. // /// IP 端口号
  100. // /// </summary>
  101. // public int IPPort { get { return _mIPPort; } set { _mIPPort = value; OnPropertyChanged(); } }
  102. // private int _mIPPort;
  103. // /// <summary>
  104. // /// ip 串口 站号
  105. // /// </summary>
  106. // public int StationNo { get { return _mStationNo; } set { _mStationNo = value; OnPropertyChanged(); } }
  107. // private int _mStationNo;
  108. // /// <summary>
  109. // /// 串口单口号
  110. // /// </summary>
  111. // public string SerialPort { get { return _mSerialPort; } set { _mSerialPort = value; OnPropertyChanged(); } }
  112. // private string _mSerialPort;
  113. // /// <summary>
  114. // /// 波特率
  115. // /// </summary>
  116. // public int BaudRate { get { return _mBaudRate; } set { _mBaudRate = value; OnPropertyChanged(); } }
  117. // private int _mBaudRate;
  118. // /// <summary>
  119. // /// 数据位
  120. // /// </summary>
  121. // public int DataBits { get { return _mDataBits; } set { _mDataBits = value; OnPropertyChanged(); } }
  122. // private int _mDataBits = 8;
  123. // /// <summary>
  124. // /// 停止位
  125. // /// </summary>
  126. // public string StopBits { get { return _mStopBits; } set { _mStopBits = value; OnPropertyChanged(); } }
  127. // private string _mStopBits = "1";
  128. // /// <summary>
  129. // /// 校验位
  130. // /// </summary>
  131. // public string Parity { get { return _mParity; } set { _mParity = value; OnPropertyChanged(); } }
  132. // private string _mParity;
  133. // public ObservableCollection<Variable> variables { get; set; } = new ObservableCollection<Variable>();
  134. // }
  135. // public class Variable : ObservableObject
  136. // {
  137. // public int Id { get { return _mId; } set { _mId = value; OnPropertyChanged(); } }
  138. // private int _mId;
  139. // public string Address { get { return _mAddress; } set { _mAddress = value; OnPropertyChanged(); } }
  140. // private string _mAddress;
  141. // public int ReadLeng { get { return _mReadLeng; } set { _mReadLeng = value; OnPropertyChanged(); } }
  142. // private int _mReadLeng;
  143. // }
  144. //}