Patterns: Completeley rework Patterns2 structure

This commit is contained in:
Jonathan Jenne
2021-12-08 12:51:22 +01:00
parent 2a6fd3555b
commit d75272a17f
12 changed files with 160 additions and 234 deletions

View File

@@ -19,15 +19,14 @@ Namespace Modules
MyBase.New(pLogConfig)
End Sub
Public Function Replace(pInput As String, pReplaceMap As Dictionary(Of String, Object)) As String Implements IModule.Replace
Public Function Replace(pInput As String, pPanel As Panel) As String
Dim oResult = pInput
Dim oCounter = 0
Dim oPanel As Panel = pReplaceMap.Item(CTRL_VALUE_PANEL)
While ContainsPattern(oResult, PatternIdentifier)
Try
Dim oControlName As String = GetNextPattern(oResult, PatternIdentifier).Value
Dim oControl As Control = oPanel.Controls.Find(oControlName, False).FirstOrDefault()
Dim oControl As Control = pPanel.Controls.Find(oControlName, False).FirstOrDefault()
If oControl IsNot Nothing Then
Dim oReplaceValue As String