fix file skip not working
This commit is contained in:
@@ -33,6 +33,14 @@ Module ModuleMySettings
|
||||
Return Path.Combine(Application.CommonAppDataPath(), CONFIG_FILE)
|
||||
End Function
|
||||
|
||||
Public Function GetCurrentConfigPath() As String
|
||||
If File.Exists(GetUserConfigPath()) Then
|
||||
Return GetUserConfigPath()
|
||||
Else
|
||||
Return GetAllUsersConfigPath()
|
||||
End If
|
||||
End Function
|
||||
|
||||
Public Function Settings_Load()
|
||||
Try
|
||||
Dim oDatatable As DataTable
|
||||
@@ -192,8 +200,10 @@ Module ModuleMySettings
|
||||
''' </summary>
|
||||
Public Function SaveMySettingsValue(name As String, value As String)
|
||||
Try
|
||||
Dim oConfigPath = GetUserConfigPath()
|
||||
Dim oDatatable As DataTable = GetTablefromXML(oConfigPath)
|
||||
Dim oUserConfigPath = GetUserConfigPath()
|
||||
Dim oCurrentConfigPath = GetCurrentConfigPath()
|
||||
|
||||
Dim oDatatable As DataTable = GetTablefromXML(oCurrentConfigPath)
|
||||
|
||||
For Each Row As DataRow In oDatatable.Rows
|
||||
If Row.Item("ConfigName") = name Then
|
||||
@@ -201,7 +211,7 @@ Module ModuleMySettings
|
||||
End If
|
||||
Next
|
||||
oDatatable.AcceptChanges()
|
||||
oDatatable.WriteXml(oConfigPath)
|
||||
oDatatable.WriteXml(oUserConfigPath)
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
MsgBox("Error in SaveConfigValue" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
|
||||
|
||||
Reference in New Issue
Block a user