Settings.Designer.vb 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. '------------------------------------------------------------------------------
  2. ' <auto-generated>
  3. ' このコードはツールによって生成されました。
  4. ' ランタイム バージョン:4.0.30319.42000
  5. '
  6. ' このファイルへの変更は、以下の状況下で不正な動作の原因になったり、
  7. ' コードが再生成されるときに損失したりします。
  8. ' </auto-generated>
  9. '------------------------------------------------------------------------------
  10. Option Strict On
  11. Option Explicit On
  12. <Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
  13. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.2.0.0"), _
  14. Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
  15. Partial Friend NotInheritable Class Settings
  16. Inherits Global.System.Configuration.ApplicationSettingsBase
  17. Private Shared defaultInstance As Settings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New Settings()),Settings)
  18. #Region "My.Settings 自動保存機能"
  19. #If _MyType = "WindowsForms" Then
  20. Private Shared addedHandler As Boolean
  21. Private Shared addedHandlerLockObject As New Object
  22. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
  23. Private Shared Sub AutoSaveSettings(sender As Global.System.Object, e As Global.System.EventArgs)
  24. If My.Application.SaveMySettingsOnExit Then
  25. My.Settings.Save()
  26. End If
  27. End Sub
  28. #End If
  29. #End Region
  30. Public Shared ReadOnly Property [Default]() As Settings
  31. Get
  32. #If _MyType = "WindowsForms" Then
  33. If Not addedHandler Then
  34. SyncLock addedHandlerLockObject
  35. If Not addedHandler Then
  36. AddHandler My.Application.Shutdown, AddressOf AutoSaveSettings
  37. addedHandler = True
  38. End If
  39. End SyncLock
  40. End If
  41. #End If
  42. Return defaultInstance
  43. End Get
  44. End Property
  45. End Class
  46. Namespace My
  47. <Global.Microsoft.VisualBasic.HideModuleNameAttribute(), _
  48. Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  49. Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute()> _
  50. Friend Module MySettingsProperty
  51. <Global.System.ComponentModel.Design.HelpKeywordAttribute("My.Settings")> _
  52. Friend ReadOnly Property Settings() As Global.pcl.Settings
  53. Get
  54. Return Global.pcl.Settings.Default
  55. End Get
  56. End Property
  57. End Module
  58. End Namespace