This commit is contained in:
2025-11-20 15:13:29 +08:00
parent b48e0b79dd
commit 979afae645
28 changed files with 1299 additions and 345 deletions

View File

@@ -23,6 +23,41 @@ namespace FATrace.WPLApp.Services
}
private string _PlcIp;
/// <summary>
/// PLC IP
/// </summary>
public string PlcIp
{
get => _PlcIp;
set { _PlcIp = value; RaisePropertyChanged(); UpdatePlcEndPoint(); }
}
private int _PlcPort;
/// <summary>
/// PLC 端口
/// </summary>
public int PlcPort
{
get => _PlcPort;
set { _PlcPort = value; RaisePropertyChanged(); UpdatePlcEndPoint(); }
}
private string _PlcEndPoint;
/// <summary>
/// PLC 终端显示IP:Port
/// </summary>
public string PlcEndPoint
{
get => _PlcEndPoint;
private set { _PlcEndPoint = value; RaisePropertyChanged(); }
}
private void UpdatePlcEndPoint()
{
PlcEndPoint = string.IsNullOrWhiteSpace(PlcIp) ? string.Empty : $"{PlcIp}:{PlcPort}";
}
private bool _PlcLinkState = false;
/// <summary>
/// PLC连接状态