Settings.Designer.vb 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. '------------------------------------------------------------------------------
  2. ' <auto-generated>
  3. ' 這段程式碼是由工具產生的。
  4. ' 執行階段版本:2.0.50727.5456
  5. '
  6. ' 對這個檔案所做的變更可能會造成錯誤的行為,而且如果重新產生程式碼,
  7. ' 變更將會遺失。
  8. ' </auto-generated>
  9. '------------------------------------------------------------------------------
  10. Option Strict On
  11. Option Explicit On
  12. Namespace My
  13. <Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
  14. Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "9.0.0.0"), _
  15. Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
  16. Partial Friend NotInheritable Class MySettings
  17. Inherits Global.System.Configuration.ApplicationSettingsBase
  18. Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings),MySettings)
  19. #Region "My.Settings 自動儲存功能"
  20. #If _MyType = "WindowsForms" Then
  21. Private Shared addedHandler As Boolean
  22. Private Shared addedHandlerLockObject As New Object
  23. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
  24. Private Shared Sub AutoSaveSettings(ByVal sender As Global.System.Object, ByVal e As Global.System.EventArgs)
  25. If My.Application.SaveMySettingsOnExit Then
  26. My.Settings.Save()
  27. End If
  28. End Sub
  29. #End If
  30. #End Region
  31. Public Shared ReadOnly Property [Default]() As MySettings
  32. Get
  33. #If _MyType = "WindowsForms" Then
  34. If Not addedHandler Then
  35. SyncLock addedHandlerLockObject
  36. If Not addedHandler Then
  37. AddHandler My.Application.Shutdown, AddressOf AutoSaveSettings
  38. addedHandler = True
  39. End If
  40. End SyncLock
  41. End If
  42. #End If
  43. Return defaultInstance
  44. End Get
  45. End Property
  46. End Class
  47. End Namespace
  48. Namespace My
  49. <Global.Microsoft.VisualBasic.HideModuleNameAttribute(), _
  50. Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  51. Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute()> _
  52. Friend Module MySettingsProperty
  53. <Global.System.ComponentModel.Design.HelpKeywordAttribute("My.Settings")> _
  54. Friend ReadOnly Property Settings() As Global.HKWTC.My.MySettings
  55. Get
  56. Return Global.HKWTC.My.MySettings.Default
  57. End Get
  58. End Property
  59. End Module
  60. End Namespace