From a1926bc4f1bf115c562952f3497c64c53452fa36 Mon Sep 17 00:00:00 2001 From: "zaccaria.majid" Date: Thu, 27 Jul 2023 08:39:28 +0200 Subject: [PATCH] aggiunto calcolo di se stesso condizionale --- SMGen/Pages/SMEvent2State.razor.cs | 6 +++++- SMGen/appsettings.json | 5 ++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/SMGen/Pages/SMEvent2State.razor.cs b/SMGen/Pages/SMEvent2State.razor.cs index db810e9..3c3ccff 100644 --- a/SMGen/Pages/SMEvent2State.razor.cs +++ b/SMGen/Pages/SMEvent2State.razor.cs @@ -48,6 +48,10 @@ namespace SMGen.Pages { get => conf.GetValue("ServerConf:ProcCsvRootPath"); } + protected bool calcItself + { + get => conf.GetValue("SetupOptions:DoCalcItself"); + } protected List Rules { get; set; } = new List(); protected Dictionary States { get; set; } = new Dictionary(); @@ -196,7 +200,7 @@ namespace SMGen.Pages { sz_line = ""; //eseguo solo se diverso dallo stato corrente - if (nextState != int.Parse(item.Value)) + if (nextState != int.Parse(item.Value) || calcItself) { if (nextState < 0) { diff --git a/SMGen/appsettings.json b/SMGen/appsettings.json index dd07529..80cb620 100644 --- a/SMGen/appsettings.json +++ b/SMGen/appsettings.json @@ -13,5 +13,8 @@ "ProcCsvRootPath": "Temp\\Rules\\PROCESSED", "DisableSMGMigrate": true }, - "AllowedHosts": "*" + "AllowedHosts": "*", + "SetupOptions": { + "DoCalcItself": false + } }