using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Microsoft.Toolkit.Mvvm.ComponentModel; using System.Collections.ObjectModel; namespace BPASmartClient.ViewModel.Model { /// /// 店铺设备 /// public class DeviceConfigModel : ObservableObject { /// /// 店铺名称 /// public string ShopName { get { return _mShopName; } set { _mShopName = value; OnPropertyChanged(); } } private string _mShopName = string.Empty; /// /// 店铺ID /// public string ShopId { get { return _mShopId; } set { _mShopId = value; OnPropertyChanged(); } } private string _mShopId = string.Empty; /// /// 设备集合 /// public ObservableCollection deviceModels = new ObservableCollection(); } /// /// 启动模块 /// public class DeviceModel : ObservableObject { /// /// 设备名称 /// public string DeviceName { get { return _mDeviceName; } set { _mDeviceName = value; OnPropertyChanged(); } } private string _mDeviceName = string.Empty; /// /// 启动设备模块 /// public string DeviceModule { get { return _mDeviceModule; } set { _mDeviceModule = value; OnPropertyChanged(); } } private string _mDeviceModule = string.Empty; /// /// 设备ID /// public string DeviceId { get { return _mDeviceId; } set { _mDeviceId = value; OnPropertyChanged(); } } private string _mDeviceId = string.Empty; /// /// 通讯模块 /// public ObservableCollection communicationDevcies = new ObservableCollection(); } /// /// 通讯模块 /// public class CommunicationModel : ObservableObject { /// /// 通讯启动模块 /// public string CommunicationModule { get { return _mCommunicationModule; } set { _mCommunicationModule = value; OnPropertyChanged(); } } private string _mCommunicationModule = string.Empty; } /// /// 通讯参数 /// public class CommunicationPar : ObservableObject { public CommunicationParType communicationType { get { return _mcommunicationType; } set { _mcommunicationType = value; OnPropertyChanged(); } } private CommunicationParType _mcommunicationType; public string CommunicationValue { get { return _mCommunicationValue; } set { _mCommunicationValue = value; OnPropertyChanged(); } } private string _mCommunicationValue = string.Empty; } public enum CommunicationParType { /// /// IP地址 /// IPAddress, /// /// 端口号 /// Port, /// /// 串口端口号 /// SerialPort, /// /// 波特率 /// BaudRate, /// /// 数据位 /// DataBits, /// /// 停止位 /// StopBits, /// /// 校验位 /// Parity, } }