|
@@ -233,19 +233,15 @@ public partial class ViewBViewModel : TranslatableViewModelBase
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
/// <summary>
|
|
|
- /// 恢复默认设置
|
|
|
|
|
|
|
+ /// 恢复默认设置(仅恢复 PLC 连接参数)
|
|
|
/// </summary>
|
|
/// </summary>
|
|
|
[RelayCommand]
|
|
[RelayCommand]
|
|
|
private void ResetToDefault()
|
|
private void ResetToDefault()
|
|
|
{
|
|
{
|
|
|
- PlcIp = "192.168.0.150";
|
|
|
|
|
- PlcPort = 5000;
|
|
|
|
|
- AutoConnect = true;
|
|
|
|
|
- LevelHighAlarm = 80f;
|
|
|
|
|
- LevelLowAlarm = 20f;
|
|
|
|
|
- FlowHighAlarm = 100f;
|
|
|
|
|
|
|
+ PlcIp = "192.168.2.100";
|
|
|
|
|
+ PlcPort = 102;
|
|
|
|
|
|
|
|
- Log.Information("已恢复默认设置");
|
|
|
|
|
|
|
+ Log.Information("已恢复默认 PLC 连接参数: IP={PlcIp}, Port={PlcPort}", PlcIp, PlcPort);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public new void Dispose()
|
|
public new void Dispose()
|