- aggiunta log

This commit is contained in:
Emmanuele Sassi
2023-06-09 12:21:58 +02:00
parent 93b3ddec79
commit c968befafb
@@ -58,13 +58,18 @@ Public Class MachManaging
End Property
Friend Shared Sub AddToCommandList(value As ThreadCommand)
SyncLock Lock_CommandList
EgtOutLog("Inizio ciclo rimozioni")
For CommandIndex = m_CommandList.Count - 1 To 0 Step -1
Dim Command As ThreadCommand = m_CommandList(CommandIndex)
If Command.ProcessingStatus = ThreadCommand.ProcessingStatuses.DONE Then
EgtOutLog("Inizio rimozione comando")
m_CommandList.Remove(Command)
EgtOutLog("Fine rimozione comando")
End If
Next
EgtOutLog("Fine ciclo rimozioni")
CommandList.Add(value)
EgtOutLog("Count dopo aggiunta: " & CommandList.Count)
End SyncLock
End Sub
@@ -785,7 +790,9 @@ Public Class MachManaging
Private Sub CommandList_CollectionChanged(sender As Object, e As NotifyCollectionChangedEventArgs)
If Not IsNothing(e.NewItems) Then
For CommandIndex = 0 To e.NewItems.Count - 1
EgtOutLog("Inizio ciclo esecuzione comandi")
Dim nCommandCount As Integer = e.NewItems.Count
For CommandIndex = 0 To nCommandCount - 1
Dim Command As ThreadCommand = e.NewItems(CommandIndex)
If Command.ProcessingStatus = ThreadCommand.ProcessingStatuses.WAITING Then
Command.SetProcessingStatus(ThreadCommand.ProcessingStatuses.PROCESSING)
@@ -793,6 +800,7 @@ Public Class MachManaging
Command.SetProcessingStatus(ThreadCommand.ProcessingStatuses.DONE)
End If
Next
EgtOutLog("Fine ciclo esecuzione di " & nCommandCount & " comandi")
End If
End Sub