add SettingsManager.RegisterProvider()
This commit is contained in:
@@ -25,7 +25,7 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
|
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
|
||||||
<Version>3.0.2</Version>
|
<Version>3.0.3</Version>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="System.Data.DataSetExtensions" Version="4.5.0" />
|
<PackageReference Include="System.Data.DataSetExtensions" Version="4.5.0" />
|
||||||
|
|||||||
@@ -48,16 +48,6 @@ Public Class SettingsManager
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
Private Sub AddAutoSaveHandler()
|
|
||||||
AddHandler AppDomain.CurrentDomain.ProcessExit, AddressOf AutoSaveSettingsOnExit
|
|
||||||
addedHandler = True
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub RemoveAutoSaveHandler()
|
|
||||||
RemoveHandler AppDomain.CurrentDomain.ProcessExit, AddressOf AutoSaveSettingsOnExit
|
|
||||||
addedHandler = False
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Public Sub New()
|
Public Sub New()
|
||||||
RaiseEvent InitializingManager(Me, EventArgs.Empty)
|
RaiseEvent InitializingManager(Me, EventArgs.Empty)
|
||||||
End Sub
|
End Sub
|
||||||
@@ -68,6 +58,20 @@ Public Class SettingsManager
|
|||||||
Me.AutoSaveOnExit = autoSaveOnExit
|
Me.AutoSaveOnExit = autoSaveOnExit
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Public Sub RegisterProvider(provider As ISettingsProvider)
|
||||||
|
settingsProvider.Add(provider)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub AddAutoSaveHandler()
|
||||||
|
AddHandler AppDomain.CurrentDomain.ProcessExit, AddressOf AutoSaveSettingsOnExit
|
||||||
|
addedHandler = True
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub RemoveAutoSaveHandler()
|
||||||
|
RemoveHandler AppDomain.CurrentDomain.ProcessExit, AddressOf AutoSaveSettingsOnExit
|
||||||
|
addedHandler = False
|
||||||
|
End Sub
|
||||||
|
|
||||||
Private Sub AutoSaveSettingsOnExit(sender As Object, e As EventArgs)
|
Private Sub AutoSaveSettingsOnExit(sender As Object, e As EventArgs)
|
||||||
RaiseEvent AutoSavingSettings(Me, New EventArgs)
|
RaiseEvent AutoSavingSettings(Me, New EventArgs)
|
||||||
Save()
|
Save()
|
||||||
|
|||||||
Reference in New Issue
Block a user