优化设置界面Tcp显示
This commit is contained in:
@@ -8,14 +8,14 @@ using UIShare.ViewModelBase;
|
||||
namespace SettingModule.ViewModels.Dialogs
|
||||
{
|
||||
/// <summary>
|
||||
/// TCP 连接配置对话框 VM。
|
||||
/// Tcp 连接配置对话框 VM。
|
||||
/// 通过 DialogParameters 接收宿主 DeviceInfoVM;保存时把副本写回宿主。
|
||||
/// </summary>
|
||||
public class TCPConfigViewModel : DialogViewModelBase
|
||||
{
|
||||
#region 属性
|
||||
|
||||
private string _title = "TCP 连接配置";
|
||||
private string _title = "Tcp 连接配置";
|
||||
public string Title
|
||||
{
|
||||
get => _title;
|
||||
@@ -105,7 +105,7 @@ namespace SettingModule.ViewModels.Dialogs
|
||||
{
|
||||
_hostDevice.TcpConfig ??= new TcpConfigVM();
|
||||
Config.CopyTo(_hostDevice.TcpConfig);
|
||||
_hostDevice.ConnectionType = "TCP";
|
||||
_hostDevice.ConnectionType = "Tcp";
|
||||
}
|
||||
|
||||
RequestClose.Invoke(ButtonResult.OK);
|
||||
@@ -121,7 +121,7 @@ namespace SettingModule.ViewModels.Dialogs
|
||||
if (parameters.ContainsKey("Device"))
|
||||
{
|
||||
_hostDevice = parameters.GetValue<DeviceInfoVM>("Device");
|
||||
Title = $"TCP 连接配置 - {_hostDevice?.DeviceName}";
|
||||
Title = $"Tcp 连接配置 - {_hostDevice?.DeviceName}";
|
||||
Config = new TcpConfigVM(_hostDevice?.TcpConfig);
|
||||
}
|
||||
else if (parameters.ContainsKey("Config"))
|
||||
|
||||
@@ -145,7 +145,7 @@ namespace SettingModule.ViewModels
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 打开"连接配置"对话框。按 SelectedDevice.ConnectionType 决定开 TCP 还是串口对话框。
|
||||
/// 打开"连接配置"对话框。按 SelectedDevice.ConnectionType 决定开 Tcp 还是串口对话框。
|
||||
/// </summary>
|
||||
private void OnOpenConnectionConfig()
|
||||
{
|
||||
@@ -164,7 +164,7 @@ namespace SettingModule.ViewModels
|
||||
|
||||
if (string.IsNullOrEmpty(dialogName))
|
||||
{
|
||||
StatusMessage = "当前设备未配置连接方式(请先选择 TCP 或 Serial)";
|
||||
StatusMessage = "当前设备未配置连接方式(请先选择 Tcp 或 Serial)";
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user