fix: 编译错误

CO-Authored-by: jiangyanyue <jiangyanyueawa@outlook.com>
This commit is contained in:
薄奚梦灵
2025-06-02 13:40:43 +08:00
co-authored by jiangyanyue
parent 70a2f28073
commit 3adf47aa2c
7 changed files with 523 additions and 106 deletions
+18 -20
View File
@@ -12,16 +12,15 @@ Option Strict On
Option Explicit On
Namespace My
<Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.0.3.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)
<Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.13.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 "My.Settings 自动保存功能"
#If _MyType = "WindowsForms" Then
Private Shared addedHandler As Boolean
@@ -36,10 +35,10 @@ Namespace My
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
@@ -50,11 +49,10 @@ Namespace My
End SyncLock
End If
#End If
Return defaultInstance
End Get
End Property
End Class
End Namespace
Return defaultInstance
End Get
End Property
End Class
Namespace My
@@ -64,9 +62,9 @@ Namespace My
Friend Module MySettingsProperty
<Global.System.ComponentModel.Design.HelpKeywordAttribute("My.Settings")> _
Friend ReadOnly Property Settings() As Global.PCL.My.MySettings
Friend ReadOnly Property Settings() As Global.PCL.MySettings
Get
Return Global.PCL.My.MySettings.Default
Return Global.PCL.MySettings.Default
End Get
End Property
End Module