ClipboardWatcher: Improve Logging, Fix Catchall

This commit is contained in:
Jonathan Jenne 2021-01-08 12:42:10 +01:00
parent 546ca89138
commit b2d9ba0ced
2 changed files with 14 additions and 2 deletions

View File

@ -150,11 +150,14 @@ Public Class ProfileFilter
oProcesses.Add(oProcess) oProcesses.Add(oProcess)
' Set Profile matched ' Set Profile matched
oProfile.IsCatchAll = True
oProfile.IsMatched = True oProfile.IsMatched = True
oProfile.MatchedProcessID = oProcess.Guid oProfile.MatchedProcessID = oProcess.Guid
End If End If
If oIsCatchAll Then
oProfile.IsCatchAll = True
End If
Next Next
If oFilteredProfiles.Count > 0 Then If oFilteredProfiles.Count > 0 Then
oProfile.Processes = oProcesses oProfile.Processes = oProcesses

View File

@ -132,24 +132,33 @@ Public Class frmMatch
Dim oProfileMatch As Boolean = False Dim oProfileMatch As Boolean = False
_Logger.NewBlock($"Profile {oProfile.Name}")
If oProfile.ProfileType = ProfileType.ANY Or oProfile.ProfileType = ProfileType.DOCS_ONLY Then If oProfile.ProfileType = ProfileType.ANY Or oProfile.ProfileType = ProfileType.DOCS_ONLY Then
_Logger.Debug("Docs only or ProfileTypeAny") _Logger.Debug("ProfileType: DOCS_ONLY or ANY")
If oProfile.CountDocs > 0 Then If oProfile.CountDocs > 0 Then
Dim oItem = CreateTile(oProfile, $"{oProfile.CountDocs} Dateien") Dim oItem = CreateTile(oProfile, $"{oProfile.CountDocs} Dateien")
oDocumentGroup.Items.Add(oItem) oDocumentGroup.Items.Add(oItem)
oCreatedTiles += 1 oCreatedTiles += 1
oProfileMatch = True oProfileMatch = True
_Logger.Debug("{0} Doc-Results!", oProfile.CountDocs)
Else Else
_Logger.Debug("NO Doc-Results!") _Logger.Debug("NO Doc-Results!")
End If End If
End If End If
If oProfile.ProfileType = ProfileType.ANY Or oProfile.ProfileType = ProfileType.DATA_ONLY Then If oProfile.ProfileType = ProfileType.ANY Or oProfile.ProfileType = ProfileType.DATA_ONLY Then
_Logger.Debug("ProfileType: DATA_ONLY or ANY")
If oProfile.CountData > 0 Then If oProfile.CountData > 0 Then
Dim oItem = CreateTile(oProfile, $"{oProfile.CountData} Datensätze") Dim oItem = CreateTile(oProfile, $"{oProfile.CountData} Datensätze")
oDataGroup.Items.Add(oItem) oDataGroup.Items.Add(oItem)
oCreatedTiles += 1 oCreatedTiles += 1
oProfileMatch = True oProfileMatch = True
_Logger.Debug("{0} Data-Results!", oProfile.CountData)
Else Else
_Logger.Debug("NO Data-Results!") _Logger.Debug("NO Data-Results!")
End If End If