From f2fad9741c6f60318a6d7a2feaef0378221d9c60 Mon Sep 17 00:00:00 2001 From: Louis Corbet Date: Wed, 17 Apr 2024 17:02:55 +0200 Subject: [PATCH] feat: added count limit for groups in import --- ScadaAdmin/OpenExtensions/ExtImport/Forms/FrmImportFile.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ScadaAdmin/OpenExtensions/ExtImport/Forms/FrmImportFile.cs b/ScadaAdmin/OpenExtensions/ExtImport/Forms/FrmImportFile.cs index 139f00404..fcd9157f5 100644 --- a/ScadaAdmin/OpenExtensions/ExtImport/Forms/FrmImportFile.cs +++ b/ScadaAdmin/OpenExtensions/ExtImport/Forms/FrmImportFile.cs @@ -878,7 +878,7 @@ private DeviceTemplate GenerateDeviceTemplate() currentTagCodeAsNumber = int.Parse(Regex.Replace(newElem.TagCode, @"[^0-9]", "")); } //if these conditions are met, we add the current element group to the template and create a new one - if (previousWasArray || index == 0 || prefix != previousPrefix || newElem.ElemType != previousType || previousTagCodeAsNumber + Math.Ceiling(previousDataLength / 2) != currentTagCodeAsNumber)//(prefix == "%MW" && newElemenGroup.Elems.Count == 125) || (prefix == "%M" && newElemenGroup.Elems.Count == 2000)) + if (previousWasArray || index == 0 || prefix != previousPrefix || newElem.ElemType != previousType || previousTagCodeAsNumber + Math.Ceiling(previousDataLength / 2) != currentTagCodeAsNumber || (prefix == "%MW" && newElemenGroup.Elems.Count == 125) || (prefix == "%M" && newElemenGroup.Elems.Count == 2000)) { if (index > 0) {