From 58a0bd63f6b58b65b1dd881dd15f731e7900effc Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Mon, 6 Jul 2020 19:36:35 +0200 Subject: [PATCH 1/2] duie thread x inviare status conensso UI e signalr --- Thermo.Active.Core/ThreadsFunctions.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Thermo.Active.Core/ThreadsFunctions.cs b/Thermo.Active.Core/ThreadsFunctions.cs index 0cd1dd1d..56786f21 100644 --- a/Thermo.Active.Core/ThreadsFunctions.cs +++ b/Thermo.Active.Core/ThreadsFunctions.cs @@ -1206,6 +1206,8 @@ public static class ThreadsFunctions } // Send status to UI + MessageServices.Current.Publish(SEND_NC_STATUS_UI, null, ncAdapter.numericalControl.NC_IsConnected()); + // Send status to signalr MessageServices.Current.Publish(SEND_NC_STATUS, null, ncAdapter.numericalControl.NC_IsConnected()); Thread.Sleep(1000); From aa23946048176111a3da67d3b5e9b1411e38a8ee Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Mon, 6 Jul 2020 19:37:13 +0200 Subject: [PATCH 2/2] completo invio UI con nuove const --- Thermo.Active.Model/Constants.cs | 1 + Thermo.Active.UI/ServerControlWindow.cs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Thermo.Active.Model/Constants.cs b/Thermo.Active.Model/Constants.cs index b9a814db..c6d26990 100644 --- a/Thermo.Active.Model/Constants.cs +++ b/Thermo.Active.Model/Constants.cs @@ -285,6 +285,7 @@ namespace Thermo.Active.Model public const string SEND_MESSAGE = "SEND_MESSAGE"; public const string SEND_STOP_THREADS = "SEND_STOP_THREADS"; public const string SEND_NC_STATUS = "NC_STATUS"; + public const string SEND_NC_STATUS_UI = "NC_STATUS_UI"; public const string SEND_THREADS_STATUS = "THREAD_STATUS"; public const string SEND_CMSCONNECT_GW_REBOOT_STATUS = "SEND_CMSCONNECT_GW_REBOOT_STATUS"; public const string SHOW_MSG_UI = "SHOW_MSG_UI"; diff --git a/Thermo.Active.UI/ServerControlWindow.cs b/Thermo.Active.UI/ServerControlWindow.cs index 08d6af4b..1c2d72f2 100644 --- a/Thermo.Active.UI/ServerControlWindow.cs +++ b/Thermo.Active.UI/ServerControlWindow.cs @@ -195,7 +195,7 @@ namespace Thermo.Active.UI } }), // NC status handler - MessageServices.Current.Subscribe(SEND_NC_STATUS, (a, b) => + MessageServices.Current.Subscribe(SEND_NC_STATUS_UI, (a, b) => { bool newNcStatus = (bool)a;