From dfb528ff2ba123f6e94b212ab4a23a577e9ef64c Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Mon, 24 Feb 2025 19:10:25 +0100 Subject: [PATCH] Continua pesante riorganizzazione con da legacy a nuova versione tree --- IOB-UT-NEXT/Config/Base/CmdUriDto.cs | 8 +- IOB-UT-NEXT/Config/Base/IobDto.cs | 2 +- IOB-UT-NEXT/Config/Base/ServerMapoDto.cs | 19 +-- IOB-UT-NEXT/Config/IobConfTree.cs | 16 +++ IOB-WIN-FORM/AdapterForm.cs | 45 ++++-- IOB-WIN-FORM/Iob/Generic.cs | 170 +++++++++++++---------- IOB-WIN-SHELLY/AdapterFormNext.cs | 28 ++-- 7 files changed, 166 insertions(+), 122 deletions(-) diff --git a/IOB-UT-NEXT/Config/Base/CmdUriDto.cs b/IOB-UT-NEXT/Config/Base/CmdUriDto.cs index 86b18166..a27d96ad 100644 --- a/IOB-UT-NEXT/Config/Base/CmdUriDto.cs +++ b/IOB-UT-NEXT/Config/Base/CmdUriDto.cs @@ -59,11 +59,11 @@ namespace IOB_UT_NEXT.Config.Base CurrSetup = new Dictionary(); CurrSetup.Add("alive", "IOB"); //CurrSetup.Add("Base", "IOB/input/"); - CurrSetup.Add("BaseJson", "IOB/evListJson/"); - CurrSetup.Add("RawTransfJson", "IOB/rawTransfJson/"); + //CurrSetup.Add("BaseJson", "IOB/evListJson/"); + //CurrSetup.Add("RawTransfJson", "IOB/rawTransfJson/"); //CurrSetup.Add("Enabled", "IOB/enabled/"); //CurrSetup.Add("Flog", "IOB/flog/"); - CurrSetup.Add("FlogJson", "IOB/flogJson/"); + //CurrSetup.Add("FlogJson", "IOB/flogJson/"); //CurrSetup.Add("fixDailyDossier", "IOB/fixDailyDossier/"); //CurrSetup.Add("fixDailyOdl", "IOB/fixDailyOdl/"); //CurrSetup.Add("fixDailyOdlConfPzCount", "IOB/fixDailyOdlConfPzCount/"); @@ -72,7 +72,7 @@ namespace IOB_UT_NEXT.Config.Base //CurrSetup.Add("getPOdlAct", "IOB/getPOdlAct/"); //CurrSetup.Add("IdleTime", "IOB/getIdlePeriod/"); //CurrSetup.Add("OdlStarted", "IOB/getCurrOdlStart/"); - CurrSetup.Add("Reboot", "IOB/sendReboot.aspx?idxMacchina="); + //CurrSetup.Add("Reboot", "IOB/sendReboot.aspx?idxMacchina="); //CurrSetup.Add("savePzCountInc", "IOB/savePzCountInc/"); //CurrSetup.Add("savePzCountIncAtDate", "IOB/savePzCountIncAtDate/"); // riordino diff --git a/IOB-UT-NEXT/Config/Base/IobDto.cs b/IOB-UT-NEXT/Config/Base/IobDto.cs index 6d6659ef..0bcce5c9 100644 --- a/IOB-UT-NEXT/Config/Base/IobDto.cs +++ b/IOB-UT-NEXT/Config/Base/IobDto.cs @@ -8,7 +8,7 @@ using System.Threading.Tasks; namespace IOB_UT_NEXT.Config.Base { /// - /// Info specifice all'IOB + /// Info specifiche all'IOB /// public class IobDto { diff --git a/IOB-UT-NEXT/Config/Base/ServerMapoDto.cs b/IOB-UT-NEXT/Config/Base/ServerMapoDto.cs index 76877061..2ae5476c 100644 --- a/IOB-UT-NEXT/Config/Base/ServerMapoDto.cs +++ b/IOB-UT-NEXT/Config/Base/ServerMapoDto.cs @@ -37,20 +37,9 @@ namespace IOB_UT_NEXT.Config.Base { answ = $"{BaseAppUrl}{Commands[CmdReq]}"; } + // elimino doppie barre + answ = answ.Replace("//", "/"); return answ; -#if false - string answ = BaseAppUrl; - if (Commands.ContainsKey(CmdReq)) - { - answ = $"{BaseAppUrl}{Commands[CmdReq]}"; - } - // altrimenti prendo cmd base IOB e compongo... - else - { - answ = $"{BaseAppUrl}/IOB/{CmdReq}"; - } - return answ; -#endif } /// @@ -59,9 +48,9 @@ namespace IOB_UT_NEXT.Config.Base public Dictionary Commands { get; set; } = new CmdUriDto("IOB").StdCommands(); /// - /// Installazione di riferimento + /// Directory Installazione di riferimento x applicativi MAN/IOB sotto la radice C:\ /// - public string ClientInstall { get; set; } = "SW"; + public string ClientInstall { get; set; } = "SteamWare"; } } diff --git a/IOB-UT-NEXT/Config/IobConfTree.cs b/IOB-UT-NEXT/Config/IobConfTree.cs index ae4f2ea6..75d1b6e9 100644 --- a/IOB-UT-NEXT/Config/IobConfTree.cs +++ b/IOB-UT-NEXT/Config/IobConfTree.cs @@ -236,6 +236,7 @@ namespace IOB_UT_NEXT.Config { newConfObj.MapoMesConf.Transport = MpIp.StartsWith("https://") ? "https" : "http"; newConfObj.MapoMesConf.IpAddr = MpIp.Replace($"{newConfObj.MapoMesConf.Transport}://", ""); // tolgo http/https... + newConfObj.MapoMesConf.ClientInstall = "SteamWare"; } // Altro @@ -357,6 +358,21 @@ namespace IOB_UT_NEXT.Config /// public Dictionary OptParConf { get; set; } = new Dictionary(); + /// + /// Recupera la chiave specifica richiesta + /// + /// + /// + public string OptParConfGet(string key) + { + string answ = ""; + if (OptParConf != null && OptParConf.ContainsKey(key)) + { + answ = OptParConf[key]; + } + return answ; + } + /// /// Dizionario delle chiavi opz da dizionario /// diff --git a/IOB-WIN-FORM/AdapterForm.cs b/IOB-WIN-FORM/AdapterForm.cs index 68cfd333..70ecb38a 100644 --- a/IOB-WIN-FORM/AdapterForm.cs +++ b/IOB-WIN-FORM/AdapterForm.cs @@ -10,6 +10,7 @@ using System.Diagnostics; using System.Drawing; using System.IO; using System.Linq; +using System.Security.AccessControl; using System.Threading; using System.Windows.Forms; using YamlDotNet.Core; @@ -108,7 +109,7 @@ namespace IOB_WIN_FORM } } - if (IOBConf == null || !utils.CRB("autoLoadConf")) + if (IOBConfFull == null || !utils.CRB("autoLoadConf")) { // definisco e avvio tipo adapter generico tipoScelto = tipoAdapter.ND; @@ -122,6 +123,13 @@ namespace IOB_WIN_FORM // cerco tra i parametri opzionali se ho il parametro di int timerIntMs = utils.CRI("timerIntMs"); + string rawTimer = IOBConfFull.OptParConfGet("timerIntMs"); + if (!string.IsNullOrEmpty(rawTimer)) + { + int.TryParse(rawTimer, out timerIntMs); + lgInfo($"Impostato timerIntMs da IOBConfFull: {timerIntMs}"); + } +#if false if (IOBConf.optPar.ContainsKey("timerIntMs")) { // recupero @@ -131,7 +139,8 @@ namespace IOB_WIN_FORM int.TryParse(rawVal, out timerIntMs); lgInfo($"Impostato timerIntMs da IOB.ini: {timerIntMs}"); } - } + } +#endif // Start timer periodico comunicazione gather.Interval = timerIntMs; gather.Enabled = true; @@ -1238,7 +1247,7 @@ namespace IOB_WIN_FORM /// protected virtual void loadIobType() { - if (IOBConf != null) + if (IOBConfFull != null) { switch (tipoScelto) { @@ -1248,19 +1257,27 @@ namespace IOB_WIN_FORM start.Enabled = false; break; } - lblCNC.Text = $"CNC: {IOBConf.tipoIob} [{IOBConf.cncIpAddr}:{IOBConf.cncPort}]"; - lblSrvUrl.Text = $"SRV: {IOBConf.serverData.MPIP} | URL: {IOBConf.serverData.MPURL}{IOBConf.serverData.CMDBASE}"; - - // aggancio evento refresh - iobObj.eh_refreshed += IobObj_eh_refreshed; - - // carico i default values su interfaccia - setDefaults(); - - displayTaskAndLog($"Caricata conf per adapter {tipoScelto}"); + UpdateDisplTypeIobSel(); } } + /// + /// Update display info tipo IOB selezionato + /// + protected void UpdateDisplTypeIobSel() + { + lblCNC.Text = $"CNC: {IOBConfFull.GenConf.IobType} [{IOBConfFull.DeviceConf.ConnectConf.IpAddr}:{IOBConfFull.DeviceConf.ConnectConf.Port}]"; + lblSrvUrl.Text = $"SRV: {IOBConfFull.MapoMesConf.IpAddr} | BaseURL: {IOBConfFull.MapoMesConf.ApiUrl("")}"; + + // aggancio evento refresh + iobObj.eh_refreshed += IobObj_eh_refreshed; + + // carico i default values su interfaccia + setDefaults(); + + displayTaskAndLog($"Caricata conf per adapter {tipoScelto}"); + } + /// /// Init form (grafica) con helper x testi e varie /// @@ -1838,7 +1855,7 @@ namespace IOB_WIN_FORM string confJson = JsonConvert.SerializeObject(IOBConf, Formatting.Indented); string path = fileMover.GetExecutingDirectoryName(); // Directory.GetCurrentDirectory(); string fileName = Path.GetFileName(yamlConfFile).Replace(".ini", ".iob"); - string dirPath = $"{path}\\DATA\\{IOBConf.serverData.ClientInstall}"; + string dirPath = $"{path}\\DATA\\{IOBConfFull.MapoMesConf.ClientInstall}"; string fullPath = $"{dirPath}\\{fileName}"; // verifica directory baseUtils.checkDir(dirPath); diff --git a/IOB-WIN-FORM/Iob/Generic.cs b/IOB-WIN-FORM/Iob/Generic.cs index 13125968..cbe8ab0b 100644 --- a/IOB-WIN-FORM/Iob/Generic.cs +++ b/IOB-WIN-FORM/Iob/Generic.cs @@ -46,21 +46,21 @@ namespace IOB_WIN_FORM.Iob { if (IOBConf != null) { - // init oggetto redis... - redisMan = new RedisIobCache(IOBConf.serverData.MPIP, IOBConf.filenameIOB, $"{IOBConf.tipoIob}", IOBConf.minDeltaSec); - //redisMan = new RedisIobCache(IOBConf.serverData.MPIP, IOBConf.codIOB, $"{IOBConf.tipoIob}", IOBConf.minDeltaSec); - - // initi oggetto TCMan - tcMan = new TCMan(IOBConf.TCLambda, IOBConf.TCMaxDelayFactor, IOBConf.TCMaxIncrPz); - - // salvo il form chiamante - parentForm = caller; - // salvo configurazione versione legacy e nuova... cIobConf = IOBConf; IOBConfFull = IobConfNew; - // imposto le code! + // init oggetto redis... + redisMan = new RedisIobCache(IobConfNew.MapoMesConf.IpAddr, IobConfNew.GenConf.FilenameIOB, $"{IobConfNew.GenConf.IobType}", IobConfNew.GenConf.MinDeltaSec); + //redisMan = new RedisIobCache(IOBConf.serverData.MPIP, IOBConf.codIOB, $"{IOBConf.tipoIob}", IOBConf.minDeltaSec); + + // initi oggetto TCMan + tcMan = new TCMan(IobConfNew.TCDataConf.Lambda, IobConfNew.TCDataConf.MaxDelayFactor, IobConfNew.TCDataConf.MaxIncrPz); + + // salvo il form chiamante + parentForm = caller; + + // imposto le code! QueueIN = new DataQueue(IOBConfFull.GenConf.CodIOB, "QueueIN", cIobConf.EnableRedisQueue); lastConnectTry = DateTime.Now; @@ -498,29 +498,6 @@ namespace IOB_WIN_FORM.Iob /// public int RawDataInputStart { get; set; } = 0; - /// - /// URL di base del server MES da contattare - /// - private string urlMesServer - { - get => $@"{IOBConfFull.MapoMesConf.Transport}://{IOBConfFull.MapoMesConf.IpAddr}"; - } - - /// - /// URL del comando letto da conf in aggiunta al server MES da contattare - /// - private string urlCommand(string cmqReq) - { - return $@"{urlMesServer}{IOBConfFull.MapoMesConf.ApiUrl(cmqReq)}"; - } - /// - /// URL come urlCommand + aggiunta codice IOB da cui viene inviato - /// - private string urlCommandIob(string cmqReq) - { - return $@"{urlMesServer}{IOBConfFull.MapoMesConf.ApiUrl(cmqReq)}{IOBConfFull.GenConf.CodIOB}"; - } - /// /// URL per INVIO IN BLOCCO di un INCREMENTO x contapezzi (quelli della macchina: PLC/CNC)... /// @@ -720,7 +697,7 @@ namespace IOB_WIN_FORM.Iob get { return $@"{urlMesServer}{IOBConfFull.MapoMesConf.BaseAppUrl}{cIobConf.serverData.CMD_IDLE_TIME}{IOBConfFull.GenConf.CodIOB}"; - } + } #endif } @@ -734,7 +711,7 @@ namespace IOB_WIN_FORM.Iob get { return $@"{urlMesServer}{IOBConfFull.MapoMesConf.BaseAppUrl}{cIobConf.serverData.CMD_ODL_STARTED}{IOBConfFull.GenConf.CodIOB}"; - } + } #endif } @@ -748,7 +725,7 @@ namespace IOB_WIN_FORM.Iob get { return $@"{urlMesServer}{IOBConfFull.MapoMesConf.BaseAppUrl}{cIobConf.serverData.CMDENABLED}{IOBConfFull.GenConf.CodIOB}"; - } + } #endif } @@ -773,7 +750,7 @@ namespace IOB_WIN_FORM.Iob /// public string urlOdlStartFromPOdl { - get=> $@"{urlCommandIob("forceStartPOdl")}?idxPODL="; + get => $@"{urlCommandIob("forceStartPOdl")}?idxPODL="; } /// @@ -781,7 +758,7 @@ namespace IOB_WIN_FORM.Iob /// public string urlPODLClose { - get=> $@"{urlCommandIob("closePODL")}?idxPOdl="; + get => $@"{urlCommandIob("closePODL")}?idxPOdl="; } /// @@ -803,7 +780,7 @@ namespace IOB_WIN_FORM.Iob answ = $@"{urlMesServer}{IOBConfFull.MapoMesConf.BaseAppUrl}{cIobConf.serverData.CMDREBO}{IOBConfFull.GenConf.CodIOB}"; } return answ; - } + } #endif } @@ -812,7 +789,7 @@ namespace IOB_WIN_FORM.Iob /// public string urlRemTask2Exe { - get=> $@"{urlCommandIob("remTask2Exe")}?taskName="; + get => $@"{urlCommandIob("remTask2Exe")}?taskName="; } /// @@ -820,7 +797,7 @@ namespace IOB_WIN_FORM.Iob /// public string urlSaveAllParams { - get=> $@"{urlCommandIob("setObjItems")}"; + get => $@"{urlCommandIob("setObjItems")}"; } /// @@ -828,7 +805,7 @@ namespace IOB_WIN_FORM.Iob /// public string urlSaveMachIobConf { - get=> $@"{urlCommandIob("saveMachineIobConf")}"; + get => $@"{urlCommandIob("saveMachineIobConf")}"; } /// @@ -875,7 +852,7 @@ namespace IOB_WIN_FORM.Iob lgError(exc, "Errore in composizione urlSetM2IOB"); } return answ; - } + } #endif } @@ -914,7 +891,7 @@ namespace IOB_WIN_FORM.Iob lgError(exc, "Errore in composizione urlSetPzCountMAC"); } return answ; - } + } #endif } @@ -945,7 +922,7 @@ namespace IOB_WIN_FORM.Iob lgError(exc, "Errore in composizione urlUpdateWriteParams"); } return answ; - } + } #endif } @@ -3892,6 +3869,7 @@ namespace IOB_WIN_FORM.Iob { // verifico la parte di link "tipoComando" string tipoComando = ""; +#if false switch (tipoUrl) { case urlType.FLog: @@ -3913,10 +3891,32 @@ namespace IOB_WIN_FORM.Iob default: break; } +#endif + switch (tipoUrl) + { + case urlType.FLog: + tipoComando = "flogJson"; + break; + + case urlType.SignIN: + tipoComando = "evListJson"; + break; + + case urlType.RawTransf: + tipoComando = "rawTransfJson"; + break; + + case urlType.ULog: + tipoComando = "ulogJson"; + break; + + default: + break; + } // URL base x input string answ = $@"{urlCommandIob(tipoComando)}"; #if false - string answ = $@"{urlMesServer}{IOBConfFull.MapoMesConf.BaseAppUrl}{tipoComando}{IOBConfFull.GenConf.CodIOB}"; + string answ = $@"{urlMesServer}{IOBConfFull.MapoMesConf.BaseAppUrl}{tipoComando}{IOBConfFull.GenConf.CodIOB}"; #endif return answ; } @@ -3933,18 +3933,18 @@ namespace IOB_WIN_FORM.Iob #if false string answ = $@"{urlMesServer}{IOBConfFull.MapoMesConf.BaseAppUrl}{cIobConf.serverData.CMDFLOG}"; #endif - // decodifica valore! + // decodifica valore! string[] valori = qDecodeIN(queueVal); // aggiungo flux e valore... answ += $@"?flux={valori[1]}&&valore={valori[2]}"; #if false // aggiungo macchina e valore... - answ += string.Format(@"{0}?flux={1}&&valore={2}", IOBConfFull.GenConf.CodIOB, valori[1], valori[2]); + answ += string.Format(@"{0}?flux={1}&&valore={2}", IOBConfFull.GenConf.CodIOB, valori[1], valori[2]); #endif // aggiondo dataOra evento e corrente + contatore... answ += $@"&&dtEve={valori[0]}&&dtCurr={DateTime.Now:yyyyMMddHHmmssfff}&&cnt={valori[3]}"; #if false - answ += string.Format(@"&&dtEve={0}&&dtCurr={1:yyyyMMddHHmmssfff}&&cnt={2}", valori[0], DateTime.Now, valori[3]); + answ += string.Format(@"&&dtEve={0}&&dtCurr={1:yyyyMMddHHmmssfff}&&cnt={2}", valori[0], DateTime.Now, valori[3]); #endif return answ; } @@ -3967,7 +3967,7 @@ namespace IOB_WIN_FORM.Iob { // URL base x input #if false - string answ = $@"{urlMesServer}{IOBConfFull.MapoMesConf.BaseAppUrl}{cIobConf.serverData.CMDBASE}"; + string answ = $@"{urlMesServer}{IOBConfFull.MapoMesConf.BaseAppUrl}{cIobConf.serverData.CMDBASE}"; #endif string answ = $@"{urlCommandIob("input")}"; // decodifica valore! @@ -3975,12 +3975,12 @@ namespace IOB_WIN_FORM.Iob // aggiungo macchina e valore... answ += $@"?valore={valori[1]}"; #if false - answ += string.Format(@"{0}?valore={1}", IOBConfFull.GenConf.CodIOB, valori[1]); + answ += string.Format(@"{0}?valore={1}", IOBConfFull.GenConf.CodIOB, valori[1]); #endif // aggiondo dataOra evento e corrente + contatore... answ += $@"&&dtEve={valori[0]}&&dtCurr={DateTime.Now:yyyyMMddHHmmssfff}&&cnt={valori[2]}"; #if false - answ += string.Format(@"&&dtEve={0}&&dtCurr={1:yyyyMMddHHmmssfff}&&cnt={2}", valori[0], DateTime.Now, valori[2]); + answ += string.Format(@"&&dtEve={0}&&dtCurr={1:yyyyMMddHHmmssfff}&&cnt={2}", valori[0], DateTime.Now, valori[2]); #endif return answ; } @@ -3994,7 +3994,7 @@ namespace IOB_WIN_FORM.Iob { // URL base x input #if false - string answ = $@"{urlMesServer}{IOBConfFull.MapoMesConf.BaseAppUrl}{cIobConf.serverData.CMDULOG}"; + string answ = $@"{urlMesServer}{IOBConfFull.MapoMesConf.BaseAppUrl}{cIobConf.serverData.CMDULOG}"; #endif string answ = $@"{urlCommandIob("ulog")}"; // decodifica valore! @@ -4002,12 +4002,12 @@ namespace IOB_WIN_FORM.Iob // aggiungo macchina e valore... answ += $@"?flux={valori[1]}&&valore={valori[2]}"; #if false - answ += string.Format(@"{0}?flux={1}&&valore={2}", IOBConfFull.GenConf.CodIOB, valori[1], valori[2]); + answ += string.Format(@"{0}?flux={1}&&valore={2}", IOBConfFull.GenConf.CodIOB, valori[1], valori[2]); #endif // aggiondo dataOra evento e corrente + contatore... answ += $@"&&dtEve={valori[0]}&&dtCurr={DateTime.Now:yyyyMMddHHmmssfff}&&cnt={valori[3]}"; #if false - answ += string.Format(@"&&dtEve={0}&&dtCurr={1:yyyyMMddHHmmssfff}&&cnt={2}", valori[0], DateTime.Now, valori[3]); + answ += string.Format(@"&&dtEve={0}&&dtCurr={1:yyyyMMddHHmmssfff}&&cnt={2}", valori[0], DateTime.Now, valori[3]); #endif return answ; } @@ -7763,6 +7763,14 @@ namespace IOB_WIN_FORM.Iob } } + /// + /// URL di base del server MES da contattare + /// + private string urlMesServer + { + get => $@"{IOBConfFull.MapoMesConf.Transport}://{IOBConfFull.MapoMesConf.IpAddr}"; + } + #endregion Private Properties #region Private Methods @@ -7989,23 +7997,6 @@ namespace IOB_WIN_FORM.Iob } } -#if false - /// - /// Traduzione del valore chiave configurato dal dizionario RecipeKeyTranslate + BaseKeyTranslate - /// - /// - /// - protected string RecipeKeyDecod(Dictionary keyDict, string currKey) - { - string answ = currKey; - if (keyDict != null) - { - answ = keyDict[currKey]; - } - return answ; - } -#endif - /// /// recupera valore salvato in persistence layer (se non c'รจ crea...) /// @@ -8902,6 +8893,39 @@ namespace IOB_WIN_FORM.Iob return contAct; } + /// + /// URL del comando letto da conf in aggiunta al server MES da contattare + /// + private string urlCommand(string cmqReq) + { + return $@"{urlMesServer}{IOBConfFull.MapoMesConf.ApiUrl(cmqReq)}"; + } + + /// + /// URL come urlCommand + aggiunta codice IOB da cui viene inviato + /// + private string urlCommandIob(string cmqReq) + { + return $@"{urlMesServer}{IOBConfFull.MapoMesConf.ApiUrl(cmqReq)}{IOBConfFull.GenConf.CodIOB}"; + } + #endregion Private Methods + +#if false + /// + /// Traduzione del valore chiave configurato dal dizionario RecipeKeyTranslate + BaseKeyTranslate + /// + /// + /// + protected string RecipeKeyDecod(Dictionary keyDict, string currKey) + { + string answ = currKey; + if (keyDict != null) + { + answ = keyDict[currKey]; + } + return answ; + } +#endif } } \ No newline at end of file diff --git a/IOB-WIN-SHELLY/AdapterFormNext.cs b/IOB-WIN-SHELLY/AdapterFormNext.cs index a625d266..82b999e9 100644 --- a/IOB-WIN-SHELLY/AdapterFormNext.cs +++ b/IOB-WIN-SHELLY/AdapterFormNext.cs @@ -8,26 +8,31 @@ using System.Threading.Tasks; namespace IOB_WIN_SHELLY { - public class AdapterFormNext: IOB_WIN_FORM.AdapterForm + public class AdapterFormNext : IOB_WIN_FORM.AdapterForm { + #region Public Constructors /// /// Avvio MainForm /// /// - public AdapterFormNext(string codIOB): base(codIOB) + public AdapterFormNext(string codIOB) : base(codIOB) { } + + #endregion Public Constructors + + #region Protected Methods + /// /// carica IOB richiesto /// protected override void loadIobType() { - if (IOBConf != null) + if (IOBConfFull != null) { switch (tipoScelto) { - case tipoAdapter.Shelly: iobObj = new ShellyClient(this, IOBConf, IOBConfFull); btnStart.Enabled = true; @@ -40,17 +45,10 @@ namespace IOB_WIN_SHELLY btnStart.Enabled = false; break; } - lblCncText = $"CNC: {IOBConf.tipoIob} [{IOBConf.cncIpAddr}:{IOBConf.cncPort}]"; - lblSrvUrlText = $"SRV: {IOBConf.serverData.MPIP} | URL: {IOBConf.serverData.MPURL}{IOBConf.serverData.CMDBASE}"; - - // aggancio evento refresh - iobObj.eh_refreshed += IobObj_eh_refreshed; - - // carico i default values su interfaccia - setDefaults(); - - displayTaskAndLog($"Caricata conf per adapter {tipoScelto}"); + UpdateDisplTypeIobSel(); } } + + #endregion Protected Methods } -} +} \ No newline at end of file