improve profile match debugging
This commit is contained in:
@@ -102,18 +102,22 @@ Public Class frmStart
|
||||
End If
|
||||
|
||||
If DT_USER_PROFILES Is Nothing OrElse DT_USER_PROFILES.Rows.Count = 0 Then
|
||||
Logger.Warn("DT_USER_PROFILES is empty!")
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If DTPROFILE_REL_PROCESS Is Nothing OrElse DTPROFILE_REL_PROCESS.Rows.Count = 0 Then
|
||||
Logger.Warn("DTPROFILE_REL_PROCESS is empty!")
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If DTPROFILE_REL_WINDOW Is Nothing OrElse DTPROFILE_REL_WINDOW.Rows.Count = 0 Then
|
||||
Logger.Warn("DTPROFILE_REL_WINDOW is empty!")
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If DTPROFILE_REL_CONTROL Is Nothing OrElse DTPROFILE_REL_CONTROL.Rows.Count = 0 Then
|
||||
Logger.Warn("DTPROFILE_REL_CONTROL is empty!")
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
@@ -122,7 +126,12 @@ Public Class frmStart
|
||||
Dim oProfileFilter As ClassProfileFilter
|
||||
Dim oFocusedControl As IntPtr = FocusedControlinActiveWindow(Handle)
|
||||
Try
|
||||
oProfileFilter = New ClassProfileFilter(DT_USER_PROFILES, DTPROFILE_REL_PROCESS, DTPROFILE_REL_WINDOW, DTPROFILE_REL_CONTROL)
|
||||
oProfileFilter = New ClassProfileFilter(
|
||||
DT_USER_PROFILES,
|
||||
DTPROFILE_REL_PROCESS,
|
||||
DTPROFILE_REL_WINDOW,
|
||||
DTPROFILE_REL_CONTROL,
|
||||
CurrMatchTreeView)
|
||||
Catch ex As Exception
|
||||
MsgBox("Fehler beim Laden der Profile. Möglicherweise liegt ein Konfigurationsfehler vor.", MsgBoxStyle.Critical, Text)
|
||||
Exit Sub
|
||||
@@ -133,8 +142,6 @@ Public Class frmStart
|
||||
CurrMatchTreeView.ImageList = ImageList1
|
||||
CurrMatchTreeView.SelectedImageIndex = 0
|
||||
|
||||
|
||||
|
||||
oProfiles = oProfileFilter.FilterProfilesByClipboardRegex(oProfiles, ClipboardContents)
|
||||
oProfiles = oProfileFilter.FilterProfilesByProcess(oProfiles, oWindowInfo.ProcessName)
|
||||
oProfiles = oProfileFilter.FilterWindowsByWindowTitleRegex(oProfiles, oWindowInfo.WindowTitle)
|
||||
@@ -158,7 +165,6 @@ Public Class frmStart
|
||||
ElseIf HotKeyID = HOTKEY_TOGGLE_WATCHER Then
|
||||
Change_Monitoring_State()
|
||||
End If
|
||||
|
||||
End Sub
|
||||
Sub CHECK_PROFILE_MATCH()
|
||||
Dim oProfiles = CURRENT_MATCHING_PROFILES
|
||||
|
||||
Reference in New Issue
Block a user