automapper框架优化
This commit is contained in:
69
UIShare/UIViewModel/DeviceInfoVM.cs
Normal file
69
UIShare/UIViewModel/DeviceInfoVM.cs
Normal file
@@ -0,0 +1,69 @@
|
||||
|
||||
|
||||
namespace UIShare.UIViewModel
|
||||
{
|
||||
public class DeviceInfoVM : BindableBase
|
||||
{
|
||||
private string _deviceName;
|
||||
public string DeviceName
|
||||
{
|
||||
get => _deviceName;
|
||||
set => SetProperty(ref _deviceName, value);
|
||||
}
|
||||
|
||||
private string _deviceType;
|
||||
public string DeviceType
|
||||
{
|
||||
get => _deviceType;
|
||||
set => SetProperty(ref _deviceType, value);
|
||||
}
|
||||
|
||||
private string _remark;
|
||||
public string Remark
|
||||
{
|
||||
get => _remark;
|
||||
set => SetProperty(ref _remark, value);
|
||||
}
|
||||
|
||||
private bool _isEnabled;
|
||||
public bool IsEnabled
|
||||
{
|
||||
get => _isEnabled;
|
||||
set => SetProperty(ref _isEnabled, value);
|
||||
}
|
||||
|
||||
private bool _isConnected;
|
||||
public bool IsConnected
|
||||
{
|
||||
get => _isConnected;
|
||||
set => SetProperty(ref _isConnected, value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 连接方式:"None" / "TCP" / "Serial"。
|
||||
/// 用于决定 SettingView 上"配置..."按钮打开哪一个对话框。
|
||||
/// </summary>
|
||||
private string _connectionType = "None";
|
||||
public string ConnectionType
|
||||
{
|
||||
get => _connectionType;
|
||||
set => SetProperty(ref _connectionType, value);
|
||||
}
|
||||
|
||||
/// <summary>TCP 连接参数(首次访问时自动初始化,便于 XAML 直接绑定)。</summary>
|
||||
private TcpConfigVM _tcpConfig = new();
|
||||
public TcpConfigVM TcpConfig
|
||||
{
|
||||
get => _tcpConfig;
|
||||
set => SetProperty(ref _tcpConfig, value);
|
||||
}
|
||||
|
||||
/// <summary>串口连接参数(首次访问时自动初始化,便于 XAML 直接绑定)。</summary>
|
||||
private SerialPortConfigVM _serialPortConfig = new();
|
||||
public SerialPortConfigVM SerialPortConfig
|
||||
{
|
||||
get => _serialPortConfig;
|
||||
set => SetProperty(ref _serialPortConfig, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user