Zooflow: EDMI Service WIP

This commit is contained in:
Jonathan Jenne
2021-12-02 16:23:00 +01:00
parent 77621193f2
commit 34517ce209
16 changed files with 240 additions and 50 deletions

View File

@@ -135,6 +135,16 @@ Public Class Patterns2
Return oResult
End Function
Public Function ReplaceGlobixValues(pInput As String) As String
Dim oResult = pInput
Dim oGlobixModule = GetModule(Of Modules.Globix)()
Dim oGlobixArgs = GetReplaceMapForModule(oGlobixModule)
oResult = DoReplaceForModule(oResult, oGlobixModule, oGlobixArgs)
Return oResult
End Function
Private Function DoReplaceForModule(pInput As String, pModule As IModule, pArgs As Dictionary(Of String, Object)) As String
Try
pInput = pModule.Replace(pInput, pArgs)
@@ -152,7 +162,12 @@ Public Class Patterns2
SingleOrDefault()
End Function
Private Function GetReplaceMapForModule(pModule As IModule, Optional pPanel As Panel = Nothing, Optional pUser As State.UserState = Nothing, Optional pWMObject As WMObject = Nothing) As Dictionary(Of String, Object)
Private Function GetReplaceMapForModule(pModule As IModule,
Optional pPanel As Panel = Nothing,
Optional pUser As State.UserState = Nothing,
Optional pWMObject As WMObject = Nothing,
Optional pGlobixIndexes As Dictionary(Of String, List(Of String)) = Nothing
) As Dictionary(Of String, Object)
Dim oArgs As New Dictionary(Of String, Object)
If TypeOf pModule Is Modules.Clipboard Then
@@ -199,6 +214,12 @@ Public Class Patterns2
Logger.Error(ex)
End Try
ElseIf TypeOf pModule Is Modules.Globix Then
Try
oArgs.Add(Patterns.Modules.Globix.GBX_VALUE_INDICIES, pGlobixIndexes)
Catch ex As Exception
Logger.Error(ex)
End Try
End If
Return oArgs