Common: Save workspaces per language, fix resetting workspaces, set language on load
This commit is contained in:
@@ -20,6 +20,7 @@ Namespace DocumentResultList
|
||||
Public Const DEFAULT_WORKSPACE As String = "Default"
|
||||
|
||||
Private _CurrentWorkspace As String = Nothing
|
||||
Private _UserLanguage As String = Nothing
|
||||
|
||||
Public Event WorkspaceLoaded As EventHandler(Of String)
|
||||
|
||||
@@ -37,8 +38,9 @@ Namespace DocumentResultList
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Sub New(pLogConfig As LogConfig, pConfigManager As ConfigManager(Of TConfig), pWorkspaceManager As WorkspaceManager)
|
||||
Public Sub New(pLogConfig As LogConfig, pConfigManager As ConfigManager(Of TConfig), pWorkspaceManager As WorkspaceManager, pUserLanguage As String)
|
||||
MyBase.New(pLogConfig)
|
||||
_UserLanguage = pUserLanguage
|
||||
Manager = pWorkspaceManager
|
||||
Config = pConfigManager
|
||||
FileEx = New File(pLogConfig)
|
||||
@@ -61,7 +63,7 @@ Namespace DocumentResultList
|
||||
|
||||
Private Function GetWorkspacePath(pWorkspaceName As String) As String
|
||||
Dim oDirectory = GetWorkspaceDirectoryPath()
|
||||
Dim oFilename As String = Utils.ConvertTextToSlug(pWorkspaceName) & ".xml"
|
||||
Dim oFilename As String = Utils.ConvertTextToSlug(pWorkspaceName) & "_" & _UserLanguage & ".xml"
|
||||
Return IO.Path.Combine(oDirectory, oFilename)
|
||||
End Function
|
||||
|
||||
|
||||
Reference in New Issue
Block a user