This commit is contained in:
@@ -9,6 +9,8 @@ namespace PamhagenSysCtrl.Helpers {
|
||||
private readonly string FileName;
|
||||
|
||||
public string PlcPort = "COM1";
|
||||
public int PlcSensorDelayOpen = 0;
|
||||
public int PlcSensorDelayClose = 0;
|
||||
public string? UpdateUrl;
|
||||
public bool UpdateAuto;
|
||||
|
||||
@@ -24,6 +26,8 @@ namespace PamhagenSysCtrl.Helpers {
|
||||
try {
|
||||
var config = new ConfigurationBuilder().AddIniFile(FileName).Build();
|
||||
PlcPort = config["plc:port"] ?? "COM1";
|
||||
PlcSensorDelayOpen = int.Parse(config["plc:sensor_delay_open"] ?? "0");
|
||||
PlcSensorDelayClose = int.Parse(config["plc:sensor_delay_close"] ?? "0");
|
||||
UpdateUrl = config["update:url"];
|
||||
UpdateAuto = TrueValues.Contains(config["update:auto"]?.ToLower());
|
||||
var xbe24 = config.GetSection("xbe24");
|
||||
|
||||
Reference in New Issue
Block a user