This commit is contained in:
2025-05-26 09:27:04 +02:00
parent 389575ff56
commit 192f25a608
4 changed files with 60 additions and 31 deletions

View File

@@ -12,15 +12,16 @@ Option Strict On
Option Explicit On
<Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.3.0.0"), _
Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
Partial Friend NotInheritable Class MySettings
Inherits Global.System.Configuration.ApplicationSettingsBase
Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings()),MySettings)
Namespace My
<Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.6.0.0"), _
Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
Partial Friend NotInheritable Class MySettings
Inherits Global.System.Configuration.ApplicationSettingsBase
Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings()),MySettings)
#Region "Automatische My.Settings-Speicherfunktion"
#If _MyType = "WindowsForms" Then
Private Shared addedHandler As Boolean
@@ -35,10 +36,10 @@ Partial Friend NotInheritable Class MySettings
End Sub
#End If
#End Region
Public Shared ReadOnly Property [Default]() As MySettings
Get
Public Shared ReadOnly Property [Default]() As MySettings
Get
#If _MyType = "WindowsForms" Then
If Not addedHandler Then
SyncLock addedHandlerLockObject
@@ -49,10 +50,11 @@ Partial Friend NotInheritable Class MySettings
End SyncLock
End If
#End If
Return defaultInstance
End Get
End Property
End Class
Return defaultInstance
End Get
End Property
End Class
End Namespace
Namespace My
@@ -62,9 +64,9 @@ Namespace My
Friend Module MySettingsProperty
<Global.System.ComponentModel.Design.HelpKeywordAttribute("My.Settings")> _
Friend ReadOnly Property Settings() As Global.VERAGAddIn.MySettings
Friend ReadOnly Property Settings() As Global.VERAGAddIn.My.MySettings
Get
Return Global.VERAGAddIn.MySettings.Default
Return Global.VERAGAddIn.My.MySettings.Default
End Get
End Property
End Module