ClipboardWatcher: corporate identity for frmMatch, show overal match and search results for frmTreeview

This commit is contained in:
Jonathan Jenne
2021-01-11 16:10:57 +01:00
parent 5f147c5d75
commit 526e3669ef
8 changed files with 105 additions and 1811 deletions

View File

@@ -33,6 +33,8 @@ Public Class ProfileFilter
Public Const ERROR_EXECUTING_COUNT_SQL_FOR_DATA_SEARCH = "ERROR_EXECUTING_COUNT_SQL_FOR_DATA_SEARCH"
Public Const ERROR_EXECUTING_COUNT_SQL_FOR_DOC_SEARCH = "ERROR_EXECUTING_COUNT_SQL_FOR_DOC_SEARCH"
Public Const NODE_ROOT = "ROOT"
Public Const PROCESS_NAME_CATCHALL = "_CATCHALL_"
Public ReadOnly Property Profiles As List(Of ProfileData)
@@ -79,7 +81,7 @@ Public Class ProfileFilter
Dim oRootNode As TreeNode = New TreeNode() With {
.Text = $"Suche nach '{ClipboardContents}'",
.Tag = "ROOT",
.Tag = NODE_ROOT,
.ImageIndex = ImageIndex.Root
}
_TreeView.Nodes.Clear()
@@ -460,6 +462,13 @@ Public Class ProfileFilter
Next
For Each oProfile In Profiles
Dim oProfileNode = _ProfileMatch.FindNodeByTag(_TreeView.Nodes, oProfile.Name & "-PROFILE")
Dim oCombinedResults = oProfile.CountDocs + oProfile.CountData
Dim oHasResults = oCombinedResults > 0
oProfileNode.Text = $"{oProfileNode.Text} ({oCombinedResults} Ergebnisse)"
oProfileNode.BackColor = _ProfileMatch.GetMatchColor(oHasResults)
If oProfile.CountData > 0 Or oProfile.CountDocs > 0 Then
oProfiles.Add(oProfile)
_Logger.Info("Profile [{0}] matched in FilterProfilesBySearchResults!", oProfile.Name)