ZooFlow: Set OperationModeOverride from FlowForm

This commit is contained in:
Jonathan Jenne
2021-12-17 11:05:23 +01:00
parent a83b22d923
commit 8d19f70abc
10 changed files with 34 additions and 29 deletions

View File

@@ -19,6 +19,7 @@ Imports DigitalData.Modules.EDMI.API.EDMIServiceReference
Imports DigitalData.Modules.Language
Imports DigitalData.Modules.Logging
Imports DigitalData.Modules.ZooFlow
Imports DigitalData.Modules.ZooFlow.Constants
Public Class frmDocumentResultList
Implements IResultForm
@@ -68,7 +69,7 @@ Public Class frmDocumentResultList
Private WithEvents _FileOpenTimer As New Timer
Private Property OperationMode As Helpers.OperationMode Implements IResultForm.OperationMode
Private Property OperationMode As OperationMode Implements IResultForm.OperationMode
Public Property ShouldReturnToPreviousForm As Boolean = False Implements IResultForm.ShouldReturnToPreviousForm
@@ -97,16 +98,16 @@ Public Class frmDocumentResultList
_Language = Utils.NotNull(_Environment.User.Language, State.UserState.LANG_EN_US)
End Sub
Private Function GetOperationMode() As Helpers.OperationMode
Dim oOperationMode = OperationMode.None
Private Function GetOperationMode() As OperationMode
Dim oOperationMode As OperationMode
If _Environment.Service.IsActive AndAlso _Environment.Service.Address <> String.Empty Then
oOperationMode = Helpers.OperationMode.WithAppServer
oOperationMode = OperationMode.WithAppServer
Else
oOperationMode = Helpers.OperationMode.NoAppServer
oOperationMode = OperationMode.NoAppServer
End If
If _Params.OperationModeOverride <> Helpers.OperationMode.None Then
If _Params.OperationModeOverride <> OperationMode.None Then
oOperationMode = _Params.OperationModeOverride
End If
@@ -118,7 +119,7 @@ Public Class frmDocumentResultList
' Operation mode is either guessed from service settings
' or explictly set from OperationModeOverride in Params
OperationMode = GetOperationMode()
If OperationMode = Helpers.OperationMode.WithAppServer Then
If OperationMode = OperationMode.WithAppServer Then
InitAppServer()
End If
@@ -138,7 +139,7 @@ Public Class frmDocumentResultList
SplitContainerControl2.SplitterPosition = _Config.Config.SplitContainer2Distance
SwitchDetailContainerHorizontal.Checked = _Config.Config.SplitContainer2Horizontal
If OperationMode <> Helpers.OperationMode.NoAppServer Then
If OperationMode <> OperationMode.NoAppServer Then
' Location and size will be managed by the ZooFlow Search Window
If Utils.IsVisibleOnAnyScreen(_Config.Config.WindowLocation) Then
If Utils.LocationIsVisible(_Config.Config.WindowLocation) Then
@@ -185,7 +186,7 @@ Public Class frmDocumentResultList
DocumentViewer1.CloseDocument()
Select Case OperationMode
Case Helpers.OperationMode.NoAppServer
Case OperationMode.NoAppServer
oDocumentInfo = LoadFile_Legacy(oRow)
If oDocumentInfo.Contents IsNot Nothing Then
@@ -195,7 +196,7 @@ Public Class frmDocumentResultList
DocumentViewer1.LoadFile(oDocumentInfo.FullPath)
End If
Case Helpers.OperationMode.WithAppServer
Case OperationMode.WithAppServer
oDocumentInfo = LoadFile_IDB(oRow)
If oDocumentInfo.Contents IsNot Nothing Then
@@ -206,7 +207,7 @@ Public Class frmDocumentResultList
End If
Case Helpers.OperationMode.ZooFlow
Case OperationMode.ZooFlow
oDocumentInfo = LoadFile_ZooFlow(oRow)
@@ -435,7 +436,7 @@ Public Class frmDocumentResultList
Throw New ApplicationException($"Datatable is missing DocId Column [{COLUMN_DOCID}] for search {Result.Title}!")
End If
If OperationMode = Helpers.OperationMode.NoAppServer And Result.Datatable.Columns.Contains(COLUMN_FILEPATH) = False Then
If OperationMode = OperationMode.NoAppServer And Result.Datatable.Columns.Contains(COLUMN_FILEPATH) = False Then
Throw New ApplicationException($"Datatable is missing Filepath Column [{COLUMN_FILEPATH}] for search {Result.Title}!")
End If
@@ -571,7 +572,7 @@ Public Class frmDocumentResultList
oFilePathColumn.Visible = False
' Hide Fullpath column completely in AppServer-Mode
If OperationMode = Helpers.OperationMode.WithAppServer Then
If OperationMode = OperationMode.WithAppServer Then
oFilePathColumn.OptionsColumn.ShowInCustomizationForm = False
End If
End If
@@ -932,7 +933,7 @@ Public Class frmDocumentResultList
_CurrentDocumentId = oObjectId
If OperationMode = Helpers.OperationMode.WithAppServer Then
If OperationMode = OperationMode.WithAppServer Then
If oRight = Rights.AccessRight.FULL Or oRight = Rights.AccessRight.VIEW_EXPORT Then
MenuFullAccess_IDB.ShowPopup(oPoint)
Else