ZooFlow: Add special case when no profiles are configured
This commit is contained in:
@@ -23,16 +23,10 @@ Namespace ClipboardWatcher
|
||||
Dim oControlSQL As String = $"SELECT DISTINCT T.* FROM VWCW_PROFILE_REL_CONTROL T, VWCW_USER_PROFILE T1 WHERE T.PROFILE_ID = T1.GUID AND ({oWhereClause})"
|
||||
|
||||
Dim oUserProfiles = Database.GetDatatable("DD_ECM", oProfileSQL, "VWCW_USER_PROFILE", "", "", "DB")
|
||||
|
||||
If oUserProfiles Is Nothing OrElse oUserProfiles.Rows.Count = 0 Then
|
||||
My.Application.ClipboardWatcher.Status = State.EnumStatus.NoProfilesConfigured
|
||||
End If
|
||||
|
||||
Dim oProfileProcesses = Database.GetDatatable("DD_ECM", oProcessSQL, "TBCW_PROFILE_PROCESS", "", "", "DB")
|
||||
Dim oProfileWindows = Database.GetDatatable("DD_ECM", oWindowSQL, "VWCW_PROFILE_REL_WINDOW", "", "", "DB")
|
||||
Dim oProfileControls = Database.GetDatatable("DD_ECM", oControlSQL, "VWCW_PROFILE_REL_CONTROL", "", "", "DB")
|
||||
|
||||
My.Application.ClipboardWatcher.Status = State.EnumStatus.OK
|
||||
My.Application.ClipboardWatcher.UserProfiles = oUserProfiles
|
||||
My.Application.ClipboardWatcher.ProfileProcesses = oProfileProcesses
|
||||
My.Application.ClipboardWatcher.ProfileWindows = oProfileWindows
|
||||
@@ -42,7 +36,6 @@ Namespace ClipboardWatcher
|
||||
Return True
|
||||
|
||||
Catch ex As Exception
|
||||
My.Application.ClipboardWatcher.Status = State.EnumStatus.Exception
|
||||
Logger.Error(ex)
|
||||
|
||||
Return False
|
||||
|
||||
@@ -2,12 +2,6 @@
|
||||
|
||||
Namespace ClipboardWatcher
|
||||
Public Class State
|
||||
Public Enum EnumStatus
|
||||
OK
|
||||
NoProfilesConfigured
|
||||
Exception
|
||||
End Enum
|
||||
|
||||
Public Property UserProfiles As DataTable = Nothing
|
||||
Public Property ProfileProcesses As DataTable = Nothing
|
||||
Public Property ProfileWindows As DataTable = Nothing
|
||||
@@ -20,6 +14,5 @@ Namespace ClipboardWatcher
|
||||
Public Property CurrentClipboardContents As String = String.Empty
|
||||
|
||||
Public Property MonitoringActive As Boolean = False
|
||||
Public Property Status As EnumStatus
|
||||
End Class
|
||||
End Namespace
|
||||
Reference in New Issue
Block a user