Translate UI into English and french; Extend resources and outsource hardcoded String form codebase into resources.
This commit is contained in:
@@ -7,6 +7,7 @@ Imports DigitalData.Modules.Database
|
||||
Imports DigitalData.Modules.Logging
|
||||
Imports EnvelopeGenerator.CommonServices
|
||||
Imports System.ComponentModel
|
||||
Imports EnvelopeGenerator.CommonServices.My
|
||||
|
||||
Public Class frmSplashScreen
|
||||
|
||||
@@ -35,10 +36,10 @@ Public Class frmSplashScreen
|
||||
ConfigManager.Config.ConnectionString = oSQLConfig.ConnectionString
|
||||
ConfigManager.Save()
|
||||
|
||||
MsgBox("Database configured. Application will restart.", MsgBoxStyle.Critical, Text)
|
||||
MsgBox(Resources.Envelope.Database_configured, MsgBoxStyle.Critical, Text)
|
||||
Application.Restart()
|
||||
Else
|
||||
MsgBox("No Database configured. Application will close!", MsgBoxStyle.Critical, Text)
|
||||
MsgBox(Resources.Envelope.No_database_configured, MsgBoxStyle.Critical, Text)
|
||||
Application.Exit()
|
||||
End If
|
||||
End If
|
||||
@@ -53,7 +54,7 @@ Public Class frmSplashScreen
|
||||
})
|
||||
Catch ex As Exception
|
||||
Logger.Error(ex)
|
||||
MsgBox("Fehler beim Initialisieren: " & ex.Message & vbNewLine & vbNewLine & ex.StackTrace, MsgBoxStyle.Critical, Text)
|
||||
MsgBox(Resources.Envelope.Error_during_initialization & ex.Message & vbNewLine & vbNewLine & ex.StackTrace, MsgBoxStyle.Critical, Text)
|
||||
Application.Exit()
|
||||
|
||||
End Try
|
||||
@@ -62,14 +63,14 @@ Public Class frmSplashScreen
|
||||
Private Sub Worker_DoWork(sender As Object, e As DoWorkEventArgs) Handles Worker.DoWork
|
||||
MyState = DirectCast(e.Argument, State)
|
||||
|
||||
Worker.ReportProgress(20, "Initializing Database")
|
||||
Worker.ReportProgress(20, Resources.Envelope.Initializing_database)
|
||||
Thread.Sleep(300)
|
||||
|
||||
Dim oConnectionString = MSSQLServer.DecryptConnectionString(MyState.Config.ConnectionString)
|
||||
MyState.Database = New MSSQLServer(MyState.LogConfig, oConnectionString)
|
||||
|
||||
If MyState.Database?.DBInitialized = False Then
|
||||
Throw New ApplicationException("Could not connect to the database. Application will close!")
|
||||
Throw New ApplicationException(Resources.Envelope.Could_not_connect_to_database)
|
||||
Else
|
||||
DB_DD_ECM = MyState.Database
|
||||
End If
|
||||
@@ -103,7 +104,7 @@ Public Class frmSplashScreen
|
||||
DEF_TF_ENABLED = MyState.DbConfig.Default_TFA_Enabled
|
||||
DEF_TF_ENABLED_WITH_PHONE = MyState.DbConfig.Default_TFA_WithPhone
|
||||
' DOCUMENT_PATH_MOVE_AFTSEND = oState.DbConfig.DOCUMENT_PATH_MOVE_AFTSEND
|
||||
Worker.ReportProgress(60, "Initializing User")
|
||||
Worker.ReportProgress(60, Resources.Envelope.Initializing_User)
|
||||
Dim oKey = MyState.Database.GetScalarValue("SELECT LICENSE FROM TBDD_3RD_PARTY_MODULES WHERE NAME = 'GDPICTURE' and ACTIVE = 1")
|
||||
Thread.Sleep(300)
|
||||
If oKey.ToString <> String.Empty Then
|
||||
@@ -114,7 +115,7 @@ Public Class frmSplashScreen
|
||||
|
||||
Dim oUser = MyUserModel.SelectUser()
|
||||
|
||||
Worker.ReportProgress(80, "Initializing Rights")
|
||||
Worker.ReportProgress(80, Resources.Envelope.Initializing_Rights)
|
||||
Thread.Sleep(300)
|
||||
|
||||
' This checks for module access and admin rights
|
||||
@@ -156,7 +157,8 @@ Public Class frmSplashScreen
|
||||
CultureInfo.DefaultThreadCurrentUICulture = oCultureInfo
|
||||
|
||||
If oState.User.HasAccess = False Then
|
||||
Throw New ApplicationException("User is not activated for this module. Please contact your administrator. Application will close!")
|
||||
Dim msg As String = String.Format(Resources.Envelope.User_unknown, Environment.UserName)
|
||||
Throw New ApplicationException(msg)
|
||||
End If
|
||||
|
||||
If Not String.IsNullOrEmpty(oState.DbConfig.ExternalProgramName) Then
|
||||
@@ -173,7 +175,7 @@ Public Class frmSplashScreen
|
||||
Close()
|
||||
Catch ex As Exception
|
||||
Logger.Error(ex)
|
||||
MsgBox("Fehler beim Initialisieren: " & ex.Message & vbNewLine & vbNewLine & ex.StackTrace, MsgBoxStyle.Critical, Text)
|
||||
MsgBox(Resources.Envelope.Error_during_initialization & ex.Message & vbNewLine & vbNewLine & ex.StackTrace, MsgBoxStyle.Critical, Text)
|
||||
Application.Exit()
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Reference in New Issue
Block a user