Zooflow: Add ClassModules
This commit is contained in:
parent
1183cd68c9
commit
b611e3eeda
@ -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
|
||||
@ -71,7 +72,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)
|
||||
|
||||
@ -221,6 +221,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" />
|
||||
|
||||
18
GUIs.ZooFlow/frmFlowForm.Designer.vb
generated
18
GUIs.ZooFlow/frmFlowForm.Designer.vb
generated
@ -54,10 +54,10 @@ Partial Class frmFlowForm
|
||||
Me.BarManager1 = New DevExpress.XtraBars.BarManager(Me.components)
|
||||
Me.Bar3 = New DevExpress.XtraBars.Bar()
|
||||
Me.BarSubItem1 = New DevExpress.XtraBars.BarSubItem()
|
||||
Me.BarButtonItem8 = New DevExpress.XtraBars.BarButtonItem()
|
||||
Me.BarButtonItemGlobixGE = New DevExpress.XtraBars.BarButtonItem()
|
||||
Me.BarButtonItem6 = New DevExpress.XtraBars.BarButtonItem()
|
||||
Me.BarButtonItem7 = New DevExpress.XtraBars.BarButtonItem()
|
||||
Me.BarButtonItem8 = New DevExpress.XtraBars.BarButtonItem()
|
||||
Me.BarButtonItem1 = New DevExpress.XtraBars.BarButtonItem()
|
||||
Me.buttonExitZooflow = New DevExpress.XtraBars.BarButtonItem()
|
||||
Me.barDockControlTop = New DevExpress.XtraBars.BarDockControl()
|
||||
@ -323,11 +323,18 @@ Partial Class frmFlowForm
|
||||
Me.BarSubItem1.Name = "BarSubItem1"
|
||||
Me.BarSubItem1.PaintStyle = DevExpress.XtraBars.BarItemPaintStyle.CaptionGlyph
|
||||
'
|
||||
'BarButtonItem8
|
||||
'
|
||||
Me.BarButtonItem8.Caption = "Grundeinstellungen"
|
||||
Me.BarButtonItem8.Id = 9
|
||||
Me.BarButtonItem8.ImageOptions.SvgImage = Global.DigitalData.GUIs.ZooFlow.My.Resources.Resources.properties
|
||||
Me.BarButtonItem8.Name = "BarButtonItem8"
|
||||
'
|
||||
'BarButtonItemGlobixGE
|
||||
'
|
||||
Me.BarButtonItemGlobixGE.Caption = "Grundeinstellungen Globix"
|
||||
Me.BarButtonItemGlobixGE.Id = 10
|
||||
Me.BarButtonItemGlobixGE.ImageOptions.SvgImage = CType(resources.GetObject("BarButtonItem9.ImageOptions.SvgImage"), DevExpress.Utils.Svg.SvgImage)
|
||||
Me.BarButtonItemGlobixGE.ImageOptions.SvgImage = CType(resources.GetObject("BarButtonItemGlobixGE.ImageOptions.SvgImage"), DevExpress.Utils.Svg.SvgImage)
|
||||
Me.BarButtonItemGlobixGE.Name = "BarButtonItemGlobixGE"
|
||||
'
|
||||
'BarButtonItem6
|
||||
@ -344,13 +351,6 @@ Partial Class frmFlowForm
|
||||
Me.BarButtonItem7.ImageOptions.SvgImage = Global.DigitalData.GUIs.ZooFlow.My.Resources.Resources.managedatasource2
|
||||
Me.BarButtonItem7.Name = "BarButtonItem7"
|
||||
'
|
||||
'BarButtonItem8
|
||||
'
|
||||
Me.BarButtonItem8.Caption = "Grundeinstellungen"
|
||||
Me.BarButtonItem8.Id = 9
|
||||
Me.BarButtonItem8.ImageOptions.SvgImage = Global.DigitalData.GUIs.ZooFlow.My.Resources.Resources.properties
|
||||
Me.BarButtonItem8.Name = "BarButtonItem8"
|
||||
'
|
||||
'BarButtonItem1
|
||||
'
|
||||
Me.BarButtonItem1.Caption = "Zooflow neustarten"
|
||||
|
||||
@ -2022,7 +2022,7 @@
|
||||
LDIwLDE2LDIweiIgY2xhc3M9IkJsdWUiIC8+DQogIDwvZz4NCjwvc3ZnPgs=
|
||||
</value>
|
||||
</data>
|
||||
<data name="BarButtonItem9.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<data name="BarButtonItemGlobixGE.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIxLjIsIFZlcnNpb249MjEuMi40
|
||||
LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl
|
||||
|
||||
@ -152,10 +152,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
|
||||
@ -214,7 +215,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 ===
|
||||
@ -316,6 +317,16 @@ Public Class frmFlowForm
|
||||
End If
|
||||
|
||||
|
||||
Dim oPMPath = Modules.GetProductPath(ClassModules.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
|
||||
@ -1040,7 +1051,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()
|
||||
|
||||
@ -1052,7 +1063,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)
|
||||
@ -1125,7 +1136,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
|
||||
}
|
||||
|
||||
|
||||
@ -66,6 +66,7 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="BaseClass.vb" />
|
||||
<Compile Include="ECM.vb" />
|
||||
<Compile Include="IDB\Attributes.vb" />
|
||||
<Compile Include="IDB\Database.vb" />
|
||||
<Compile Include="IDB\FileStore.vb" />
|
||||
|
||||
7
Modules.Base/Base/ECM.vb
Normal file
7
Modules.Base/Base/ECM.vb
Normal file
@ -0,0 +1,7 @@
|
||||
Public Class ECM
|
||||
Public Enum Product
|
||||
ProcessManager
|
||||
GlobalIndexer
|
||||
ClipboardWatcher
|
||||
End Enum
|
||||
End Class
|
||||
Loading…
x
Reference in New Issue
Block a user