@@ -30,12 +30,12 @@ Public Class Talsim
3030
3131# Region "Eigenschaften"
3232
33- Private exe_path As String
33+ Private ReadOnly exe_path As String
3434
3535 ''' <summary>
3636 ''' List of result file extensions to use (e.g. "WEL", "KTR.WEL", "CHLO.WEL", "WBL", etc.)
3737 ''' </summary>
38- Private resultFiles As List( Of String )
38+ Private ReadOnly resultFiles As List( Of String )
3939
4040 '**** Multithreading ****
4141 Dim MyTalsimThreads() As TalsimThread
@@ -264,8 +264,9 @@ Public Class Talsim
264264
265265 Folder = getThreadWorkDir(Thread_ID)
266266 MyTalsimThreads(Thread_ID) = New TalsimThread(Thread_ID, Child_ID, Folder, Datensatz)
267- MyThreads(Thread_ID) = New Thread( AddressOf MyTalsimThreads(Thread_ID).launchSim)
268- MyThreads(Thread_ID).IsBackground = True
267+ MyThreads(Thread_ID) = New Thread( AddressOf MyTalsimThreads(Thread_ID).launchSim) With {
268+ .IsBackground = True
269+ }
269270 MyThreads(Thread_ID).Start()
270271 launchSim = True
271272
@@ -325,12 +326,13 @@ Public Class Talsim
325326 Dim errfile As String = IO.Path.Combine( Me .WorkDir_Current, Me .Datensatz & ".err" )
326327 Dim simendfile As String = IO.Path.Combine( Me .WorkDir_Current, Me .Datensatz & ".SIMEND" )
327328 Dim proc As Process
328- Dim startInfo As New ProcessStartInfo()
329- startInfo.FileName = Me .exe_path
330- startInfo.Arguments = runfilename
331- startInfo.UseShellExecute = True
332- startInfo.WindowStyle = ProcessWindowStyle.Hidden
333- startInfo.WorkingDirectory = IO.Path.GetDirectoryName( Me .exe_path)
329+ Dim startInfo As New ProcessStartInfo With {
330+ .FileName = Me .exe_path,
331+ .Arguments = runfilename,
332+ .UseShellExecute = True ,
333+ .WindowStyle = ProcessWindowStyle.Hidden,
334+ .WorkingDirectory = IO.Path.GetDirectoryName( Me .exe_path)
335+ }
334336 'start
335337 proc = Process.Start(startInfo)
336338 'DEBUG: write to log
0 commit comments