EDMI: Checkin/out
This commit is contained in:
@@ -22,13 +22,32 @@ Namespace DocumentResultList
|
||||
End Sub
|
||||
|
||||
#Region "Saving and Restoring layout"
|
||||
Public Sub Workspace_Save(pWorkspaceManager As WorkspaceManager)
|
||||
Try
|
||||
Dim oFileName = GetWorkspace_LayoutName()
|
||||
pWorkspaceManager.SaveWorkspaces(oFileName)
|
||||
Catch ex As Exception
|
||||
Logger.Error(ex)
|
||||
Logger.Info("Error while restoring Workspaces: " & ex.Message)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
|
||||
Public Sub Workspace_Restore(pWorkspaceManager As WorkspaceManager)
|
||||
Try
|
||||
Dim oFileName = GetWorkspace_LayoutName()
|
||||
If IO.File.Exists(oFileName) Then
|
||||
pWorkspaceManager.LoadWorkspaces(oFileName)
|
||||
End If
|
||||
Catch ex As Exception
|
||||
Logger.Error(ex)
|
||||
Logger.Info("Error while restoring Workspaces: " & ex.Message)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Public Sub DockManager_SaveLayout(pDockManager As DockManager)
|
||||
Try
|
||||
Dim oXml As String = GetDockmanager_LayoutName()
|
||||
pDockManager.SaveLayoutToXml(oXml)
|
||||
Dim oFileName As String = GetDockmanager_LayoutName()
|
||||
pDockManager.SaveLayoutToXml(oFileName)
|
||||
Catch ex As Exception
|
||||
Logger.Error(ex)
|
||||
Logger.Info("Error while saving GridLayout: " & ex.Message)
|
||||
@@ -37,8 +56,10 @@ Namespace DocumentResultList
|
||||
|
||||
Public Sub DockManager_RestoreLayout(pDockManager As DockManager)
|
||||
Try
|
||||
Dim oXml As String = GetDockmanager_LayoutName()
|
||||
pDockManager.RestoreLayoutFromXml(oXml)
|
||||
Dim oFilename As String = GetDockmanager_LayoutName()
|
||||
If IO.File.Exists(oFilename) Then
|
||||
pDockManager.RestoreLayoutFromXml(oFilename)
|
||||
End If
|
||||
Catch ex As Exception
|
||||
Logger.Error(ex)
|
||||
Logger.Info("Error while restoring GridLayout: " & ex.Message)
|
||||
@@ -59,8 +80,8 @@ Namespace DocumentResultList
|
||||
|
||||
Public Sub GridView_SaveLayout(pGridView As GridView)
|
||||
Try
|
||||
Dim oXml As String = GetGrid_LayoutName(pGridView)
|
||||
pGridView.SaveLayoutToXml(oXml, OptionsLayoutBase.FullLayout)
|
||||
Dim oFileName As String = GetGrid_LayoutName(pGridView)
|
||||
pGridView.SaveLayoutToXml(oFileName, OptionsLayoutBase.FullLayout)
|
||||
Catch ex As Exception
|
||||
Logger.Error(ex)
|
||||
Logger.Info("Error while saving GridLayout: " & ex.Message)
|
||||
@@ -79,6 +100,12 @@ Namespace DocumentResultList
|
||||
Return IO.Path.Combine(oDirectory, Filename)
|
||||
End Function
|
||||
|
||||
Public Function GetWorkspace_LayoutName() As String
|
||||
Dim Filename As String = $"Workspace_UserLayout.xml"
|
||||
Dim oDirectory As String = IO.Path.GetDirectoryName(Config.UserConfigPath)
|
||||
Return IO.Path.Combine(oDirectory, Filename)
|
||||
End Function
|
||||
|
||||
Public Sub LoadWindowLocationAndSize(ByRef pForm As Form)
|
||||
If Utils.IsVisibleOnAnyScreen(Config.Config.WindowLocation) Then
|
||||
If Utils.LocationIsVisible(Config.Config.WindowLocation) Then
|
||||
|
||||
Reference in New Issue
Block a user