Workspace: add reset workspace
This commit is contained in:
parent
f1abc1ca58
commit
d718152a3f
@ -19,7 +19,7 @@ Namespace DocumentResultList
|
|||||||
Public Const WORKSPACE_DIRECTORY As String = "Workspaces"
|
Public Const WORKSPACE_DIRECTORY As String = "Workspaces"
|
||||||
Public Const DEFAULT_WORKSPACE As String = "Default"
|
Public Const DEFAULT_WORKSPACE As String = "Default"
|
||||||
|
|
||||||
Private _CurrentWorkspace = Nothing
|
Private _CurrentWorkspace As String = Nothing
|
||||||
|
|
||||||
Public Event WorkspaceLoaded As EventHandler(Of String)
|
Public Event WorkspaceLoaded As EventHandler(Of String)
|
||||||
|
|
||||||
@ -127,6 +127,25 @@ Namespace DocumentResultList
|
|||||||
End Try
|
End Try
|
||||||
End Function
|
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
|
Public Function LoadWorkspaces() As Boolean
|
||||||
Try
|
Try
|
||||||
Dim oFilePath = GetWorkspaceDirectoryPath()
|
Dim oFilePath = GetWorkspaceDirectoryPath()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user