- corretto indice di creazione macchine per comunicazione

- gestito posizionamento e dimensione finestra
- aggiunta funzione SplitStrign per lua
- aggiunta barra sopra in MainWindow
- gestita finestra con riposizionamento, dimensioni, ecc
- gestita esecuzione asincrona
- aggiunta verifica esecuzione macchina stati
This commit is contained in:
Emmanuele Sassi
2024-09-03 11:27:59 +02:00
parent 84f191782b
commit f23608580f
18 changed files with 492 additions and 25 deletions
+30
View File
@@ -1,5 +1,7 @@
Module ExecProcessManager
Private m_ExecProcess As Process
Friend Function ExecProcess(sFileName As String, sMainLuaPath As String, sArguments As String) As Boolean
' lancio esecuzione programma
Dim bResult As Boolean = True
@@ -25,4 +27,32 @@
Return bResult
End Function
Friend Function ExecProcessAsync(sFileName As String, sMainLuaPath As String, sArguments As String) As Boolean
If Not IsNothing(m_ExecProcess) Then
If Not m_ExecProcess.HasExited Then
m_ExecProcess.Kill()
End If
End If
' lancio esecuzione programma
Dim bResult As Boolean = True
m_ExecProcess = New Process()
m_ExecProcess.StartInfo.FileName = sFileName
m_ExecProcess.StartInfo.RedirectStandardInput = False
m_ExecProcess.StartInfo.RedirectStandardOutput = False
m_ExecProcess.StartInfo.Arguments = 1.ToString() & " """ & sMainLuaPath & """ """ & sArguments & """"
m_ExecProcess.StartInfo.UseShellExecute = False
m_ExecProcess.StartInfo.CreateNoWindow = True
Return m_ExecProcess.Start()
End Function
Friend Function CheckExecProcessAsync(ByRef bHasExited As Boolean, ByRef nExitCode As Integer) As Boolean
If IsNothing(m_ExecProcess) Then Return False
bHasExited = m_ExecProcess.HasExited
If bHasExited Then
nExitCode = m_ExecProcess.ExitCode
End If
Threading.Thread.Sleep(100)
Return True
End Function
End Module