Patterns: Improve control values modules, accept list of controls

This commit is contained in:
Jonathan Jenne
2022-06-29 16:25:39 +02:00
parent ef2bb08ddc
commit 960c7ecb27
2 changed files with 52 additions and 6 deletions

View File

@@ -77,6 +77,18 @@ Public Class Patterns2
End Try
End Function
Public Function ReplaceControlValues(pInput As String, pControls As List(Of Control)) As String
Try
Logger.Debug("Replacing Control Values")
Dim oModule = New Modules.Controls(LogConfig)
Return oModule.Replace(pInput, pControls)
Catch ex As Exception
Logger.Warn("Error occurred while replacing Control Values")
Logger.Error(ex)
Return pInput
End Try
End Function
Public Function ReplaceWindreamValues(pInput As String, pWMObject As WMObject) As String
Try
Logger.Debug("Replacing Windream Values")