Skip to content

Commit

Permalink
feat: added count limit for groups in import
Browse files Browse the repository at this point in the history
  • Loading branch information
LouisCorbet committed Apr 17, 2024
1 parent cd33b96 commit f2fad97
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ScadaAdmin/OpenExtensions/ExtImport/Forms/FrmImportFile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down

0 comments on commit f2fad97

Please sign in to comment.