UseAppConfig integriert wie in taskFLOW

This commit is contained in:
Developer01 2025-06-05 14:09:27 +02:00
parent c6d49b988b
commit e2f8607592
4 changed files with 26 additions and 4 deletions

View File

@ -13,6 +13,9 @@
<setting name="GDPICTURE_VERSION" serializeAs="String">
<value>11.2024</value>
</setting>
<setting name="UseAppConfig" serializeAs="String">
<value>False</value>
</setting>
</Global_Indexer.My.MySettings>
<DevExpress.LookAndFeel.Design.AppSettings>
<setting name="DefaultAppSkin" serializeAs="String">
@ -63,7 +66,9 @@
</DevExpress.LookAndFeel.Design.AppSettings>
</applicationSettings>
<connectionStrings>
<add name="Global_Indexer.My.MySettings.DD_ECMConnectionString" connectionString="Data Source=SDD-VMP04-SQL17\DD_DEVELOP01;Initial Catalog=DD_ECM;Persist Security Info=True;User ID=sa;Password=dd" providerName="System.Data.SqlClient" />
<add name="Global_Indexer.My.MySettings.DD_ECMConnectionString"
connectionString="Data Source=SDD-VMP04-SQL17\DD_DEVELOP01;Initial Catalog=DD_ECM;Persist Security Info=True;User ID=sa;Password=dd"
providerName="System.Data.SqlClient" />
</connectionStrings>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2" />

View File

@ -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)

View File

@ -15,7 +15,7 @@ Option Explicit On
Namespace My
<Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.9.0.0"), _
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.14.0.0"), _
Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
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
<Global.System.Configuration.ApplicationScopedSettingAttribute(), _
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.Configuration.DefaultSettingValueAttribute("False")> _
Public ReadOnly Property UseAppConfig() As Boolean
Get
Return CType(Me("UseAppConfig"),Boolean)
End Get
End Property
End Class
End Namespace

View File

@ -13,5 +13,8 @@
<Setting Name="GDPICTURE_VERSION" Type="System.String" Scope="Application">
<Value Profile="(Default)">11.2024</Value>
</Setting>
<Setting Name="UseAppConfig" Type="System.Boolean" Scope="Application">
<Value Profile="(Default)">False</Value>
</Setting>
</Settings>
</SettingsFile>