Fix Cultures not applying, remove LIB_STANDARD dependency
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
Imports System.ComponentModel
|
||||
Imports DD_LIB_Standards
|
||||
Imports DigitalData.Modules.License
|
||||
Imports DigitalData.Modules.Logging
|
||||
Imports DigitalData.Modules.Language.Utils
|
||||
Imports DigitalData.Modules.Config
|
||||
@@ -11,7 +11,7 @@ Imports System.Threading
|
||||
Imports DigitalData.Modules.EDMI.API.DatabaseWithFallback
|
||||
|
||||
Public Class ClassInit
|
||||
Public _lizenzManager As clsLicenseManager
|
||||
Public _lizenzManager As LicenseManagerLegacy
|
||||
Public _database As MSSQLServer
|
||||
Private _DataASorDB As ClassDataASorDB
|
||||
|
||||
@@ -23,25 +23,10 @@ Public Class ClassInit
|
||||
LogConfig = New LogConfig(LogConfig.PathType.AppData, Nothing, Nothing, Application.CompanyName, Application.ProductName)
|
||||
Logger = LogConfig.GetLogger()
|
||||
_DataASorDB = New ClassDataASorDB(LogConfig)
|
||||
Try
|
||||
Dim directory As New IO.DirectoryInfo(LogConfig.LogDirectory)
|
||||
|
||||
For Each file As IO.FileInfo In directory.GetFiles
|
||||
If (Now - file.CreationTime).Days > 29 Then
|
||||
file.Delete()
|
||||
Else
|
||||
Exit For
|
||||
End If
|
||||
|
||||
|
||||
Next
|
||||
Catch ex As Exception
|
||||
|
||||
End Try
|
||||
End Sub
|
||||
Public Function InitDatabase()
|
||||
|
||||
clsDatabase.GUI = True
|
||||
'clsDatabase.GUI = True
|
||||
Dim Database_ECM As MSSQLServer = Nothing
|
||||
Dim Database_IDB As MSSQLServer = Nothing
|
||||
If MyConnectionString <> String.Empty Then
|
||||
@@ -128,7 +113,7 @@ Public Class ClassInit
|
||||
CONFIG = New ConfigManager(Of ClassConfig)(LogConfig, oUserAppDataPath, oCommonAppDataPath, oStartupPath)
|
||||
|
||||
With CONFIG.Config
|
||||
MyConnectionString = DecryptConnectionString(.ConnectionString)
|
||||
MyConnectionString = MSSQLServer.DecryptConnectionString(.ConnectionString)
|
||||
LogErrorsOnly = .LogErrorsOnly
|
||||
HotkeySearchKey = .HotkeySearchKey
|
||||
LogConfig.Debug = Not .LogErrorsOnly
|
||||
@@ -137,7 +122,7 @@ Public Class ClassInit
|
||||
HotkeyFunctionKey = CONFIG.Config.HotkeyFunctionKey
|
||||
End If
|
||||
If CONFIG.Config.ConnectionStringAppServer <> String.Empty Then
|
||||
MyConStringAppserv = DecryptConnectionString(CONFIG.Config.ConnectionStringAppServer)
|
||||
MyConStringAppserv = MSSQLServer.DecryptConnectionString(CONFIG.Config.ConnectionStringAppServer)
|
||||
If InitAppDatabase() Then
|
||||
Logger.Debug("ConnectionStringAppServer will be used")
|
||||
End If
|
||||
@@ -173,27 +158,28 @@ Public Class ClassInit
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Private Function DecryptConnectionString(EncryptedConnectionString As String) As String
|
||||
Dim oBuilder As New SqlClient.SqlConnectionStringBuilder With {
|
||||
.ConnectionString = EncryptedConnectionString
|
||||
}
|
||||
'Private Function DecryptConnectionString(EncryptedConnectionString As String) As String
|
||||
' Dim oBuilder As New SqlClient.SqlConnectionStringBuilder With {
|
||||
' .ConnectionString = EncryptedConnectionString
|
||||
' }
|
||||
|
||||
If oBuilder.ConnectionString.Contains("Password=") Then
|
||||
Dim oPlaintextPassword As String
|
||||
Dim oDecryptor As New clsEncryption("!35452didalog=")
|
||||
' If oBuilder.ConnectionString.Contains("Password=") Then
|
||||
' Dim oPlaintextPassword As String
|
||||
' Dim oDecryptor As New clsEncryption("!35452didalog=")
|
||||
|
||||
' Try
|
||||
' oPlaintextPassword = oDecryptor.DecryptData(oBuilder.Password)
|
||||
' Catch ex As Exception
|
||||
' Logger.Error(ex)
|
||||
' Logger.Debug("Password {0} could not be decrypted. Assuming plaintext password.")
|
||||
' oPlaintextPassword = oBuilder.Password
|
||||
' End Try
|
||||
' Return EncryptedConnectionString.Replace(oBuilder.Password, oPlaintextPassword)
|
||||
' Else
|
||||
' Return EncryptedConnectionString
|
||||
' End If
|
||||
'End Function
|
||||
|
||||
Try
|
||||
oPlaintextPassword = oDecryptor.DecryptData(oBuilder.Password)
|
||||
Catch ex As Exception
|
||||
Logger.Error(ex)
|
||||
Logger.Debug("Password {0} could not be decrypted. Assuming plaintext password.")
|
||||
oPlaintextPassword = oBuilder.Password
|
||||
End Try
|
||||
Return EncryptedConnectionString.Replace(oBuilder.Password, oPlaintextPassword)
|
||||
Else
|
||||
Return EncryptedConnectionString
|
||||
End If
|
||||
End Function
|
||||
Public Function CheckModuleData()
|
||||
Try
|
||||
Dim oSql = String.Format("SELECT * FROM [dbo].[FNDD_LOGIN_USER_MODULE] ('{0}','CW',{1})", USER_USERNAME, CLIENT_SELECTED)
|
||||
|
||||
Reference in New Issue
Block a user