diff --git a/IOB-WIN/IobGeneric.cs b/IOB-WIN/IobGeneric.cs index 7f8171b3..c72e81ac 100644 --- a/IOB-WIN/IobGeneric.cs +++ b/IOB-WIN/IobGeneric.cs @@ -1170,16 +1170,21 @@ namespace IOB_WIN } currDispData.semIn = Semaforo.SR; } - // segnalo refresh! - if (eh_refreshed != null) + raiseRefresh(currDispData); + } + + private void raiseRefresh(newDisplayData currDispData) + { + if (currDispData.hasData) { - // !!!FIXME !!!FARE migliorare controllo di QUANDO sollevare evento - if (currDispData.semIn != Semaforo.ND || currDispData.semOut != Semaforo.ND || !string.IsNullOrWhiteSpace(currDispData.newLiveLogData)) + // segnalo refresh! + if (eh_refreshed != null) { eh_refreshed(this, new iobRefreshedEventArgs(currDispData)); } } } + /// /// Cerca di inviare su un altro thread i vari dati accumulati... /// @@ -1234,10 +1239,7 @@ namespace IOB_WIN { currDispData.semOut = Semaforo.SR; } - if (currDispData.hasData) - { - parentForm.updateFormDisplay(currDispData); - } + raiseRefresh(currDispData); } /// @@ -2733,7 +2735,7 @@ namespace IOB_WIN { currDispData.semIn = Semaforo.SR; } - parentForm.updateFormDisplay(currDispData); + raiseRefresh(currDispData); } /// /// Effettua gestioen programma: legge e mostra su display... @@ -3306,7 +3308,7 @@ namespace IOB_WIN { currDispData.semOut = Semaforo.SR; } - parentForm.updateFormDisplay(currDispData); + raiseRefresh(currDispData); } /// /// Effettua invio a MoonPro del valore richiesto @@ -3375,7 +3377,7 @@ namespace IOB_WIN { currDispData.semOut = Semaforo.SR; } - parentForm.updateFormDisplay(currDispData); + raiseRefresh(currDispData); } #endregion