'------------------------------------------------------------------------------ ' ' このコードはツールによって生成されました。 ' ランタイム バージョン:4.0.30319.42000 ' ' このファイルへの変更は、以下の状況下で不正な動作の原因になったり、 ' コードが再生成されるときに損失したりします。 ' '------------------------------------------------------------------------------ Option Strict On Option Explicit On _ Partial Friend NotInheritable Class Settings Inherits Global.System.Configuration.ApplicationSettingsBase Private Shared defaultInstance As Settings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New Settings()),Settings) #Region "My.Settings 自動保存機能" #If _MyType = "WindowsForms" Then Private Shared addedHandler As Boolean Private Shared addedHandlerLockObject As New Object _ Private Shared Sub AutoSaveSettings(sender As Global.System.Object, e As Global.System.EventArgs) If My.Application.SaveMySettingsOnExit Then My.Settings.Save() End If End Sub #End If #End Region Public Shared ReadOnly Property [Default]() As Settings Get #If _MyType = "WindowsForms" Then If Not addedHandler Then SyncLock addedHandlerLockObject If Not addedHandler Then AddHandler My.Application.Shutdown, AddressOf AutoSaveSettings addedHandler = True End If End SyncLock End If #End If Return defaultInstance End Get End Property End Class Namespace My _ Friend Module MySettingsProperty _ Friend ReadOnly Property Settings() As Global.pcl.Settings Get Return Global.pcl.Settings.Default End Get End Property End Module End Namespace