From e2f8607592f90cc3565513ec724a42842888ce49 Mon Sep 17 00:00:00 2001 From: Developer01 Date: Thu, 5 Jun 2025 14:09:27 +0200 Subject: [PATCH] UseAppConfig integriert wie in taskFLOW --- Global_Indexer/App.config | 7 ++++++- Global_Indexer/ClassInit.vb | 9 +++++++-- Global_Indexer/My Project/Settings.Designer.vb | 11 ++++++++++- Global_Indexer/My Project/Settings.settings | 3 +++ 4 files changed, 26 insertions(+), 4 deletions(-) diff --git a/Global_Indexer/App.config b/Global_Indexer/App.config index 8b342be..b312fe7 100644 --- a/Global_Indexer/App.config +++ b/Global_Indexer/App.config @@ -13,6 +13,9 @@ 11.2024 + + False + @@ -63,7 +66,9 @@ - + diff --git a/Global_Indexer/ClassInit.vb b/Global_Indexer/ClassInit.vb index 37742c5..1635a88 100644 --- a/Global_Indexer/ClassInit.vb +++ b/Global_Indexer/ClassInit.vb @@ -25,8 +25,13 @@ Public Class ClassInit Dim oUtils = New ConfigUtils(LOGCONFIG) oUtils.MigrateUserAppDataConfig(Application.UserAppDataPath, Application.ProductName, "fileFLOW") oUtils.MigrateCommonAppDataConfig(Application.CommonAppDataPath, Application.ProductName, "fileFLOW") - - CONFIG = New ConfigManager(Of ClassConfig)(LOGCONFIG, Application.UserAppDataPath, Application.CommonAppDataPath, Application.StartupPath) + Dim oCommonAppDataPath = Application.CommonAppDataPath + Dim oStartupPath = Application.StartupPath + If My.Settings.UseAppConfig = True Then + LOGGER.Info("Achtung: Anstatt ComputerConfig wird AppConfig benutzt! (UseAppConfig in Appdata)") + oCommonAppDataPath = oStartupPath + End If + CONFIG = New ConfigManager(Of ClassConfig)(LOGCONFIG, Application.UserAppDataPath, oCommonAppDataPath, Application.StartupPath) LOGCONFIG.Debug = CONFIG.Config.LogDEBUG LOGGER.Info("Debug log set to: [{0}]", LOGCONFIG.Debug) diff --git a/Global_Indexer/My Project/Settings.Designer.vb b/Global_Indexer/My Project/Settings.Designer.vb index f6fc7ee..55dab50 100644 --- a/Global_Indexer/My Project/Settings.Designer.vb +++ b/Global_Indexer/My Project/Settings.Designer.vb @@ -15,7 +15,7 @@ Option Explicit On Namespace My _ Partial Friend NotInheritable Class MySettings Inherits Global.System.Configuration.ApplicationSettingsBase @@ -73,6 +73,15 @@ Namespace My Return CType(Me("GDPICTURE_VERSION"),String) End Get End Property + + _ + Public ReadOnly Property UseAppConfig() As Boolean + Get + Return CType(Me("UseAppConfig"),Boolean) + End Get + End Property End Class End Namespace diff --git a/Global_Indexer/My Project/Settings.settings b/Global_Indexer/My Project/Settings.settings index c2daed8..e4e966a 100644 --- a/Global_Indexer/My Project/Settings.settings +++ b/Global_Indexer/My Project/Settings.settings @@ -13,5 +13,8 @@ 11.2024 + + False + \ No newline at end of file