From c3f51afb2d71ca666eeb00bc755595a061e13448 Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Thu, 18 Jan 2018 09:52:20 +0100 Subject: [PATCH] =?UTF-8?q?fix=20indice=20assi=20x=20nome/path=20+=20possi?= =?UTF-8?q?bilit=C3=A0=20saltare=20lettura=20da=20app.config?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- MTC_Adapter/MTC_Adapter/AdapterOsai.cs | 26 ++++++++++++++++---------- MTC_Adapter/MTC_Adapter/App.config | 2 ++ 2 files changed, 18 insertions(+), 10 deletions(-) diff --git a/MTC_Adapter/MTC_Adapter/AdapterOsai.cs b/MTC_Adapter/MTC_Adapter/AdapterOsai.cs index 29aba7e..dcb9a3a 100644 --- a/MTC_Adapter/MTC_Adapter/AdapterOsai.cs +++ b/MTC_Adapter/MTC_Adapter/AdapterOsai.cs @@ -1040,18 +1040,24 @@ namespace MTC_Adapter { // salvo!!! come path#nome axisDict.Add(string.Format("{0}#{1}", i, axisTable[j]), currId); - // solo se HO UN NOME valido x asse... - if (axisTable[j] != null && axisTable[j] != '-' && axisTable[j] != '\0') - try + // se conf di leggere nome/path asse.. + if (utils.CRB("enableAxNamePath")) + { + // solo se HO UN NOME valido x asse... + if (axisTable[j] != null && axisTable[j] != '-' && axisTable[j] != '\0') { - // salvo (per ID) descr asse e processo corrente! - vettAxis[currId].mAxDescr.Value = axisTable[j]; - vettAxis[currId].mAxMainProc.Value = i; - } - catch (Exception exc) - { - lg.Error(exc, string.Format("Eccezione in salvataggio nome/path asse num {0}", currId)); + try + { + // salvo (per ID) descr asse e processo corrente! + vettAxis[currId - 1].mAxDescr.Value = axisTable[j]; + vettAxis[currId - 1].mAxMainProc.Value = i; + } + catch (Exception exc) + { + lg.Error(exc, string.Format("Eccezione in salvataggio nome/path asse num {0}", currId)); + } } + } } } } diff --git a/MTC_Adapter/MTC_Adapter/App.config b/MTC_Adapter/MTC_Adapter/App.config index 8dd1570..01d7244 100644 --- a/MTC_Adapter/MTC_Adapter/App.config +++ b/MTC_Adapter/MTC_Adapter/App.config @@ -21,6 +21,8 @@ + +