Merge branch 'master' of http://dd-vmp07-com04:3000/AppStd/Monorepo
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
Imports DigitalData.GUIs.ZooFlow.Administration.ClassConstants
|
||||
Imports DigitalData.Modules.Base
|
||||
Imports DigitalData.Modules.Language
|
||||
Imports DigitalData.Modules.Logging
|
||||
|
||||
Public Class ClassDetailForm
|
||||
Inherits BaseClass
|
||||
@@ -77,7 +78,7 @@ Public Class ClassDetailForm
|
||||
}}
|
||||
}
|
||||
|
||||
Public Sub New(LogConfig As Modules.Logging.LogConfig)
|
||||
Public Sub New(LogConfig As LogConfig)
|
||||
MyBase.New(LogConfig)
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
Public Const MODULE_CLIPBOARDWATCHER = "CW"
|
||||
Public Const MODULE_GLOBAL_INDEXER = "GLOBIX"
|
||||
Public Const MODULE_ZOOFLOW = "ZOOFLOW"
|
||||
Public Const MODULE_PROCESS_MANAGER = "PM"
|
||||
|
||||
Public Const ATTR_TYPE_STRING = "VARCHAR"
|
||||
Public Const ATTR_TYPE_INTEGER = "BIG INTEGER"
|
||||
|
||||
116
GUIs.ZooFlow/ClassModules.vb
Normal file
116
GUIs.ZooFlow/ClassModules.vb
Normal file
@@ -0,0 +1,116 @@
|
||||
Imports DigitalData.Modules.Base
|
||||
Imports DigitalData.Modules.Logging
|
||||
Imports DigitalData.Modules.Base.ECM
|
||||
Imports Microsoft.Win32
|
||||
|
||||
Public Class ClassModules
|
||||
Inherits BaseClass
|
||||
|
||||
Private Const PM_REGNODE = "Process Manager"
|
||||
Private Const PM_EXENAME = "DD_ProcessManager.exe"
|
||||
|
||||
Private Const CW_REGNODE = "Clipboard Watcher"
|
||||
Private Const CW_EXENAME = "DD_Clipboard_Watcher.exe"
|
||||
|
||||
Private Const GLOBIX_REGNODE = "Global Indexer"
|
||||
Private Const GLOBIX_EXENAME = "Global_Indexer.exe"
|
||||
|
||||
Private Const REGNODE_MANUFACTURER = "Digital Data"
|
||||
Private Const REGPATH_BASE = "SOFTWARE\\WOW6432Node"
|
||||
|
||||
Private Config As ClassConfig
|
||||
|
||||
Public Sub New(pLogConfig As LogConfig, pConfig As ClassConfig)
|
||||
MyBase.New(pLogConfig)
|
||||
Config = pConfig
|
||||
End Sub
|
||||
|
||||
Public Function GetProductProgramPath(pProduct As Product) As String
|
||||
Dim oApplicationName As String = Nothing
|
||||
Dim oPath = GetProductPath(pProduct)
|
||||
|
||||
If oPath Is Nothing Then
|
||||
Return Nothing
|
||||
End If
|
||||
|
||||
Select Case pProduct
|
||||
Case Product.GlobalIndexer
|
||||
oApplicationName = PM_EXENAME
|
||||
|
||||
Case Product.ClipboardWatcher
|
||||
oApplicationName = CW_EXENAME
|
||||
|
||||
Case Product.ProcessManager
|
||||
oApplicationName = GLOBIX_EXENAME
|
||||
|
||||
End Select
|
||||
|
||||
If oApplicationName Is Nothing Then
|
||||
Return Nothing
|
||||
End If
|
||||
|
||||
Return IO.Path.Combine(oPath, oApplicationName)
|
||||
End Function
|
||||
|
||||
Public Function GetProductPath(pProduct As Product) As String
|
||||
Select Case pProduct
|
||||
Case Product.ProcessManager
|
||||
Return GetProductPathFor(pProduct, PM_REGNODE)
|
||||
|
||||
Case Product.GlobalIndexer
|
||||
Return GetProductPathFor(pProduct, GLOBIX_REGNODE)
|
||||
|
||||
Case Product.ClipboardWatcher
|
||||
Return GetProductPathFor(pProduct, CW_REGNODE)
|
||||
|
||||
Case Else
|
||||
Return Nothing
|
||||
End Select
|
||||
End Function
|
||||
|
||||
Private Function GetProductPathFor(pProduct As Product, pSubKey As String) As String
|
||||
Dim oPathFromRegistry = GetProductPathFromRegistryFor(pSubKey)
|
||||
|
||||
If oPathFromRegistry IsNot Nothing Then
|
||||
Return pSubKey
|
||||
Else
|
||||
Return GetProductPathFromConfig(pProduct)
|
||||
End If
|
||||
End Function
|
||||
|
||||
Private Function GetProductPathFromConfig(pProduct As Product)
|
||||
Select Case pProduct
|
||||
Case Product.ProcessManager
|
||||
Return Config.ProductPaths.ProcessManagerPath
|
||||
|
||||
Case Product.GlobalIndexer
|
||||
Return Config.ProductPaths.GlobalIndexerPath
|
||||
|
||||
Case Product.ClipboardWatcher
|
||||
Return Config.ProductPaths.ClipboardWatcherPath
|
||||
|
||||
Case Else
|
||||
Return Nothing
|
||||
End Select
|
||||
End Function
|
||||
|
||||
Private Function GetProductPathFromRegistryFor(pSubKey As String) As String
|
||||
Try
|
||||
Dim oPathParts As New List(Of String) From {REGPATH_BASE, REGNODE_MANUFACTURER, pSubKey}
|
||||
Dim oRegistryPath = String.Join("\\", oPathParts)
|
||||
Dim oRoot = Registry.LocalMachine
|
||||
Dim oProduct = oRoot.OpenSubKey(oRegistryPath, RegistryKeyPermissionCheck.ReadSubTree)
|
||||
|
||||
If oProduct Is Nothing Then
|
||||
Return Nothing
|
||||
End If
|
||||
|
||||
Return oProduct.GetValue("Path")
|
||||
Catch ex As Exception
|
||||
Logger.Warn("Could not read [Process Manager] path from registry!")
|
||||
Logger.Error(ex)
|
||||
Return Nothing
|
||||
End Try
|
||||
End Function
|
||||
|
||||
End Class
|
||||
@@ -42,11 +42,22 @@ Public Class ClassConfig
|
||||
|
||||
<GlobalSetting>
|
||||
Public Property AppServerConfig As String = String.Empty
|
||||
|
||||
<ConnectionStringAppServer>
|
||||
Public Property ConnectionStringAppServer As String = ""
|
||||
|
||||
' === Logging Configuration
|
||||
Public Property LogDebug As Boolean = False
|
||||
|
||||
' === User Configuration ===
|
||||
Public Property UserLanguage As String = "de-DE"
|
||||
|
||||
' === Product Configuration ===
|
||||
Public Property ProductPaths As ClassProductPaths
|
||||
|
||||
Public Class ClassProductPaths
|
||||
Public ProcessManagerPath As String
|
||||
Public GlobalIndexerPath As String
|
||||
Public ClipboardWatcherPath As String
|
||||
End Class
|
||||
End Class
|
||||
|
||||
@@ -6,7 +6,7 @@ Imports File = DigitalData.Modules.Filesystem.File
|
||||
|
||||
Public Class ClassUserFiles
|
||||
Inherits BaseClass
|
||||
Private Property FILESYSTEM As Modules.Filesystem.File
|
||||
Private Property FILESYSTEM As File
|
||||
Public Sub New(pLogConfig As LogConfig)
|
||||
MyBase.New(pLogConfig)
|
||||
FILESYSTEM = New File(pLogConfig)
|
||||
|
||||
@@ -227,6 +227,7 @@
|
||||
<Compile Include="Administration\ClassSourceBundle.vb" />
|
||||
<Compile Include="ApplicationEvents.vb" />
|
||||
<Compile Include="ClassDragDrop.vb" />
|
||||
<Compile Include="ClassModules.vb" />
|
||||
<Compile Include="Modules\ClipboardWatcher\ClassProfileLoader.vb" />
|
||||
<Compile Include="Modules\ClipboardWatcher\Watcher.vb" />
|
||||
<Compile Include="ClassCommandlineArgs.vb" />
|
||||
|
||||
@@ -157,10 +157,11 @@ Public Class frmFlowForm
|
||||
Private DTIDB_SEARCHES As DataTable
|
||||
|
||||
' Common Helpers Classes
|
||||
Private Logger As Logger
|
||||
Private Init As ClassInit
|
||||
Private FileEx As Filesystem.File
|
||||
Private ErrorHandler As BaseErrorHandler
|
||||
Private Logger As Logger
|
||||
Private Modules As ClassModules
|
||||
|
||||
' Globix Helper Classes
|
||||
Private FileDropNew As FileDrop
|
||||
@@ -219,7 +220,7 @@ Public Class frmFlowForm
|
||||
Logger = My.LogConfig.GetLogger()
|
||||
Environment = My.Application.GetEnvironment()
|
||||
ErrorHandler = New BaseErrorHandler(My.LogConfig, Logger, Me)
|
||||
|
||||
Modules = New ClassModules(My.LogConfig, My.SystemConfig)
|
||||
|
||||
FileEx = New Filesystem.File(My.LogConfig)
|
||||
' === Initialize Theming ===
|
||||
@@ -321,6 +322,16 @@ Public Class frmFlowForm
|
||||
End If
|
||||
|
||||
|
||||
Dim oPMPath = Modules.GetProductPath(DigitalData.Modules.Base.ECM.Product.ProcessManager)
|
||||
|
||||
|
||||
' TODO: This needs an update of the function FNZF_GET_MODULE_INFO
|
||||
If My.Application.ModulesActive.Contains(MODULE_PROCESS_MANAGER) Then
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
If IsNothing(My.Tables.DTIDB_CATALOG_USER) Then
|
||||
Exit Function
|
||||
End If
|
||||
@@ -1045,7 +1056,7 @@ Public Class frmFlowForm
|
||||
Dim oFormTitle = GetResultWindowString(oState.CurrentClipboardContents)
|
||||
|
||||
' For now we assume these are document results instead of data results
|
||||
Dim oForm = Await oProfileSearches.GetDocResultForm(oProfile, oFormTitle, Modules.ZooFlow.Constants.OperationMode.ZooFlow)
|
||||
Dim oForm = Await oProfileSearches.GetDocResultForm(oProfile, oFormTitle, DigitalData.Modules.ZooFlow.Constants.OperationMode.ZooFlow)
|
||||
AddHandler oForm.NeedsRefresh, AddressOf ProfileResultForm_NeedsRefresh
|
||||
oForm.Show()
|
||||
|
||||
@@ -1057,7 +1068,7 @@ Public Class frmFlowForm
|
||||
.ClipboardContents = oState.CurrentClipboardContents,
|
||||
.MatchingProfiles = oProfiles,
|
||||
.MatchTreeView = oState.MatchTreeView,
|
||||
.OperationModeOverride = Modules.ZooFlow.Constants.OperationMode.ZooFlow
|
||||
.OperationModeOverride = DigitalData.Modules.ZooFlow.Constants.OperationMode.ZooFlow
|
||||
}
|
||||
|
||||
Dim oForm As New frmMatch(My.LogConfig, oEnvironment, oParams)
|
||||
@@ -1130,7 +1141,7 @@ Public Class frmFlowForm
|
||||
Dim oParams = New DocumentResultList.Params() With {
|
||||
.WindowGuid = "QuickFlowSearch1",
|
||||
.WindowTitle = GetResultWindowString(pSearchText),
|
||||
.OperationModeOverride = Modules.ZooFlow.Constants.OperationMode.ZooFlow,
|
||||
.OperationModeOverride = DigitalData.Modules.ZooFlow.Constants.OperationMode.ZooFlow,
|
||||
.ProfileGuid = 354521
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user