diff --git a/Docs/ActualToDo.md b/Docs/ActualToDo.md
index edab8a4..0f72171 100644
--- a/Docs/ActualToDo.md
+++ b/Docs/ActualToDo.md
@@ -2,7 +2,7 @@
## Framework
-Traduzione OVUNQUE x ogni termine/etichetta/button
+Traduzione OVUNQUE x ogni termine/etichetta/button..
## Pagine
@@ -45,6 +45,7 @@ Per completare:
- [x] sostituire il salva generale con 2 buttons:
- salva, o meglio RECALC PNG = update PNG, potrebbe andare in automatico DOPO i vari SALVA nella pagina (opzione x auto-recalc?!?)
- get 3D obj (in new window/tab)
+
- [x] delete singola porta da ordine
- [x] navigazione in ritorno come da FIGMA in HwNewInst
- [x] refresh conteggi su approvazione
@@ -63,7 +64,6 @@ Sistemare:
- [x] Va inserita una lista dei componenti + elenco quote.
- [ ] Va pensato esportabile in pdf, comprensivo di "check pdf fatto da tizio alle ..."
-
## Componenti
### Top
diff --git a/Docs/ActualToDo.pdf b/Docs/ActualToDo.pdf
index 514bf9b..d82b8a7 100644
Binary files a/Docs/ActualToDo.pdf and b/Docs/ActualToDo.pdf differ
diff --git a/WebDoorCreator.CamSrv/ProcMan.vb b/WebDoorCreator.CamSrv/ProcMan.vb
index 4051830..bed064b 100644
--- a/WebDoorCreator.CamSrv/ProcMan.vb
+++ b/WebDoorCreator.CamSrv/ProcMan.vb
@@ -181,16 +181,18 @@ Public Class ProcMan
bStopMainProcess = m_bStopProcess
Dim bOk As Boolean = False
While Not bOk
- ' ogni 30 secondi
- If n30SecCounter = 30 OrElse n30SecCounter = 0 Then
- ' verifica connessione
- Dim risultatoPing As PingReply = currWDC.testPing
- bOk = risultatoPing.Status = IPStatus.Success
- If bOk Then
- bOk = currWDC.testAlive
+ If Not bStopMainProcess AndAlso Not m_bStopProcess Then
+ ' ogni 30 secondi
+ If n30SecCounter = 30 OrElse n30SecCounter = 0 Then
+ ' verifica connessione
+ Dim risultatoPing As PingReply = currWDC.testPing
+ bOk = risultatoPing.Status = IPStatus.Success
+ If bOk Then
+ bOk = currWDC.testAlive
+ End If
+ Else
+ bOk = True
End If
- Else
- bOk = True
End If
' se connessione non ok o processo fermato, fermo i thread
If Not bOk OrElse bStopMainProcess Then
@@ -239,13 +241,19 @@ Public Class ProcMan
' se qualche processo in stop, lo faccio ripartire
For ThreadIndex = 0 To ThreadList.Count - 1
Dim Thread = ThreadList(ThreadIndex)
- If Thread.ThreadState = ThreadState.Stopped OrElse Thread.ThreadState = ThreadState.Aborted OrElse
+ If Not IsNothing(Thread) Then
+ If Thread.ThreadState = ThreadState.Stopped OrElse Thread.ThreadState = ThreadState.Aborted OrElse
Thread.ThreadState = ThreadState.Suspended Then
- Thread.Abort()
- Dim ThreadId As Integer = ThreadIndex
- Thread = New Thread(Sub()
- ThreadFunction(ThreadId)
- End Sub)
+ Thread.Abort()
+ Thread.Sleep(1000)
+ While Not Thread.ThreadState = ThreadState.Aborted
+ Thread.Sleep(1000)
+ End While
+ Dim ThreadId As Integer = ThreadIndex
+ Thread = New Thread(Sub()
+ ThreadFunction(ThreadId)
+ End Sub)
+ End If
End If
Next
If n30SecCounter <= 30 Then
@@ -291,9 +299,9 @@ Public Class ProcMan
Sub(o)
'verifico thread attivi e se calano --> riavvia..
If ThreadCount() <> m_MaxCamInstances And Not m_bStopProcess Then
- stopAllThreads()
- Thread.Sleep(100)
- startAllThreads()
+ 'stopAllThreads()
+ 'Thread.Sleep(100)
+ 'startAllThreads()
End If
lblRunning.Text = $"threads: {ThreadCount()}/{m_MaxCamInstances}"
@@ -324,6 +332,7 @@ Public Class ProcMan
Private Sub startAllThreads()
m_bStopProcess = False
+ m_bExecutionThreadStoped = False
m_ExecutionThread = New Thread(Sub()
ExecutionProcess()
End Sub)
@@ -579,7 +588,11 @@ Public Class ProcMan
m_bStopProcess = True
While Not m_bExecutionThreadStoped
- Thread.Sleep(20)
+ Thread.Sleep(100)
+ End While
+ m_ExecutionThread.Abort()
+ While Not m_ExecutionThread.ThreadState = ThreadState.Aborted
+ Thread.Sleep(100)
End While
m_ExecutionThread = Nothing
' fix timer
@@ -918,12 +931,14 @@ Public Class ProcMan
Private Sub CheckStartAutoRestart()
TimerCheck.Enabled = chkAutoRestart.Checked
If chkAutoRestart.Checked Then
- If m_ExecutionThread.ThreadState = ThreadState.Aborted OrElse m_ExecutionThread.ThreadState = ThreadState.Stopped OrElse
- m_ExecutionThread.ThreadState = ThreadState.Suspended Then
+ If Not IsNothing(m_ExecutionThread) AndAlso (m_ExecutionThread.ThreadState = ThreadState.Aborted OrElse m_ExecutionThread.ThreadState = ThreadState.Stopped OrElse
+ m_ExecutionThread.ThreadState = ThreadState.Suspended) Then
stopAllThreads()
Thread.Sleep(200)
- m_ExecutionThread.Abort()
- Thread.Sleep(200)
+ While Not IsNothing(m_ExecutionThread)
+ Thread.Sleep(100)
+ End While
+ Thread.Sleep(100)
startAllThreads()
End If
TimerCheck.Start()
@@ -938,8 +953,14 @@ Public Class ProcMan
Private Sub restartAll()
' eseguo riavvio forzato ogni 30 sec!
- stopAllThreads()
- Task.Delay(500)
+ If Not IsNothing(m_ExecutionThread) Then
+ stopAllThreads()
+ Thread.Sleep(200)
+ While Not IsNothing(m_ExecutionThread)
+ Thread.Sleep(100)
+ End While
+ Thread.Sleep(100)
+ End If
startAllThreads()
End Sub
diff --git a/WebDoorCreator.UI/Components/Hardware/HardwareNewPanel.razor b/WebDoorCreator.UI/Components/Hardware/HardwareNewPanel.razor
index 45b4548..313dd5a 100644
--- a/WebDoorCreator.UI/Components/Hardware/HardwareNewPanel.razor
+++ b/WebDoorCreator.UI/Components/Hardware/HardwareNewPanel.razor
@@ -8,11 +8,11 @@ else
{