Common: improve file watcher, fix refreshing data after update

This commit is contained in:
Jonathan Jenne
2022-02-08 16:28:24 +01:00
parent 533df59b1f
commit c6e67a967c
16 changed files with 221 additions and 65 deletions

View File

@@ -9,9 +9,10 @@ Public Class ProfileSearches
Private _LogConfig As LogConfig
Private _Logger As Logger
Private _Environment As Environment
Private _Params As ClipboardWatcherParams
Private _Client As Client
Private _ClipboardContents As String
Public Class Search
Public Guid As Integer
Public DataTable As DataTable
@@ -21,11 +22,11 @@ Public Class ProfileSearches
Public SQLCommand As String
End Class
Public Sub New(LogConfig As LogConfig, Environment As Environment, Params As ClipboardWatcherParams)
Public Sub New(LogConfig As LogConfig, Environment As Environment, pClipboardContents As String)
_LogConfig = LogConfig
_Logger = LogConfig.GetLogger()
_Environment = Environment
_Params = Params
_ClipboardContents = pClipboardContents
Try
If _Environment.Service.IsActive = True Then
Try
@@ -84,7 +85,7 @@ Public Class ProfileSearches
oSQL = oRow.Item("SQL_COMMAND")
oSQL = oPatterns.ReplaceUserValues(oSQL, _Environment.User)
oSQL = oPatterns.ReplaceInternalValues(oSQL)
oSQL = oPatterns.ReplaceClipboardContents(oSQL, _Params.ClipboardContents)
oSQL = oPatterns.ReplaceClipboardContents(oSQL, _ClipboardContents)
Dim oConnectionString = ProfileUtils.GetConnectionString(_Environment.Database, oConnectionId)
@@ -150,7 +151,7 @@ Public Class ProfileSearches
oSQL = oRow.Item("SQL_COMMAND")
oSQL = oPatterns.ReplaceUserValues(oSQL, _Environment.User)
oSQL = oPatterns.ReplaceInternalValues(oSQL)
oSQL = oPatterns.ReplaceClipboardContents(oSQL, _Params.ClipboardContents)
oSQL = oPatterns.ReplaceClipboardContents(oSQL, _ClipboardContents)
Dim oConnectionString = ProfileUtils.GetConnectionString(_Environment.Database, oConnectionId)