ClipboardWatch: add catchall rule for filtering processes
This commit is contained in:
parent
30cda7c3f5
commit
4a4121d8e6
@ -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_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 ERROR_EXECUTING_COUNT_SQL_FOR_DOC_SEARCH = "ERROR_EXECUTING_COUNT_SQL_FOR_DOC_SEARCH"
|
||||||
|
|
||||||
|
Public Const PROCESS_NAME_CATCHALL = "_CATCHALL_"
|
||||||
|
|
||||||
Public ReadOnly Property Profiles As List(Of ProfileData)
|
Public ReadOnly Property Profiles As List(Of ProfileData)
|
||||||
Get
|
Get
|
||||||
Return _Profiles
|
Return _Profiles
|
||||||
@ -122,6 +124,12 @@ Public Class ProfileFilter
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
Dim oIsMatch = oProcess.ProcessName.ToLower = ProcessName.ToLower
|
Dim oIsMatch = oProcess.ProcessName.ToLower = ProcessName.ToLower
|
||||||
|
|
||||||
|
' Catch-all processname
|
||||||
|
If oProcess.ProcessName.ToLower = PROCESS_NAME_CATCHALL.ToLower Then
|
||||||
|
oIsMatch = True
|
||||||
|
End If
|
||||||
|
|
||||||
Dim oParent = _ProfileMatch.FindNodeByTag(_TreeView.Nodes, oProfile.Name & "-REGEX")
|
Dim oParent = _ProfileMatch.FindNodeByTag(_TreeView.Nodes, oProfile.Name & "-REGEX")
|
||||||
If oParent IsNot Nothing Then
|
If oParent IsNot Nothing Then
|
||||||
Dim oNode = _ProfileMatch.NewProcessNode(oProfile, oProcess, oIsMatch)
|
Dim oNode = _ProfileMatch.NewProcessNode(oProfile, oProcess, oIsMatch)
|
||||||
@ -135,7 +143,6 @@ Public Class ProfileFilter
|
|||||||
oFilteredProfiles.Add(oProfile)
|
oFilteredProfiles.Add(oProfile)
|
||||||
_Logger.Info("FilterProfilesByProcess: Profile {0} matched!", oProfile.Name)
|
_Logger.Info("FilterProfilesByProcess: Profile {0} matched!", oProfile.Name)
|
||||||
|
|
||||||
oProfile.MatchedProcessID = oProcess.Guid
|
|
||||||
oProcess.IsMatched = True
|
oProcess.IsMatched = True
|
||||||
oProcesses.Add(oProcess)
|
oProcesses.Add(oProcess)
|
||||||
oProfile.IsMatched = True
|
oProfile.IsMatched = True
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user