参数配置界面弹窗添加

This commit is contained in:
czj
2026-06-05 13:18:19 +08:00
parent fc53a944dd
commit fdaa2490c4
11 changed files with 896 additions and 4 deletions

View File

@@ -39,6 +39,31 @@ namespace UIShare.UIViewModel
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 TcpConnectionConfig _tcpConfig = new();
public TcpConnectionConfig TcpConfig
{
get => _tcpConfig;
set => SetProperty(ref _tcpConfig, value);
}
/// <summary>串口连接参数(首次访问时自动初始化,便于 XAML 直接绑定)。</summary>
private SerialPortConnectionConfig _serialPortConfig = new();
public SerialPortConnectionConfig SerialPortConfig
{
get => _serialPortConfig;
set => SetProperty(ref _serialPortConfig, value);
}
}
}