This commit is contained in:
Jonathan Jenne
2024-01-16 16:28:15 +01:00
parent 6131948f2a
commit c504567c41

View File

@@ -106,16 +106,15 @@ Public Class frmSplashScreen
End Sub End Sub
Private Sub Worker_RunWorkerCompleted(sender As Object, e As RunWorkerCompletedEventArgs) Handles Worker.RunWorkerCompleted Private Sub Worker_RunWorkerCompleted(sender As Object, e As RunWorkerCompletedEventArgs) Handles Worker.RunWorkerCompleted
Try
If e.Error IsNot Nothing Then If e.Error IsNot Nothing Then
Logger.Error(e.Error) Throw e.Error
MsgBox("Fehler beim Initialisieren: " & e.Error.Message & vbNewLine & vbNewLine & e.Error.StackTrace, MsgBoxStyle.Critical, Text)
Application.Exit()
End If End If
Dim oState As State = DirectCast(e.Result, State) Dim oState As State = DirectCast(e.Result, State)
Dim oCultureInfo As CultureInfo Dim oCultureInfo As CultureInfo
oCultureInfo = New CultureInfo(oState.user.Language) oCultureInfo = New CultureInfo(oState.User.Language)
Thread.CurrentThread.CurrentCulture = oCultureInfo Thread.CurrentThread.CurrentCulture = oCultureInfo
Thread.CurrentThread.CurrentUICulture = oCultureInfo Thread.CurrentThread.CurrentUICulture = oCultureInfo
CultureInfo.DefaultThreadCurrentCulture = oCultureInfo CultureInfo.DefaultThreadCurrentCulture = oCultureInfo
@@ -137,6 +136,11 @@ Public Class frmSplashScreen
' Close this form after frmMain is closed ' Close this form after frmMain is closed
Close() Close()
Catch ex As Exception
Logger.Error(ex)
MsgBox("Fehler beim Initialisieren: " & ex.Message & vbNewLine & vbNewLine & ex.StackTrace, MsgBoxStyle.Critical, Text)
Application.Exit()
End Try
End Sub End Sub