Save DocView Collapsed state in config

This commit is contained in:
Jonathan Jenne
2024-01-19 13:16:54 +01:00
parent 2bc0f6a6d7
commit 3212c3e077
3 changed files with 15 additions and 6 deletions

View File

@@ -103,9 +103,10 @@ Public Class frmNodeNavigation
CONFIG.Config.TreeListSplitterWidth = SplitContainerTreeList.SplitterPosition
CONFIG.Config.DocumentViewerSplitterWidth = SplitContainerDocView.SplitterPosition
CONFIG.Config.DocumentSearchSplitterWidth = SplitContainerDocumentSearch.SplitterPosition
CONFIG.Config.DocumentViewerShown = Not SplitContainerDocView.Collapsed
Catch ex As Exception
LOGGER.Error(ex)
LOGGER.Error(ex)
ClassHelper.MSGBOX_Handler("ERROR", "Unexpected Error", ex.Message, ex.StackTrace)
End Try
End Sub
@@ -123,8 +124,12 @@ LOGGER.Error(ex)
If CONFIG.Config.DocumentSearchSplitterWidth > 0 Then
SplitContainerDocumentSearch.SplitterPosition = CONFIG.Config.DocumentSearchSplitterWidth
End If
SplitContainerDocView.Collapsed = Not CONFIG.Config.DocumentViewerShown
checkShowPreview.Checked = CONFIG.Config.DocumentViewerShown
Catch ex As Exception
LOGGER.Error(ex)
LOGGER.Error(ex)
ClassHelper.MSGBOX_Handler("ERROR", "Unexpected Error", ex.Message, ex.StackTrace)
End Try
End Sub
@@ -1156,10 +1161,8 @@ LOGGER.Error(ex)
Try
CURRENT_DOCVIEW.CloseView(CURRENT_DOCVIEW_PATH, 0)
Catch ex As Exception
LOGGER.Error(ex)
LOGGER.Error(ex)
End Try
End If
End Sub
@@ -2942,6 +2945,10 @@ LOGGER.Error(ex)
End Sub
Private Sub checkShowPreview_CheckedChanged(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles checkShowPreview.CheckedChanged
If FORM_LOADED = False Then
Exit Sub
End If
SplitContainerDocView.Collapsed = Not checkShowPreview.Checked
End Sub