diff --git a/GUIs.Common/DocumentResultList/Workspace.vb b/GUIs.Common/DocumentResultList/Workspace.vb index e36d36d9..b0e09abd 100644 --- a/GUIs.Common/DocumentResultList/Workspace.vb +++ b/GUIs.Common/DocumentResultList/Workspace.vb @@ -19,7 +19,7 @@ Namespace DocumentResultList Public Const WORKSPACE_DIRECTORY As String = "Workspaces" Public Const DEFAULT_WORKSPACE As String = "Default" - Private _CurrentWorkspace = Nothing + Private _CurrentWorkspace As String = Nothing Public Event WorkspaceLoaded As EventHandler(Of String) @@ -127,6 +127,25 @@ Namespace DocumentResultList End Try End Function + Public Function ResetWorkspace(pName As String) As Boolean + Try + Dim oFilePath = GetWorkspacePath(pName) + Manager.RemoveWorkspace(pName) + + If IO.File.Exists(oFilePath) = False Then + Logger.Debug("Workspace does not exist!") + Return True + End If + + IO.File.Delete(oFilePath) + + Return True + Catch ex As Exception + Logger.Error(ex) + Return False + End Try + End Function + Public Function LoadWorkspaces() As Boolean Try Dim oFilePath = GetWorkspaceDirectoryPath()