Settings.Designer.vb 2.7 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.0.3.0"), _
  14. Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
  15. Partial Friend NotInheritable Class MySettings
  16. Inherits Global.System.Configuration.ApplicationSettingsBase
  17. Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings()),MySettings)
  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 MySettings
  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.MySettings
  53. Get
  54. Return Global.PCL.MySettings.Default
  55. End Get
  56. End Property
  57. End Module
  58. End Namespace