From b3158f7a1e78d0fd01a8de3ac033ba5d48735d25 Mon Sep 17 00:00:00 2001 From: Jonathan Jenne Date: Tue, 29 Oct 2019 17:36:43 +0100 Subject: [PATCH] last minute bugfixing --- .../DD_Clipboard_Watcher.vbproj | 4 ++++ app/DD_Clipboard_Searcher/frmStart.vb | 13 ++++++++++--- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/app/DD_Clipboard_Searcher/DD_Clipboard_Watcher.vbproj b/app/DD_Clipboard_Searcher/DD_Clipboard_Watcher.vbproj index 4a24ccf..315586c 100644 --- a/app/DD_Clipboard_Searcher/DD_Clipboard_Watcher.vbproj +++ b/app/DD_Clipboard_Searcher/DD_Clipboard_Watcher.vbproj @@ -97,6 +97,10 @@ ..\..\..\DDMonorepo\Modules.Config\bin\Debug\DigitalData.Modules.Logging.dll + + False + ..\..\..\DDMonorepo\Modules.Patterns\bin\Debug\DigitalData.Modules.Patterns.dll + ..\..\..\DDMonorepo\Windows\bin\Debug\DigitalData.Modules.Windows.dll diff --git a/app/DD_Clipboard_Searcher/frmStart.vb b/app/DD_Clipboard_Searcher/frmStart.vb index 5eebd3d..67c0652 100644 --- a/app/DD_Clipboard_Searcher/frmStart.vb +++ b/app/DD_Clipboard_Searcher/frmStart.vb @@ -5,6 +5,7 @@ Imports DD_Clipboard_Watcher.ClassConstants Imports DD_Clipboard_Watcher.ClassWindowAPI Imports DigitalData.Modules.ZooFlow Imports DigitalData.Modules.ClipboardWatcher +Imports DigitalData.Modules.Patterns Public Class frmStart Private WithEvents Hotkey As New ClassHotkey(Me) @@ -192,6 +193,9 @@ Public Class frmStart Dim oInvalidDocumentSQL = False Dim oInvalidDataSQL = False + Dim oPatterns As New ClassPatterns(LogConfig) + Dim oEnv = GetEnvironment() + For Each oProfile In oProfiles Dim oResultDocs As Integer = 0 Dim oResultData As Integer = 0 @@ -208,7 +212,9 @@ Public Class frmStart Continue For End If - oCountCommand = clsPatterns.ReplaceAllValues(oCountCommand, USER_PRENAME, USER_SURNAME, USER_SHORTNAME, USER_EMAIL, USER_ID, oProfile.Guid) + oCountCommand = oPatterns.ReplaceUserValues(oCountCommand, oEnv.User) + oCountCommand = oPatterns.ReplaceInternalValues(oCountCommand) + oResultData += Database.GetScalarValue(oCountCommand) Catch ex As Exception Logger.Warn("Invalid SQL Query for Counting Data in Profile {0}: {1}", oProfile.Guid, oCountCommand) @@ -225,7 +231,9 @@ Public Class frmStart Continue For End If - oCountCommand = clsPatterns.ReplaceAllValues(oCountCommand, USER_PRENAME, USER_SURNAME, USER_SHORTNAME, USER_EMAIL, USER_ID, oProfile.Guid) + oCountCommand = oPatterns.ReplaceUserValues(oCountCommand, oEnv.User) + oCountCommand = oPatterns.ReplaceInternalValues(oCountCommand) + oResultDocs += Database.GetScalarValue(oCountCommand) Catch ex As Exception Logger.Warn("Invalid SQL Query for Counting Data in Profile {0}: {1}", oProfile.Guid, oCountCommand) @@ -242,7 +250,6 @@ Public Class frmStart Exit Sub End If - Dim oEnv = GetEnvironment() Dim oParams = New ClipboardWatcherParams() With { .ClipboardContents = CURRENT_CLIPBOARD_CONTENTS, .MatchingProfiles = oProfiles,