MS Culture

This commit is contained in:
2020-11-11 17:45:55 +01:00
parent a1b2b1cff4
commit 0894f0c358
7 changed files with 72 additions and 22 deletions

View File

@@ -26,33 +26,50 @@ Public Class ClassInit
<STAThread()>
Public Sub InitUserConfig()
CONFIG = New ConfigManager(Of ClassConfig)(LOGCONFIG, Application.UserAppDataPath, Application.CommonAppDataPath, Application.StartupPath)
LOGGER.Info("Config loaded")
Try
Dim AppdataPath = Application.UserAppDataPath
Dim CommonAppDataPath = Application.CommonAppDataPath
Dim StartupPath = Application.StartupPath
If My.Settings.UseAppConfigConString = True Then
AppdataPath = StartupPath
CommonAppDataPath = StartupPath
End If
CONFIG = New ConfigManager(Of ClassConfig)(LOGCONFIG, AppdataPath, CommonAppDataPath, StartupPath)
LOGGER.Info("Config loaded")
If CONFIG.Config.ConnectionStringTest <> String.Empty And CONFIG.Config.TestMode = True Then
LOGGER.Debug("Test Connection String loaded")
CONNECTION_STRING = DecryptConnectionString(CONFIG.Config.ConnectionStringTest)
Else
LOGGER.Debug("Connection String loaded")
CONNECTION_STRING = DecryptConnectionString(CONFIG.Config.ConnectionString)
End If
If CONFIG.Config.ConnectionStringTest <> String.Empty And CONFIG.Config.TestMode = True Then
LOGGER.Debug("Test Connection String loaded")
CONNECTION_STRING = DecryptConnectionString(CONFIG.Config.ConnectionStringTest)
Else
LOGGER.Debug("Connection String loaded")
CONNECTION_STRING = DecryptConnectionString(CONFIG.Config.ConnectionString)
End If
'VIEWER_UNIVERSAL = CONFIG.Config.UniversalViewerPath
'VIEWER_XCHANGE = CONFIG.Config.XChangeViewerPath
'VIEWER_SUMATRA = CONFIG.Config.SumatraViewerPath
'VIEWER_ZOOM_LEVEL = CONFIG.Config.PDFViewerZoomLevel
'VIEWER_PDF = CONFIG.Config.PDFViewer
'VIEWER_ALL = CONFIG.Config.DefaultViewer
If CONFIG.Config.ConnectionStringAppServer <> String.Empty Then
LOGGER.Debug("ConnectionStringAppServer will be used")
CONNECTION_STRING_APP_SERVER = DecryptConnectionString(CONFIG.Config.ConnectionStringAppServer)
End If
INDEX_DMS_ERSTELLT = CONFIG.Config.IndexDmsErstellt
INDEX_DMS_ERSTELLT_ZEIT = CONFIG.Config.IndexDmsErstelltZeit
'VIEWER_UNIVERSAL = CONFIG.Config.UniversalViewerPath
'VIEWER_XCHANGE = CONFIG.Config.XChangeViewerPath
'VIEWER_SUMATRA = CONFIG.Config.SumatraViewerPath
'VIEWER_ZOOM_LEVEL = CONFIG.Config.PDFViewerZoomLevel
'VIEWER_PDF = CONFIG.Config.PDFViewer
'VIEWER_ALL = CONFIG.Config.DefaultViewer
USER_MANAGER_PATH = CONFIG.Config.UserManagerPath
INDEX_DMS_ERSTELLT = CONFIG.Config.IndexDmsErstellt
INDEX_DMS_ERSTELLT_ZEIT = CONFIG.Config.IndexDmsErstelltZeit
USER_MANAGER_PATH = CONFIG.Config.UserManagerPath
LOG_ERRORS_ONLY = CONFIG.Config.LogErrorsOnly
LOGCONFIG.Debug = Not LOG_ERRORS_ONLY
TEST_MODE = CONFIG.Config.TestMode
Catch ex As Exception
LOGGER.Error(ex)
End Try
LOG_ERRORS_ONLY = CONFIG.Config.LogErrorsOnly
LOGCONFIG.Debug = Not LOG_ERRORS_ONLY
TEST_MODE = CONFIG.Config.TestMode
'Settings_Load()
End Sub