From fd1c1a3eb41bf3a240a47d7c4298a8f8710068d7 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Fri, 20 May 2022 11:04:22 +0200 Subject: [PATCH] fix check 0 sel --- EgwProxy.Icoel.Test/Program.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/EgwProxy.Icoel.Test/Program.cs b/EgwProxy.Icoel.Test/Program.cs index 37a47c6d..5f2165a1 100644 --- a/EgwProxy.Icoel.Test/Program.cs +++ b/EgwProxy.Icoel.Test/Program.cs @@ -77,7 +77,7 @@ namespace EgwProxy.Icoel.Test } /// - /// Mostra elenco variety e quanod utente seleziona --> restituisce varGuid + /// Mostra elenco variety e quanod utente seleziona restituisce varGuid /// /// internal static Guid selLayout(Connector IcoelSizer, Guid varGuid) @@ -102,7 +102,7 @@ namespace EgwProxy.Icoel.Test { int.TryParse(rawData, out idxLay); // verifico sia valida.. - if (layoutList.Length >= idxLay) + if (layoutList.Length >= idxLay && idxLay > 0) { layGuid = layoutList[idxLay - 1].Id; } @@ -116,7 +116,7 @@ namespace EgwProxy.Icoel.Test } /// - /// Mostra elenco variety e quanod utente seleziona --> restituisce varGuid + /// Mostra elenco variety e quanod utente seleziona restituisce varGuid /// /// internal static Guid selVariety(Connector IcoelSizer) @@ -139,7 +139,7 @@ namespace EgwProxy.Icoel.Test { int.TryParse(rawData, out idxVar); // verifico sia valida.. - if (varList.Length >= idxVar) + if (varList.Length >= idxVar && idxVar > 0) { varGuid = varList[idxVar - 1].Id; }