初版
This commit is contained in:
@@ -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连接状态
|
||||
|
||||
Reference in New Issue
Block a user