ZooFlow: Add special case when no profiles are configured
This commit is contained in:
@@ -848,14 +848,17 @@ Public Class frmFlowForm
|
||||
End Sub
|
||||
|
||||
Private Sub Watcher_ClipboardChanged(sender As Object, e As IDataObject)
|
||||
Dim ClipboardContents As String = Clipboard.GetText().Trim()
|
||||
Dim oState = My.Application.ClipboardWatcher
|
||||
|
||||
oState.CurrentClipboardContents = ClipboardContents
|
||||
|
||||
If oState.MonitoringActive = False Then
|
||||
Logger.Info("Clipboard Watcher is not active!")
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If oState.UserProfiles Is Nothing OrElse oState.UserProfiles.Rows.Count = 0 Then
|
||||
If oState.UserProfiles Is Nothing Then
|
||||
Logger.Warn("User Profiles is empty!")
|
||||
Exit Sub
|
||||
End If
|
||||
@@ -876,7 +879,6 @@ Public Class frmFlowForm
|
||||
End If
|
||||
|
||||
Dim oWindowInfo = ClassWindow.GetWindowInfo()
|
||||
Dim ClipboardContents As String = Clipboard.GetText().Trim()
|
||||
|
||||
Try
|
||||
' Tree View zurücksetzen
|
||||
@@ -922,7 +924,6 @@ Public Class frmFlowForm
|
||||
oProfiles = ProfileFilter.LogRemainingProfiles(oProfiles, "CleanUp")
|
||||
|
||||
oState.CurrentProfilesWithResults = oProfiles.ToList()
|
||||
oState.CurrentClipboardContents = ClipboardContents
|
||||
Catch ex As Exception
|
||||
Logger.Error(ex)
|
||||
MsgBox("Fehler beim Auswerten der Profile. Mehr Informationen im Log.", MsgBoxStyle.Critical, Text)
|
||||
@@ -944,10 +945,15 @@ Public Class frmFlowForm
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If oState.CurrentMatchingProfiles.Count = 0 Then
|
||||
If oState.UserProfiles.Rows.Count = 0 Then
|
||||
NotifyIcon.ShowBalloonTip(NOTIFICATION_DELAY, "ClipboardWatcher", "Es wurden keine Profile für Sie gefunden.", ToolTipIcon.Warning)
|
||||
|
||||
ElseIf oState.CurrentMatchingProfiles.Count = 0 Then
|
||||
NotifyIcon.ShowBalloonTip(NOTIFICATION_DELAY, "ClipboardWatcher", "Es wurden keine passenden Profile gefunden.", ToolTipIcon.Warning)
|
||||
|
||||
ElseIf oState.CurrentProfilesWithResults.Count = 0 Then
|
||||
NotifyIcon.ShowBalloonTip(NOTIFICATION_DELAY, "ClipboardWatcher", "Es wurden keine passenden Profile gefunden.", ToolTipIcon.Warning)
|
||||
NotifyIcon.ShowBalloonTip(NOTIFICATION_DELAY, "ClipboardWatcher", "Es wurden weder Dokumente noch Daten gefunden!", ToolTipIcon.Warning)
|
||||
|
||||
Else
|
||||
Dim oProfiles = oState.CurrentProfilesWithResults
|
||||
Dim oEnvironment = My.Application.GetEnvironment()
|
||||
@@ -959,13 +965,16 @@ Public Class frmFlowForm
|
||||
|
||||
Dim oForm As New frmMatch(My.LogConfig, oEnvironment, oParams)
|
||||
oForm.Show()
|
||||
|
||||
End If
|
||||
|
||||
Case HOTKEY_TOGGLE_WATCHER
|
||||
If oState.MonitoringActive = True Then
|
||||
NotifyIcon.ShowBalloonTip(NOTIFICATION_DELAY, "ClipboardWatcher", "Clipboard-Watcher wurde deaktiviert!", ToolTipIcon.Info)
|
||||
|
||||
Else
|
||||
NotifyIcon.ShowBalloonTip(NOTIFICATION_DELAY, "ClipboardWatcher", "Clipboard-Watcher wurde aktiviert!", ToolTipIcon.Info)
|
||||
|
||||
End If
|
||||
|
||||
oState.MonitoringActive = Not oState.MonitoringActive
|
||||
|
||||
Reference in New Issue
Block a user