Settings.Designer.vb 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. '------------------------------------------------------------------------------
  2. ' <auto-generated>
  3. ' This code was generated by a tool.
  4. ' Runtime Version:4.0.30319.42000
  5. '
  6. ' Changes to this file may cause incorrect behavior and will be lost if
  7. ' the code is regenerated.
  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", "11.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 Auto-Save Functionality"
  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.WindowsApp1.My.MySettings
  55. Get
  56. Return Global.WindowsApp1.My.MySettings.Default
  57. End Get
  58. End Property
  59. End Module
  60. End Namespace