monster commit for zoo flow, prepare migration of cw
This commit is contained in:
@@ -19,6 +19,7 @@ Namespace My
|
||||
|
||||
Public Sub App_Startup() Handles Me.Startup
|
||||
Dim oLogConfig As New LogConfig(PathType.AppData)
|
||||
oLogConfig.Debug = True
|
||||
|
||||
' System Config files like Service Url will be saved in %LocalAppdata% so they will remain on the machine
|
||||
Dim oSystemConfigManager As New ConfigManager(Of ClassConfig)(oLogConfig,
|
||||
|
||||
@@ -6,6 +6,7 @@ Imports DigitalData.Modules.Language.Utils
|
||||
Imports DigitalData.Modules.Logging
|
||||
Imports ZooFlow.ClassInitLoader
|
||||
Imports ZooFlow.ClassConstants
|
||||
Imports ZooFlow.State
|
||||
|
||||
Public Class ClassInit
|
||||
Private _MainForm As frmMain
|
||||
@@ -45,6 +46,7 @@ Public Class ClassInit
|
||||
oInit.Run()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Function SetupDatabase() As Boolean
|
||||
If My.SystemConfig.ConnectionString = String.Empty Then
|
||||
Dim oResult = frmConfigDatabase.ShowDialog()
|
||||
@@ -67,15 +69,15 @@ Public Class ClassInit
|
||||
If Not IsNothing(e.Error) Then
|
||||
MsgBox("Beim Initialisieren des Programms ist folgender Fehler aufgetreten:" & vbNewLine & vbNewLine & e.Error.Message, MsgBoxStyle.Critical, _MainForm.Text)
|
||||
Application.ExitThread()
|
||||
Else
|
||||
' Copy back state from MyApplication Helper to My.Application
|
||||
Dim oMyApplication As My.MyApplication = DirectCast(e.Result, My.MyApplication)
|
||||
My.Application.User = oMyApplication.User
|
||||
My.Application.Modules = oMyApplication.Modules
|
||||
My.Application.ModulesActive = oMyApplication.ModulesActive
|
||||
|
||||
RaiseEvent Completed(sender, Nothing)
|
||||
End If
|
||||
|
||||
' Copy back state from MyApplication Helper to My.Application
|
||||
Dim oMyApplication As My.MyApplication = DirectCast(e.Result, My.MyApplication)
|
||||
My.Application.User = oMyApplication.User
|
||||
My.Application.Modules = oMyApplication.Modules
|
||||
My.Application.ModulesActive = oMyApplication.ModulesActive
|
||||
|
||||
RaiseEvent Completed(sender, Nothing)
|
||||
End Sub
|
||||
|
||||
Private Sub CheckConnectivity(MyApplication As My.MyApplication)
|
||||
@@ -94,7 +96,7 @@ Public Class ClassInit
|
||||
|
||||
Private Sub InitializeUser(MyApplication As My.MyApplication)
|
||||
Try
|
||||
Dim oSql As String = My.Common.Queries.FNDD_MODULE_INIT(MyApplication.User.UserName)
|
||||
Dim oSql As String = My.Queries.Common.FNDD_MODULE_INIT(Environment.UserName)
|
||||
Dim oDatatable As DataTable = My.Database.GetDatatable(oSql)
|
||||
|
||||
If oDatatable.Rows.Count <= 1 Then
|
||||
@@ -148,7 +150,7 @@ Public Class ClassInit
|
||||
Dim oName As String = Row.Item("NAME").ToString
|
||||
|
||||
If Not MyApplication.Modules.ContainsKey(ModuleName) Then
|
||||
MyApplication.Modules.Item(ModuleName) = New ClassModuleState()
|
||||
MyApplication.Modules.Item(ModuleName) = New DigitalData.Modules.ZooFlow.State.ModuleState()
|
||||
End If
|
||||
|
||||
Select Case oName
|
||||
|
||||
495
ZooFlow/ClassProfileFilter.vb
Normal file
495
ZooFlow/ClassProfileFilter.vb
Normal file
@@ -0,0 +1,495 @@
|
||||
Imports System.Text.RegularExpressions
|
||||
Imports DigitalData.Modules.Language.Utils
|
||||
Imports DigitalData.Modules.Logging
|
||||
Imports DigitalData.Modules.Windows
|
||||
Imports DigitalData.Modules.ZooFlow.Params
|
||||
|
||||
Public Class ClassProfileFilter
|
||||
Private _ProfileTable As DataTable
|
||||
Private _ProcessTable As DataTable
|
||||
Private _WindowTable As DataTable
|
||||
Private _ControlTable As DataTable
|
||||
Private _Profiles As List(Of ProfileData)
|
||||
Private _DebugData As DebugData
|
||||
Private _Logger As Logger
|
||||
Private _Window As Window
|
||||
|
||||
Private _TreeView As New TreeView
|
||||
|
||||
' TODO: Fill this Class!!!! :D
|
||||
Class DebugData
|
||||
Public ProcessMatch As List(Of String)
|
||||
Public ClipboardMatch As List(Of String)
|
||||
Public WindowMatch As List(Of String)
|
||||
Public WindowRegexMatch As List(Of String)
|
||||
End Class
|
||||
|
||||
Public ReadOnly Property Profiles As List(Of ProfileData)
|
||||
Get
|
||||
Return _Profiles
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property DebugTree As TreeView
|
||||
Get
|
||||
Return _TreeView
|
||||
End Get
|
||||
End Property
|
||||
|
||||
|
||||
Public Sub New(LogConfig As LogConfig, ProfileDatatable As DataTable, ProcessTable As DataTable, WindowDatatable As DataTable, ControlDatatable As DataTable)
|
||||
Try
|
||||
_Logger = LogConfig.GetLogger()
|
||||
_DebugData = New DebugData()
|
||||
_ProfileTable = ProfileDatatable
|
||||
_ProcessTable = ProcessTable
|
||||
_WindowTable = WindowDatatable
|
||||
_ControlTable = ControlDatatable
|
||||
_Profiles = TransformProfiles()
|
||||
_Window = New Window(LogConfig)
|
||||
Catch ex As Exception
|
||||
_Logger.Error(ex)
|
||||
Throw ex
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Public Function ToList() As List(Of ProfileData)
|
||||
Return _Profiles
|
||||
End Function
|
||||
|
||||
Private Function FindNode(ByVal Node As TreeNode, SearchTerm As String)
|
||||
Dim oNode As TreeNode
|
||||
For Each oNode In Node.Nodes
|
||||
If oNode.Text = SearchTerm Then
|
||||
Return oNode
|
||||
End If
|
||||
Next
|
||||
Return Node
|
||||
End Function
|
||||
|
||||
Private Function GetLowestNode(ByVal Node As TreeNode) As TreeNode
|
||||
If Node.GetNodeCount(False) = 1 Then
|
||||
Return GetLowestNode(Node.Nodes.Item(0))
|
||||
Else
|
||||
Return Node
|
||||
End If
|
||||
End Function
|
||||
|
||||
Public Function FilterProfilesByClipboardRegex(Profiles As List(Of ProfileData), ClipboardContents As String) As List(Of ProfileData)
|
||||
Dim oFilteredProfiles As New List(Of ProfileData)
|
||||
For Each oProfile In Profiles
|
||||
_Logger.Debug("Current Profile: {0}", oProfile.Name)
|
||||
|
||||
Try
|
||||
Dim oRegex As New Regex(oProfile.Regex)
|
||||
Dim oMatch = oRegex.Match(ClipboardContents)
|
||||
If oMatch.Success Then
|
||||
_Logger.Debug("FilterProfilesByClipboardRegex: Clipboard Regex Matched: {0}", ClipboardContents)
|
||||
'TODO: Add Debug Data
|
||||
oFilteredProfiles.Add(oProfile)
|
||||
oProfile.IsMatched = True
|
||||
Dim oNode As New TreeNode($"Profile: {oProfile.Name}")
|
||||
oNode.ImageIndex = 0
|
||||
Dim f = New Font("Tahoma", 9, FontStyle.Bold)
|
||||
oNode.NodeFont = f
|
||||
_TreeView.Nodes.Add(oNode)
|
||||
Dim oSubnode As New TreeNode($"MATCH on Global Clipboard Regex: {oProfile.Regex}")
|
||||
oSubnode.ImageIndex = 1
|
||||
oSubnode.Tag = oProfile.Name & "-REGEX"
|
||||
oNode.Nodes.Add(oSubnode)
|
||||
End If
|
||||
Catch ex As Exception
|
||||
_Logger.Warn("Regex '{0}' could not be processed for input '{1}'", oProfile.Regex, ClipboardContents)
|
||||
_Logger.Error(ex)
|
||||
End Try
|
||||
Next
|
||||
|
||||
Return oFilteredProfiles
|
||||
End Function
|
||||
Public Function FilterProfilesByProcess(Profiles As List(Of ProfileData), CurrentProcessName As String) As List(Of ProfileData)
|
||||
Dim oFilteredProfiles As New List(Of ProfileData)
|
||||
Try
|
||||
For Each oProfile In Profiles
|
||||
Dim oGuid = oProfile.Guid
|
||||
|
||||
If oProfile.IsMatched = False Then
|
||||
Continue For
|
||||
End If
|
||||
|
||||
|
||||
Dim oProcesses As New List(Of ProfileData.ProcessData)
|
||||
For Each oProcessDef As ProfileData.ProcessData In oProfile.Processes
|
||||
If oProcessDef.ProfileId <> oGuid Then
|
||||
Continue For
|
||||
End If
|
||||
_Logger.Debug($"FilterProfilesByProcess: Checking Profile: {oProfile.Name} ...")
|
||||
If oProcessDef.ProcessName.ToLower = CurrentProcessName.ToLower Then
|
||||
_Logger.Debug($"Yes...Processname Matched: {oProcessDef.ProcessName}")
|
||||
'oProfile.MATCH_PROCESSNAME = $"Processname Matched: {oProfile.ProcessName}"
|
||||
'TODO: Add Debug Data
|
||||
oFilteredProfiles.Add(oProfile)
|
||||
oProfile.MatchedProcessID = oProcessDef.Guid
|
||||
oProcessDef.IsMatched = True
|
||||
oProcesses.Add(oProcessDef)
|
||||
oProfile.IsMatched = True
|
||||
oProfile.MatchedProcessID = oProcessDef.Guid
|
||||
Dim oParentNode As TreeNode
|
||||
Dim oExit = False
|
||||
For Each oTreeNode As TreeNode In _TreeView.Nodes
|
||||
For Each oNodes As TreeNode In oTreeNode.Nodes
|
||||
If oExit = True Then Exit For
|
||||
If oNodes.Tag = oProfile.Name & "-REGEX" Then
|
||||
oParentNode = oNodes
|
||||
oExit = True
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
Next
|
||||
|
||||
If Not IsNothing(oParentNode) Then
|
||||
Dim oNode As New TreeNode($"MATCH on Process: {oProcessDef.ProcessName}")
|
||||
oNode.ImageIndex = 4
|
||||
oNode.Tag = oProfile.Name & "-PROCESS"
|
||||
oParentNode.Nodes.Add(oNode)
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
If oFilteredProfiles.Count > 0 Then
|
||||
oProfile.Processes = oProcesses
|
||||
End If
|
||||
Next
|
||||
|
||||
Return oFilteredProfiles
|
||||
Catch ex As Exception
|
||||
_Logger.Warn("Unexpected error in FilterProfilesByProcess...")
|
||||
_Logger.Error(ex)
|
||||
End Try
|
||||
|
||||
End Function
|
||||
Public Function FilterWindowsByWindowTitleRegex(Profiles As List(Of ProfileData), WindowTitle As String) As List(Of ProfileData)
|
||||
Dim oProfiles As New List(Of ProfileData)
|
||||
|
||||
For Each oProfile As ProfileData In Profiles
|
||||
_Logger.Debug("Checking WindowDefinition for profile: {0}...", oProfile.Name)
|
||||
If oProfile.IsMatched = False Then Continue For
|
||||
Dim oWindows As New List(Of ProfileData.WindowData)
|
||||
|
||||
For Each oWindowDef As ProfileData.WindowData In oProfile.Windows
|
||||
If oWindowDef.WindowProcessID <> oProfile.MatchedProcessID Then Continue For
|
||||
Try
|
||||
If oWindowDef.Regex = String.Empty Then
|
||||
oProfile.MatchedWindowID = oWindowDef.Guid
|
||||
oWindowDef.IsMatched = True
|
||||
oWindows.Add(oWindowDef)
|
||||
Exit For
|
||||
End If
|
||||
|
||||
Dim oRegex As New Regex(oWindowDef.Regex)
|
||||
Dim oMatch = oRegex.Match(WindowTitle)
|
||||
|
||||
If oMatch.Success Then
|
||||
_Logger.Debug("MATCH on WindowTitle: {0}", WindowTitle)
|
||||
'TODO: Add Debug Data
|
||||
oProfile.MatchedWindowID = oWindowDef.Guid
|
||||
oWindowDef.IsMatched = True
|
||||
oWindows.Add(oWindowDef)
|
||||
Dim olowestNode As TreeNode = Node_Get_Lowest_Node(oProfile.Name & "-REGEX")
|
||||
If Not IsNothing(olowestNode) Then
|
||||
Dim oNode As New TreeNode($"MATCH on WindowTitle: [{WindowTitle}]")
|
||||
oNode.ImageIndex = 3
|
||||
oNode.Tag = oProfile.Name & "-WINDOW"
|
||||
olowestNode.Nodes.Add(oNode)
|
||||
End If
|
||||
Exit For
|
||||
End If
|
||||
Catch ex As Exception
|
||||
_Logger.Warn("Regex '{0}' could not be processed for input '{1}'", oWindowDef.Regex, WindowTitle)
|
||||
_Logger.Error(ex)
|
||||
End Try
|
||||
Next
|
||||
|
||||
If oWindows.Count > 0 Then
|
||||
oProfile.Windows = oWindows
|
||||
oProfile.IsMatched = True
|
||||
oProfiles.Add(oProfile)
|
||||
End If
|
||||
Next
|
||||
|
||||
Return oProfiles
|
||||
End Function
|
||||
|
||||
Public Function FilterWindowsByWindowClipboardRegex(Profiles As List(Of ProfileData), ClipboardContents As String) As List(Of ProfileData)
|
||||
Dim oProfiles As New List(Of ProfileData)
|
||||
|
||||
For Each oProfile As ProfileData In Profiles
|
||||
_Logger.Debug("Current Profile: {0}", oProfile.Name)
|
||||
|
||||
Dim oWindows As New List(Of ProfileData.WindowData)
|
||||
|
||||
For Each w As ProfileData.WindowData In oProfile.Windows
|
||||
Try
|
||||
If w.Regex = String.Empty Then
|
||||
oWindows.Add(w)
|
||||
End If
|
||||
|
||||
Dim oRegex As New Regex(w.Regex)
|
||||
Dim oMatch = oRegex.Match(ClipboardContents)
|
||||
|
||||
If oMatch.Success Then
|
||||
_Logger.Debug("Window Clipboard Regex Matched: {0}", ClipboardContents)
|
||||
Dim oResult As TreeNode
|
||||
For Each oTreeNode In _TreeView.Nodes
|
||||
If Not IsNothing(oResult) Then Exit For
|
||||
If oTreeNode.Tag = oProfile.Name & "-REGEX" Then
|
||||
oResult = oTreeNode
|
||||
End If
|
||||
|
||||
|
||||
Next
|
||||
If Not IsNothing(oResult) Then
|
||||
Dim oNode As New TreeNode($"MATCH on WINDOW Clipboard Regex: [{w.Regex}]")
|
||||
oNode.ImageIndex = 2
|
||||
oNode.Tag = oProfile.Name & "-WINDOW_REGEX"
|
||||
Dim olowestNode As TreeNode = GetLowestNode(oResult)
|
||||
olowestNode.Nodes.Add(oNode)
|
||||
End If
|
||||
|
||||
oWindows.Add(w)
|
||||
|
||||
|
||||
End If
|
||||
Catch ex As Exception
|
||||
_Logger.Warn("Regex '{0}' could not be processed for input '{1}'", w.Regex, ClipboardContents)
|
||||
_Logger.Error(ex)
|
||||
End Try
|
||||
Next
|
||||
|
||||
If oWindows.Count > 0 Then
|
||||
oProfile.Windows = oWindows
|
||||
oProfiles.Add(oProfile)
|
||||
End If
|
||||
Next
|
||||
|
||||
Return oProfiles
|
||||
End Function
|
||||
|
||||
Public Function FilterProfilesByFocusedControl(Profiles As List(Of ProfileData), ClipboardContents As String, ControlFocusresult As String) As List(Of ProfileData)
|
||||
Dim oWindow As Window.WindowInfo
|
||||
Dim oFocusedControl As Window.WindowInfo
|
||||
Dim oFocusedControlName As String = String.Empty
|
||||
|
||||
Try
|
||||
oWindow = _Window.GetWindowInfo()
|
||||
oFocusedControl = _Window.GetFocusedControl(oWindow.hWnd)
|
||||
|
||||
If oFocusedControl Is Nothing Then
|
||||
_Logger.Info("Could not get FocusedControl in Window (Old method) {0}", oWindow.WindowTitle)
|
||||
oFocusedControlName = String.Empty
|
||||
Else
|
||||
oFocusedControlName = oFocusedControl.ControlName
|
||||
End If
|
||||
Catch ex As Exception
|
||||
_Logger.Warn("Error while getting Focused control (Old method)")
|
||||
_Logger.Error(ex)
|
||||
oFocusedControlName = String.Empty
|
||||
End Try
|
||||
|
||||
Dim oFilteredProfiles As New List(Of ProfileData)
|
||||
|
||||
For Each oProfileMatchedSofar In Profiles
|
||||
If oProfileMatchedSofar.IsMatched = False Then Continue For
|
||||
|
||||
_Logger.Debug("Checking ControlDefiniotion on profile: {0}", oProfileMatchedSofar.Name)
|
||||
If oProfileMatchedSofar.Controls.Count = 0 Then
|
||||
oFilteredProfiles.Add(oProfileMatchedSofar)
|
||||
|
||||
Dim oNode As New TreeNode($"No Controls configured!")
|
||||
oNode.ImageIndex = 2
|
||||
oNode.ForeColor = Color.Blue
|
||||
oNode.Tag = oProfileMatchedSofar.Name & "-NOCONTROLCONFIG"
|
||||
Dim f = New Font("Tahoma", 10, FontStyle.Bold)
|
||||
oNode.NodeFont = f
|
||||
_TreeView.Nodes.Add(oNode)
|
||||
Continue For
|
||||
End If
|
||||
|
||||
Dim oControls As New List(Of ProfileData.ControlData)
|
||||
|
||||
For Each oControlDefinition In oProfileMatchedSofar.Controls
|
||||
Try
|
||||
If oControlDefinition.WindowId <> oProfileMatchedSofar.MatchedWindowID Then Continue For
|
||||
_Logger.Debug($"Working on ControlDefinition: {oControlDefinition.Guid}-{oControlDefinition.ControlName}...")
|
||||
If oControlDefinition.Regex = String.Empty Then
|
||||
oProfileMatchedSofar.MatchedControlID = oControlDefinition.Guid
|
||||
oControlDefinition.IsMatched = True
|
||||
oControls.Add(oControlDefinition)
|
||||
Exit For
|
||||
End If
|
||||
'Dim oResult As TreeNode
|
||||
'For Each oTreeNode In CurrMatchTreeView.Nodes
|
||||
' oResult = NodeFind(oTreeNode, $"Global Clipboard Regex Matched [{oProfile.Regex}]")
|
||||
'Next
|
||||
'Dim oNode As TreeNode
|
||||
Dim oNodeCaption As String
|
||||
'Dim oAddNode As Boolean = False
|
||||
Dim oRegex As New Regex(oControlDefinition.Regex)
|
||||
|
||||
Dim oFocusedControlResult As String = ""
|
||||
|
||||
If oControlDefinition.AutomationId <> String.Empty And oControlDefinition.ControlName = String.Empty Then
|
||||
_Logger.Debug($"AutomationID should be used...")
|
||||
If Not IsNothing(ControlFocusresult) Then
|
||||
If ControlFocusresult <> String.Empty Then
|
||||
_Logger.Debug($"AutomationID will be used...")
|
||||
oFocusedControlResult = ControlFocusresult
|
||||
End If
|
||||
End If
|
||||
ElseIf oControlDefinition.AutomationId = String.Empty And oControlDefinition.ControlName <> String.Empty Then
|
||||
_Logger.Debug($"ControlName should be used...")
|
||||
If Not IsNothing(oFocusedControlName) Then
|
||||
If oFocusedControlName <> String.Empty Then
|
||||
_Logger.Debug($"ControlName will be used...")
|
||||
oFocusedControlResult = oFocusedControlName
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
If oFocusedControlResult <> String.Empty Then
|
||||
Dim oControlRegex As New Regex(oControlDefinition.Regex)
|
||||
Dim oControlMatch = oRegex.Match(oFocusedControlResult)
|
||||
|
||||
If oControlMatch.Success Then
|
||||
_Logger.Debug($"MATCH on Focused Control [{oFocusedControlResult}] with Regex [{oControlDefinition.Regex}]")
|
||||
oProfileMatchedSofar.IsMatched = True
|
||||
oProfileMatchedSofar.MatchedControlID = oControlDefinition.Guid
|
||||
oControlDefinition.IsMatched = True
|
||||
oControls.Add(oControlDefinition)
|
||||
Dim olowestNode As TreeNode = Node_Get_Lowest_Node(oProfileMatchedSofar.Name & "-REGEX")
|
||||
If Not IsNothing(olowestNode) Then
|
||||
Dim oNode As New TreeNode($"MATCH on Focused Control [{oFocusedControlResult}] with Regex [{oControlDefinition.Regex}]")
|
||||
oNode.ImageIndex = 2
|
||||
oNode.Tag = oProfileMatchedSofar.Name & "-CONTROL"
|
||||
olowestNode.Nodes.Add(oNode)
|
||||
End If
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
Catch ex As Exception
|
||||
_Logger.Warn("Regex '{0}' could not be processed for input '{1}'", oControlDefinition.Regex, oFocusedControlName)
|
||||
_Logger.Error(ex)
|
||||
End Try
|
||||
Next
|
||||
|
||||
If oControls.Count > 0 Then
|
||||
oProfileMatchedSofar.Controls = oControls
|
||||
oFilteredProfiles.Add(oProfileMatchedSofar)
|
||||
Else
|
||||
Dim olowestNode As TreeNode = Node_Get_Lowest_Node(oProfileMatchedSofar.Name & "-REGEX")
|
||||
If Not IsNothing(olowestNode) Then
|
||||
Dim oNode As New TreeNode($"NO MATCHES on Focused Control, Please check the Config")
|
||||
oNode.ImageIndex = 2
|
||||
oNode.Tag = oProfileMatchedSofar.Name & "-CONTROLNoMatch"
|
||||
olowestNode.Nodes.Add(oNode)
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
|
||||
Return oFilteredProfiles
|
||||
End Function
|
||||
Private Function Node_Get_Lowest_Node(NodeTag As String) As TreeNode
|
||||
Dim oExit = False
|
||||
Dim oParentNode As TreeNode
|
||||
For Each oTreeNode As TreeNode In _TreeView.Nodes
|
||||
For Each oNodes As TreeNode In oTreeNode.Nodes
|
||||
If oExit = True Then Exit For
|
||||
If oNodes.Tag = NodeTag Then
|
||||
oParentNode = oNodes
|
||||
oExit = True
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
Next
|
||||
Dim olowestNode As TreeNode = GetLowestNode(oParentNode)
|
||||
|
||||
Return olowestNode
|
||||
End Function
|
||||
Public Function ClearNotMatchedProfiles(Profiles As List(Of ProfileData)) As List(Of ProfileData)
|
||||
Dim oFilteredProfiles As New List(Of ProfileData)
|
||||
For Each oProfile In Profiles
|
||||
If oProfile.IsMatched Then
|
||||
oFilteredProfiles.Add(oProfile)
|
||||
End If
|
||||
Next
|
||||
Return oFilteredProfiles
|
||||
End Function
|
||||
Private Function TransformProfiles() As List(Of ProfileData)
|
||||
Dim oList As New List(Of ProfileData)
|
||||
|
||||
For Each oRow As DataRow In _ProfileTable.Rows
|
||||
Dim oProfileId = oRow.Item("GUID")
|
||||
Dim oProcessList As List(Of ProfileData.ProcessData) = TransformProcesses(oProfileId, _ProcessTable)
|
||||
Dim oWindowList As List(Of ProfileData.WindowData) = TransformWindows(oProfileId, _WindowTable)
|
||||
Dim oControlList As List(Of ProfileData.ControlData) = TransformControls(oProfileId, _ControlTable)
|
||||
|
||||
oList.Add(New ProfileData() With {
|
||||
.Guid = oRow.Item("GUID"),
|
||||
.Regex = NotNull(oRow.Item("REGEX_EXPRESSION"), String.Empty),
|
||||
.Name = NotNull(oRow.Item("NAME"), String.Empty),
|
||||
.Comment = NotNull(oRow.Item("COMMENT"), String.Empty),
|
||||
.ProfileType = NotNull(oRow.Item("PROFILE_TYPE"), String.Empty),
|
||||
.Processes = oProcessList,
|
||||
.Windows = oWindowList,
|
||||
.Controls = oControlList
|
||||
})
|
||||
Next
|
||||
|
||||
Return oList
|
||||
End Function
|
||||
|
||||
Private Function TransformControls(ProfileId As Integer, ControlDatatable As DataTable) As List(Of ProfileData.ControlData)
|
||||
Dim oControlList As New List(Of ProfileData.ControlData)
|
||||
|
||||
For Each oRow As DataRow In ControlDatatable.Rows
|
||||
If oRow.Item("PROFILE_ID") = ProfileId Then
|
||||
oControlList.Add(New ProfileData.ControlData() With {
|
||||
.Guid = oRow.Item("GUID"),
|
||||
.Description = NotNull(oRow.Item("DESCRIPTION"), String.Empty),
|
||||
.Regex = NotNull(oRow.Item("REGEX"), String.Empty),
|
||||
.AutomationId = NotNull(oRow.Item("AUTOMATION_ID"), String.Empty),
|
||||
.WindowId = oRow.Item("WINDOW_ID")
|
||||
})
|
||||
End If
|
||||
Next
|
||||
|
||||
Return oControlList
|
||||
End Function
|
||||
Private Function TransformProcesses(ProfileId As Integer, ProcessDatatable As DataTable) As List(Of ProfileData.ProcessData)
|
||||
Dim oProcessList As New List(Of ProfileData.ProcessData)
|
||||
|
||||
For Each oRow As DataRow In ProcessDatatable.Rows
|
||||
oProcessList.Add(New ProfileData.ProcessData() With {
|
||||
.Guid = oRow.Item("GUID"),
|
||||
.ProfileId = oRow.Item("PROFILE_ID"),
|
||||
.ProcessName = NotNull(oRow.Item("PROC_NAME"), String.Empty)
|
||||
})
|
||||
|
||||
Next
|
||||
|
||||
Return oProcessList
|
||||
End Function
|
||||
Private Function TransformWindows(ProfileId As Integer, WindowDatatable As DataTable) As List(Of ProfileData.WindowData)
|
||||
Dim oWindowList As New List(Of ProfileData.WindowData)
|
||||
|
||||
For Each oRow As DataRow In WindowDatatable.Rows
|
||||
oWindowList.Add(New ProfileData.WindowData() With {
|
||||
.Guid = oRow.Item("GUID"),
|
||||
.WindowProcessID = oRow.Item("PROCESS_ID"),
|
||||
.Title = NotNull(oRow.Item("DESCRIPTION"), String.Empty),
|
||||
.Regex = NotNull(oRow.Item("REGEX"), String.Empty),
|
||||
.Sequence = NotNull(oRow.Item("SEQUENCE"), 0)
|
||||
})
|
||||
Next
|
||||
|
||||
Return oWindowList
|
||||
End Function
|
||||
End Class
|
||||
8
ZooFlow/ClipboardWatcher/State.vb
Normal file
8
ZooFlow/ClipboardWatcher/State.vb
Normal file
@@ -0,0 +1,8 @@
|
||||
Namespace ClipboardWatcher
|
||||
Public Class State
|
||||
Public UserProfiles As DataTable
|
||||
Public ProfileProcesses As DataTable
|
||||
Public ProfileWindows As DataTable
|
||||
Public ProfileControls As DataTable
|
||||
End Class
|
||||
End Namespace
|
||||
@@ -1,3 +0,0 @@
|
||||
Public Class ClassCommon
|
||||
Public Property Queries As New ClassCommonQueries
|
||||
End Class
|
||||
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
This file is automatically generated by Visual Studio .Net. It is
|
||||
used to store generic object data source configuration information.
|
||||
Renaming the file extension or editing the content of this file may
|
||||
cause the file to be unrecognizable by the program.
|
||||
-->
|
||||
<GenericObjectDataSource DisplayName="ClassUserState" Version="1.0" xmlns="urn:schemas-microsoft-com:xml-msdatasource">
|
||||
<TypeInfo>ZooFlow.State.ClassUserState, ZooFlow, Version=0.0.1.0, Culture=neutral, PublicKeyToken=null</TypeInfo>
|
||||
</GenericObjectDataSource>
|
||||
@@ -1,8 +1,9 @@
|
||||
DevExpress.XtraEditors.PictureEdit, DevExpress.XtraEditors.v18.1, Version=18.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
||||
DevExpress.XtraBars.Ribbon.RibbonControl, DevExpress.XtraBars.v18.1, Version=18.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
||||
DevExpress.XtraLayout.LayoutControl, DevExpress.XtraLayout.v18.1, Version=18.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
||||
DevExpress.XtraEditors.ComboBoxEdit, DevExpress.XtraEditors.v18.1, Version=18.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
||||
DevExpress.XtraEditors.TextEdit, DevExpress.XtraEditors.v18.1, Version=18.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
||||
DevExpress.XtraEditors.ProgressBarControl, DevExpress.XtraEditors.v18.1, Version=18.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
||||
DevExpress.XtraEditors.CheckEdit, DevExpress.XtraEditors.v18.1, Version=18.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
||||
DevExpress.XtraEditors.ButtonEdit, DevExpress.XtraEditors.v18.1, Version=18.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
||||
DevExpress.XtraEditors.ComboBoxEdit, DevExpress.XtraEditors.v18.1, Version=18.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
||||
DevExpress.XtraEditors.ProgressBarControl, DevExpress.XtraEditors.v18.1, Version=18.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
||||
DevExpress.XtraLayout.LayoutControl, DevExpress.XtraLayout.v18.1, Version=18.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
||||
DevExpress.XtraEditors.CheckEdit, DevExpress.XtraEditors.v18.1, Version=18.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
||||
DevExpress.XtraBars.Ribbon.RibbonControl, DevExpress.XtraBars.v18.1, Version=18.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
||||
DevExpress.XtraEditors.PictureEdit, DevExpress.XtraEditors.v18.1, Version=18.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
||||
DevExpress.XtraGrid.GridControl, DevExpress.XtraGrid.v18.1, Version=18.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
Imports DigitalData.Modules.Config
|
||||
Imports DigitalData.Modules.Logging
|
||||
Imports DigitalData.Modules.Database
|
||||
Imports DigitalData.Modules.ZooFlow
|
||||
Imports ZooFlow.State
|
||||
|
||||
Namespace My
|
||||
''' <summary>
|
||||
@@ -26,21 +28,19 @@ Namespace My
|
||||
Property LogConfig As LogConfig
|
||||
Property MainForm As frmMain
|
||||
Property Database As MSSQLServer
|
||||
|
||||
Property Common As New ClassCommon
|
||||
Property Queries As New ClassQueries
|
||||
End Module
|
||||
|
||||
''' <summary>
|
||||
''' Extends the My.Application Namespace to hold Application State
|
||||
''' Example: My.Application.User
|
||||
''' </summary>
|
||||
Partial Class MyApplication
|
||||
' User Config
|
||||
Public User As New ClassUserState()
|
||||
Public Service As New ClassServiceState()
|
||||
Public Modules As New Dictionary(Of String, ClassModuleState)
|
||||
Public ModulesActive As New List(Of String)
|
||||
Partial Friend Class MyApplication
|
||||
Public Property User As New State.UserState
|
||||
Public Property Service As New State.ServiceState
|
||||
Public Property Modules As New Dictionary(Of String, State.ModuleState)
|
||||
Public Property ModulesActive As New List(Of String)
|
||||
Public Property ClipboardWatcher As New ClipboardWatcher.State
|
||||
End Class
|
||||
End Namespace
|
||||
|
||||
|
||||
|
||||
17
ZooFlow/Queries/ClassClipboardWatcherQueries.vb
Normal file
17
ZooFlow/Queries/ClassClipboardWatcherQueries.vb
Normal file
@@ -0,0 +1,17 @@
|
||||
Public Class ClassClipboardWatcherQueries
|
||||
Public Function VWCW_USER_PROFILE(UserId As Integer) As String
|
||||
Return $"SELECT DISTINCT GUID, NAME, REGEX_EXPRESSION, COMMENT, PROC_NAME, PROFILE_TYPE FROM VWCW_USER_PROFILE WHERE USER_ID = {UserId} OR GROUP_ID IN (SELECT DISTINCT GUID FROM TBDD_GROUPS WHERE GUID IN (SELECT GROUP_ID FROM TBDD_GROUPS_USER WHERE USER_ID = {0}))"
|
||||
End Function
|
||||
|
||||
Public Function TBCW_PROFILE_PROCESS(UserId As Integer) As String
|
||||
Return $"SELECT T.* FROM TBCW_PROFILE_PROCESS T, VWCW_USER_PROFILE T1 WHERE T.PROFILE_ID = T1.GUID AND T1.USER_ID = {UserId}"
|
||||
End Function
|
||||
|
||||
Public Function VWCW_PROFILE_REL_WINDOW(UserId As Integer) As String
|
||||
Return $"SELECT * FROM VWCW_PROFILE_REL_WINDOW WHERE USER_ID = {UserId}"
|
||||
End Function
|
||||
|
||||
Public Function VWCW_PROFILE_REL_CONTROL(UserId As Integer) As String
|
||||
Return $"SELECT * FROM VWCW_PROFILE_REL_CONTROL WHERE USER_ID = {UserId}"
|
||||
End Function
|
||||
End Class
|
||||
4
ZooFlow/Queries/ClassQueries.vb
Normal file
4
ZooFlow/Queries/ClassQueries.vb
Normal file
@@ -0,0 +1,4 @@
|
||||
Public Class ClassQueries
|
||||
Public Property Common As New ClassCommonQueries
|
||||
Public Property ClipboardWatcher As New ClassClipboardWatcherQueries
|
||||
End Class
|
||||
@@ -1,5 +0,0 @@
|
||||
Public Class ClassModuleState
|
||||
Public HasAccess As Boolean
|
||||
Public IsAdmin As Boolean
|
||||
Public LoggedIn As Integer
|
||||
End Class
|
||||
@@ -1,4 +0,0 @@
|
||||
Public Class ClassServiceState
|
||||
Public Property Online As Boolean = True
|
||||
Public Property LastChecked As DateTime = DateTime.Now
|
||||
End Class
|
||||
@@ -1,25 +0,0 @@
|
||||
Imports System.Threading
|
||||
|
||||
''' <summary>
|
||||
''' Helper Class to hold User State
|
||||
''' </summary>
|
||||
Public Class ClassUserState
|
||||
Public UserId As Integer
|
||||
Public UserName As String
|
||||
Public Surname As String
|
||||
Public GivenName As String
|
||||
Public ShortName As String
|
||||
Public Email As String
|
||||
Public MachineName As String
|
||||
Public DateFormat As String
|
||||
Public Language As String
|
||||
|
||||
''' <summary>
|
||||
''' Initialize user object with values that can be read from the environment
|
||||
''' </summary>
|
||||
Public Sub New()
|
||||
Language = Thread.CurrentThread.CurrentCulture.Name
|
||||
UserName = Environment.UserName
|
||||
MachineName = Environment.MachineName
|
||||
End Sub
|
||||
End Class
|
||||
@@ -51,9 +51,11 @@
|
||||
<Reference Include="DevExpress.XtraBars.v18.1" />
|
||||
<Reference Include="DevExpress.Sparkline.v18.1.Core" />
|
||||
<Reference Include="DevExpress.XtraEditors.v18.1" />
|
||||
<Reference Include="DevExpress.XtraGrid.v18.1, Version=18.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
|
||||
<Reference Include="DevExpress.XtraLayout.v18.1, Version=18.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
|
||||
<Reference Include="DevExpress.XtraPrinting.v18.1, Version=18.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
|
||||
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\NLog.4.5.11\lib\net45\NLog.dll</HintPath>
|
||||
<HintPath>..\packages\NLog.4.6.7\lib\net45\NLog.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Configuration" />
|
||||
@@ -87,8 +89,10 @@
|
||||
<Compile Include="Base\BaseClass.vb" />
|
||||
<Compile Include="ClassClipboardWatcher.vb" />
|
||||
<Compile Include="ClassInit.vb" />
|
||||
<Compile Include="Common\ClassCommon.vb" />
|
||||
<Compile Include="Common\ClassCommonQueries.vb" />
|
||||
<Compile Include="ClassProfileFilter.vb" />
|
||||
<Compile Include="ClipboardWatcher\State.vb" />
|
||||
<Compile Include="Queries\ClassClipboardWatcherQueries.vb" />
|
||||
<Compile Include="Queries\ClassCommonQueries.vb" />
|
||||
<Compile Include="Config\ClassConfig.vb" />
|
||||
<Compile Include="ClassConstants.vb" />
|
||||
<Compile Include="ClassEnvironment.vb" />
|
||||
@@ -132,9 +136,7 @@
|
||||
</Compile>
|
||||
<Compile Include="My Project\AssemblyInfo.vb" />
|
||||
<Compile Include="MyApplication.vb" />
|
||||
<Compile Include="State\ClassModuleState.vb" />
|
||||
<Compile Include="State\ClassServiceState.vb" />
|
||||
<Compile Include="State\ClassUserState.vb" />
|
||||
<Compile Include="Queries\ClassQueries.vb" />
|
||||
<EmbeddedResource Include="frmConfigDatabase.resx">
|
||||
<DependentUpon>frmConfigDatabase.vb</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
@@ -162,6 +164,7 @@
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
<DesignTime>True</DesignTime>
|
||||
</Compile>
|
||||
<None Include="My Project\DataSources\ZooFlow.State.ClassUserState.datasource" />
|
||||
<None Include="My Project\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<LastGenOutput>Settings.Designer.vb</LastGenOutput>
|
||||
@@ -206,7 +209,20 @@
|
||||
<Project>{903B2D7D-3B80-4BE9-8713-7447B704E1B0}</Project>
|
||||
<Name>Logging</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Modules\ZooFlow\ZooFlow.vbproj">
|
||||
<Project>{81cac44f-3711-4c8f-ae98-e02a7448782a}</Project>
|
||||
<Name>ZooFlow</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Products.ClipboardWatcher\ClipboardWatcher.vbproj">
|
||||
<Project>{1fba063d-60a5-4fc8-a529-a3d1ecfd640c}</Project>
|
||||
<Name>ClipboardWatcher</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Windows\Windows.vbproj">
|
||||
<Project>{5efaef9b-90b9-4f05-9f70-f79ad77fff86}</Project>
|
||||
<Name>Windows</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup />
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
|
||||
30
ZooFlow/frmMain.Designer.vb
generated
30
ZooFlow/frmMain.Designer.vb
generated
@@ -31,6 +31,7 @@
|
||||
Me.ApplicationMenu = New DevExpress.XtraBars.Ribbon.ApplicationMenu(Me.components)
|
||||
Me.ButtonSettings = New DevExpress.XtraBars.BarButtonItem()
|
||||
Me.ButtonExit = New DevExpress.XtraBars.BarButtonItem()
|
||||
Me.SkinDropDownButtonItem1 = New DevExpress.XtraBars.SkinDropDownButtonItem()
|
||||
Me.ribbonPage1 = New DevExpress.XtraBars.Ribbon.RibbonPage()
|
||||
Me.ribbonPageGroup1 = New DevExpress.XtraBars.Ribbon.RibbonPageGroup()
|
||||
Me.NotifyIconMain = New System.Windows.Forms.NotifyIcon(Me.components)
|
||||
@@ -42,7 +43,8 @@
|
||||
Me.ToolStripSeparator1 = New System.Windows.Forms.ToolStripSeparator()
|
||||
Me.BeendenToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.ToastNotificationsManager = New DevExpress.XtraBars.ToastNotifications.ToastNotificationsManager(Me.components)
|
||||
Me.SkinDropDownButtonItem1 = New DevExpress.XtraBars.SkinDropDownButtonItem()
|
||||
Me.TimerRefreshData = New System.Windows.Forms.Timer(Me.components)
|
||||
Me.ImageListDebugTree = New System.Windows.Forms.ImageList(Me.components)
|
||||
CType(Me.ribbonControl1, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
CType(Me.ApplicationMenu, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.ContextMenuStripMain.SuspendLayout()
|
||||
@@ -76,16 +78,21 @@
|
||||
'
|
||||
Me.ButtonSettings.Caption = "Einstellungen"
|
||||
Me.ButtonSettings.Id = 1
|
||||
Me.ButtonSettings.ImageOptions.Image = CType(resources.GetObject("BarButtonItem1.ImageOptions.Image"), System.Drawing.Image)
|
||||
Me.ButtonSettings.ImageOptions.Image = CType(resources.GetObject("ButtonSettings.ImageOptions.Image"), System.Drawing.Image)
|
||||
Me.ButtonSettings.Name = "ButtonSettings"
|
||||
'
|
||||
'ButtonExit
|
||||
'
|
||||
Me.ButtonExit.Caption = "Beenden"
|
||||
Me.ButtonExit.Id = 2
|
||||
Me.ButtonExit.ImageOptions.Image = CType(resources.GetObject("BarButtonItem2.ImageOptions.Image"), System.Drawing.Image)
|
||||
Me.ButtonExit.ImageOptions.Image = CType(resources.GetObject("ButtonExit.ImageOptions.Image"), System.Drawing.Image)
|
||||
Me.ButtonExit.Name = "ButtonExit"
|
||||
'
|
||||
'SkinDropDownButtonItem1
|
||||
'
|
||||
Me.SkinDropDownButtonItem1.Id = 3
|
||||
Me.SkinDropDownButtonItem1.Name = "SkinDropDownButtonItem1"
|
||||
'
|
||||
'ribbonPage1
|
||||
'
|
||||
Me.ribbonPage1.Groups.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPageGroup() {Me.ribbonPageGroup1})
|
||||
@@ -152,10 +159,19 @@
|
||||
"ncididunt ut labore et dolore magna aliqua.", "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor i" &
|
||||
"ncididunt ut labore et dolore magna aliqua.", DevExpress.XtraBars.ToastNotifications.ToastNotificationTemplate.Text01)})
|
||||
'
|
||||
'SkinDropDownButtonItem1
|
||||
'TimerRefreshData
|
||||
'
|
||||
Me.SkinDropDownButtonItem1.Id = 3
|
||||
Me.SkinDropDownButtonItem1.Name = "SkinDropDownButtonItem1"
|
||||
Me.TimerRefreshData.Interval = 5000
|
||||
'
|
||||
'ImageListDebugTree
|
||||
'
|
||||
Me.ImageListDebugTree.ImageStream = CType(resources.GetObject("ImageListDebugTree.ImageStream"), System.Windows.Forms.ImageListStreamer)
|
||||
Me.ImageListDebugTree.TransparentColor = System.Drawing.Color.Transparent
|
||||
Me.ImageListDebugTree.Images.SetKeyName(0, "WorkItem_32xMD.png")
|
||||
Me.ImageListDebugTree.Images.SetKeyName(1, "key_16xLG.png")
|
||||
Me.ImageListDebugTree.Images.SetKeyName(2, "ResultstoFile_9946.png")
|
||||
Me.ImageListDebugTree.Images.SetKeyName(3, "WindowsForm_817.ico")
|
||||
Me.ImageListDebugTree.Images.SetKeyName(4, "process_16xMD.png")
|
||||
'
|
||||
'frmMain
|
||||
'
|
||||
@@ -193,4 +209,6 @@
|
||||
Friend WithEvents ButtonSettings As DevExpress.XtraBars.BarButtonItem
|
||||
Friend WithEvents ButtonExit As DevExpress.XtraBars.BarButtonItem
|
||||
Friend WithEvents SkinDropDownButtonItem1 As DevExpress.XtraBars.SkinDropDownButtonItem
|
||||
Friend WithEvents TimerRefreshData As Timer
|
||||
Friend WithEvents ImageListDebugTree As ImageList
|
||||
End Class
|
||||
|
||||
@@ -121,7 +121,7 @@
|
||||
<value>702, 17</value>
|
||||
</metadata>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="BarButtonItem1.ImageOptions.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<data name="ButtonSettings.ImageOptions.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABGdBTUEAALGPC/xhBQAAACt0RVh0VGl0
|
||||
bGUAU2V0dXA7Q3VzdG9taXo7RGVzaWduO1NldHRpbmc7UHJvcGVydDgftSEAAApzSURBVFhHnVdnVFVX
|
||||
@@ -172,7 +172,7 @@
|
||||
UVnFoWBr+TznI5VPNdUJyXP+R5GkfwMPT3OfchuhBQAAAABJRU5ErkJggg==
|
||||
</value>
|
||||
</data>
|
||||
<data name="BarButtonItem2.ImageOptions.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<data name="ButtonExit.ImageOptions.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABGdBTUEAALGPC/xhBQAAACN0RVh0VGl0
|
||||
bGUAQ2FuY2VsO1N0b3A7RXhpdDtCYXJzO1JpYmJvbjtMlpayAAALFUlEQVRYR5WXB1RVxxaGx/dSfEGM
|
||||
@@ -369,4 +369,66 @@
|
||||
<metadata name="ToastNotificationsManager.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>503, 17</value>
|
||||
</metadata>
|
||||
<metadata name="TimerRefreshData.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>847, 17</value>
|
||||
</metadata>
|
||||
<metadata name="ImageListDebugTree.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>996, 17</value>
|
||||
</metadata>
|
||||
<data name="ImageListDebugTree.ImageStream" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>
|
||||
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
|
||||
L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Af8BBwH/AQMBAAEBAYABAAH/AY8C/wEAAQMBgAEA
|
||||
Af8BnwL/AQABBwGAAQAE/wHAB/8BwQP/Cw==
|
||||
</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -1,10 +1,10 @@
|
||||
Imports System.ComponentModel
|
||||
Imports DevExpress.XtraSplashScreen
|
||||
Imports DevExpress.XtraSplashScreen
|
||||
Imports DigitalData.Modules.Logging
|
||||
Imports DigitalData.Modules.Filesystem
|
||||
Imports DigitalData.Modules.Database
|
||||
Imports DigitalData.Modules.Windows
|
||||
Imports DigitalData.Modules.ZooFlow
|
||||
Imports DevExpress.LookAndFeel
|
||||
Imports ZooFlow.ClassConstants
|
||||
Imports DigitalData.Products.ClipboardWatcher
|
||||
Imports DigitalData.Modules.ZooFlow.Params
|
||||
|
||||
Partial Public Class frmMain
|
||||
Private WithEvents FlowForm As frmFlowForm
|
||||
@@ -16,7 +16,7 @@ Partial Public Class frmMain
|
||||
InitializeComponent()
|
||||
End Sub
|
||||
|
||||
Private Sub frmMain_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
||||
Private Sub frmMain_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
' === Initialization ===
|
||||
Init = New ClassInit(My.LogConfig, Me)
|
||||
AddHandler Init.Completed, AddressOf Init_Completed
|
||||
@@ -27,13 +27,25 @@ Partial Public Class frmMain
|
||||
End Sub
|
||||
|
||||
Private Sub Init_Completed(sender As Object, e As EventArgs)
|
||||
' Initialization Complete
|
||||
' === Initialization Complete ===
|
||||
Loading = False
|
||||
SplashScreenManager.CloseForm(False)
|
||||
|
||||
' Setup Flow Form
|
||||
' === Setup Timers ===
|
||||
AddHandler TimerRefreshData.Tick, AddressOf TimerRefreshData_Tick
|
||||
TimerRefreshData.Enabled = True
|
||||
|
||||
' === Setup Flow Form ===
|
||||
FlowForm = New frmFlowForm(My.Application.ModulesActive)
|
||||
FlowForm.Show()
|
||||
|
||||
' === Load Data ===
|
||||
RefreshData()
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub TimerRefreshData_Tick(sender As Object, e As EventArgs)
|
||||
RefreshData()
|
||||
End Sub
|
||||
|
||||
Private Sub frmMain_Shown(sender As Object, e As EventArgs) Handles Me.Shown
|
||||
@@ -41,7 +53,53 @@ Partial Public Class frmMain
|
||||
End Sub
|
||||
|
||||
Private Sub FlowForm_ClipboardChanged(sender As Object, e As IDataObject) Handles FlowForm.ClipboardChanged
|
||||
MsgBox("Clipboard Changed!")
|
||||
If My.Application.ClipboardWatcher.UserProfiles.Rows.Count = 0 Then
|
||||
Logger.Warn("Clipboard Changed but no profiles configured!")
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
Dim oProfileFilter As ClassProfileFilter
|
||||
Dim oMatchingProfiles As List(Of ProfileData)
|
||||
Dim oWindow As New Window(My.LogConfig)
|
||||
Dim oWindowInfo = oWindow.GetWindowInfo()
|
||||
Dim oFocusedControl As IntPtr = oWindow.FocusedControlinActiveWindow(Handle)
|
||||
Dim oClipboardContents As String = Clipboard.GetText()
|
||||
|
||||
Try
|
||||
oProfileFilter = New ClassProfileFilter(My.LogConfig, My.Application.ClipboardWatcher.UserProfiles, My.Application.ClipboardWatcher.ProfileProcesses, My.Application.ClipboardWatcher.ProfileWindows, My.Application.ClipboardWatcher.ProfileControls)
|
||||
|
||||
oMatchingProfiles = oProfileFilter.Profiles
|
||||
Logger.Debug("Profiles before filtering: {0}", oMatchingProfiles.Count)
|
||||
oMatchingProfiles = oProfileFilter.FilterProfilesByClipboardRegex(oMatchingProfiles, oClipboardContents)
|
||||
Logger.Debug("Profiles after FilterProfilesByClipboardRegex: {0}", oMatchingProfiles.Count)
|
||||
oMatchingProfiles = oProfileFilter.FilterProfilesByProcess(oMatchingProfiles, oWindowInfo.ProcessName)
|
||||
Logger.Debug("Profiles after FilterProfilesByProcess: {0}", oMatchingProfiles.Count)
|
||||
oMatchingProfiles = oProfileFilter.FilterWindowsByWindowTitleRegex(oMatchingProfiles, oWindowInfo.WindowTitle)
|
||||
Logger.Debug("Profiles after FilterWindowsByWindowTitleRegex: {0}", oMatchingProfiles.Count)
|
||||
oMatchingProfiles = oProfileFilter.FilterProfilesByFocusedControl(oMatchingProfiles, oClipboardContents, oFocusedControl.ToString)
|
||||
Logger.Debug("Profiles after FilterProfilesByFocusedControl: {0}", oMatchingProfiles.Count)
|
||||
oMatchingProfiles = oProfileFilter.ClearNotMatchedProfiles(oMatchingProfiles)
|
||||
Logger.Debug("Profiles after ClearNotMatchedProfiles: {0}", oMatchingProfiles.Count)
|
||||
oMatchingProfiles = oMatchingProfiles.ToList()
|
||||
Catch ex As Exception
|
||||
MsgBox("Fehler beim Laden der Profile. Möglicherweise liegt ein Konfigurationsfehler vor.", MsgBoxStyle.Critical, Text)
|
||||
Exit Sub
|
||||
End Try
|
||||
|
||||
If oMatchingProfiles.Count = 0 Then
|
||||
Logger.Warn("No matching Profiles found")
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
Dim oEnvironment As New Environment() With {
|
||||
.User = My.Application.User,
|
||||
.Modules = My.Application.Modules
|
||||
}
|
||||
Dim oParams As New ClipboardWatcherParams() With {
|
||||
.MatchingProfiles = oMatchingProfiles
|
||||
}
|
||||
Dim oForm As New frmMatch(My.LogConfig, oEnvironment, oParams)
|
||||
oForm.Show()
|
||||
End Sub
|
||||
|
||||
#Region "Notify Icon Menu"
|
||||
@@ -71,11 +129,6 @@ Partial Public Class frmMain
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub ProgressChanged(sender As Object, Progress As ClassInitLoader.InitProgress)
|
||||
SplashScreenManager.Default.SendCommand(frmSplash.SplashScreenCommand.SetProgress, Progress.CurrentPercent)
|
||||
SplashScreenManager.Default.SendCommand(frmSplash.SplashScreenCommand.SetActionName, Progress.CurrentStep.Name)
|
||||
End Sub
|
||||
|
||||
Private Sub ButtonSettings_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles ButtonSettings.ItemClick
|
||||
frmSettings.ShowDialog()
|
||||
End Sub
|
||||
@@ -90,4 +143,27 @@ Partial Public Class frmMain
|
||||
My.UIConfigManager.Save()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Public Sub RefreshData()
|
||||
Try
|
||||
Dim oUserId As Integer = My.Application.User.UserId
|
||||
Dim oSql As String = My.Queries.ClipboardWatcher.VWCW_USER_PROFILE(oUserId)
|
||||
My.Application.ClipboardWatcher.UserProfiles = My.Database.GetDatatable(oSql)
|
||||
|
||||
If My.Application.ClipboardWatcher.UserProfiles.Rows.Count = 0 Then
|
||||
MsgBox("No profiles configured for this user so far!", MsgBoxStyle.Exclamation)
|
||||
Else
|
||||
oSql = My.Queries.ClipboardWatcher.TBCW_PROFILE_PROCESS(oUserId)
|
||||
My.Application.ClipboardWatcher.ProfileProcesses = My.Database.GetDatatable(oSql)
|
||||
|
||||
oSql = My.Queries.ClipboardWatcher.VWCW_PROFILE_REL_WINDOW(oUserId)
|
||||
My.Application.ClipboardWatcher.ProfileWindows = My.Database.GetDatatable(oSql)
|
||||
|
||||
oSql = My.Queries.ClipboardWatcher.VWCW_PROFILE_REL_CONTROL(oUserId)
|
||||
My.Application.ClipboardWatcher.ProfileControls = My.Database.GetDatatable(oSql)
|
||||
End If
|
||||
Catch ex As Exception
|
||||
Logger.Error(ex)
|
||||
End Try
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
147
ZooFlow/frmSettings.Designer.vb
generated
147
ZooFlow/frmSettings.Designer.vb
generated
@@ -19,16 +19,163 @@ Partial Class frmSettings
|
||||
'Do not modify it using the code editor.
|
||||
<System.Diagnostics.DebuggerStepThrough()> _
|
||||
Private Sub InitializeComponent()
|
||||
Me.components = New System.ComponentModel.Container()
|
||||
Dim UserIdLabel As System.Windows.Forms.Label
|
||||
Dim Label1 As System.Windows.Forms.Label
|
||||
Dim Label2 As System.Windows.Forms.Label
|
||||
Me.XtraTabControl1 = New DevExpress.XtraTab.XtraTabControl()
|
||||
Me.PageModules = New DevExpress.XtraTab.XtraTabPage()
|
||||
Me.txtGivenName = New System.Windows.Forms.TextBox()
|
||||
Me.UserStateBindingSource = New System.Windows.Forms.BindingSource(Me.components)
|
||||
Me.txtUsername = New System.Windows.Forms.TextBox()
|
||||
Me.txtUserId = New System.Windows.Forms.TextBox()
|
||||
Me.XtraTabPage2 = New DevExpress.XtraTab.XtraTabPage()
|
||||
Me.GridControl1 = New DevExpress.XtraGrid.GridControl()
|
||||
Me.GridView1 = New DevExpress.XtraGrid.Views.Grid.GridView()
|
||||
Me.classModuleStateBindingSource = New System.Windows.Forms.BindingSource(Me.components)
|
||||
UserIdLabel = New System.Windows.Forms.Label()
|
||||
Label1 = New System.Windows.Forms.Label()
|
||||
Label2 = New System.Windows.Forms.Label()
|
||||
CType(Me.XtraTabControl1, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.XtraTabControl1.SuspendLayout()
|
||||
Me.PageModules.SuspendLayout()
|
||||
CType(Me.UserStateBindingSource, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
CType(Me.GridControl1, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
CType(Me.GridView1, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
CType(Me.classModuleStateBindingSource, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
'UserIdLabel
|
||||
'
|
||||
UserIdLabel.AutoSize = True
|
||||
UserIdLabel.Location = New System.Drawing.Point(15, 24)
|
||||
UserIdLabel.Name = "UserIdLabel"
|
||||
UserIdLabel.Size = New System.Drawing.Size(43, 13)
|
||||
UserIdLabel.TabIndex = 0
|
||||
UserIdLabel.Text = "UserId:"
|
||||
'
|
||||
'Label1
|
||||
'
|
||||
Label1.AutoSize = True
|
||||
Label1.Location = New System.Drawing.Point(15, 51)
|
||||
Label1.Name = "Label1"
|
||||
Label1.Size = New System.Drawing.Size(59, 13)
|
||||
Label1.TabIndex = 0
|
||||
Label1.Text = "Username:"
|
||||
'
|
||||
'Label2
|
||||
'
|
||||
Label2.AutoSize = True
|
||||
Label2.Location = New System.Drawing.Point(15, 78)
|
||||
Label2.Name = "Label2"
|
||||
Label2.Size = New System.Drawing.Size(68, 13)
|
||||
Label2.TabIndex = 0
|
||||
Label2.Text = "Given Name:"
|
||||
'
|
||||
'XtraTabControl1
|
||||
'
|
||||
Me.XtraTabControl1.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.XtraTabControl1.Location = New System.Drawing.Point(0, 0)
|
||||
Me.XtraTabControl1.Name = "XtraTabControl1"
|
||||
Me.XtraTabControl1.SelectedTabPage = Me.PageModules
|
||||
Me.XtraTabControl1.Size = New System.Drawing.Size(784, 419)
|
||||
Me.XtraTabControl1.TabIndex = 0
|
||||
Me.XtraTabControl1.TabPages.AddRange(New DevExpress.XtraTab.XtraTabPage() {Me.PageModules, Me.XtraTabPage2})
|
||||
'
|
||||
'PageModules
|
||||
'
|
||||
Me.PageModules.Controls.Add(Me.GridControl1)
|
||||
Me.PageModules.Controls.Add(Label2)
|
||||
Me.PageModules.Controls.Add(Label1)
|
||||
Me.PageModules.Controls.Add(Me.txtGivenName)
|
||||
Me.PageModules.Controls.Add(Me.txtUsername)
|
||||
Me.PageModules.Controls.Add(UserIdLabel)
|
||||
Me.PageModules.Controls.Add(Me.txtUserId)
|
||||
Me.PageModules.Name = "PageModules"
|
||||
Me.PageModules.Size = New System.Drawing.Size(778, 391)
|
||||
Me.PageModules.Text = "Module && Lizenzen"
|
||||
'
|
||||
'txtGivenName
|
||||
'
|
||||
Me.txtGivenName.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.UserStateBindingSource, "GivenName", True))
|
||||
Me.txtGivenName.Location = New System.Drawing.Point(89, 75)
|
||||
Me.txtGivenName.Name = "txtGivenName"
|
||||
Me.txtGivenName.Size = New System.Drawing.Size(100, 21)
|
||||
Me.txtGivenName.TabIndex = 1
|
||||
'
|
||||
'UserStateBindingSource
|
||||
'
|
||||
Me.UserStateBindingSource.DataSource = GetType(DigitalData.Modules.ZooFlow.State.UserState)
|
||||
'
|
||||
'txtUsername
|
||||
'
|
||||
Me.txtUsername.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.UserStateBindingSource, "UserName", True))
|
||||
Me.txtUsername.Location = New System.Drawing.Point(89, 48)
|
||||
Me.txtUsername.Name = "txtUsername"
|
||||
Me.txtUsername.Size = New System.Drawing.Size(100, 21)
|
||||
Me.txtUsername.TabIndex = 1
|
||||
'
|
||||
'txtUserId
|
||||
'
|
||||
Me.txtUserId.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.UserStateBindingSource, "UserId", True))
|
||||
Me.txtUserId.Location = New System.Drawing.Point(89, 21)
|
||||
Me.txtUserId.Name = "txtUserId"
|
||||
Me.txtUserId.Size = New System.Drawing.Size(100, 21)
|
||||
Me.txtUserId.TabIndex = 1
|
||||
'
|
||||
'XtraTabPage2
|
||||
'
|
||||
Me.XtraTabPage2.Name = "XtraTabPage2"
|
||||
Me.XtraTabPage2.Size = New System.Drawing.Size(778, 391)
|
||||
Me.XtraTabPage2.Text = "XtraTabPage2"
|
||||
'
|
||||
'GridControl1
|
||||
'
|
||||
Me.GridControl1.DataSource = Me.classModuleStateBindingSource
|
||||
Me.GridControl1.Location = New System.Drawing.Point(324, 48)
|
||||
Me.GridControl1.MainView = Me.GridView1
|
||||
Me.GridControl1.Name = "GridControl1"
|
||||
Me.GridControl1.Size = New System.Drawing.Size(400, 200)
|
||||
Me.GridControl1.TabIndex = 2
|
||||
Me.GridControl1.ViewCollection.AddRange(New DevExpress.XtraGrid.Views.Base.BaseView() {Me.GridView1})
|
||||
'
|
||||
'GridView1
|
||||
'
|
||||
Me.GridView1.GridControl = Me.GridControl1
|
||||
Me.GridView1.Name = "GridView1"
|
||||
'
|
||||
'classModuleStateBindingSource
|
||||
'
|
||||
Me.classModuleStateBindingSource.DataSource = GetType(DigitalData.Modules.ZooFlow.State.ModuleState)
|
||||
'
|
||||
'frmSettings
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||
Me.ClientSize = New System.Drawing.Size(784, 419)
|
||||
Me.Controls.Add(Me.XtraTabControl1)
|
||||
Me.Name = "frmSettings"
|
||||
Me.Text = "frmSettings"
|
||||
CType(Me.XtraTabControl1, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
Me.XtraTabControl1.ResumeLayout(False)
|
||||
Me.PageModules.ResumeLayout(False)
|
||||
Me.PageModules.PerformLayout()
|
||||
CType(Me.UserStateBindingSource, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
CType(Me.GridControl1, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
CType(Me.GridView1, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
CType(Me.classModuleStateBindingSource, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
Me.ResumeLayout(False)
|
||||
|
||||
End Sub
|
||||
|
||||
Friend WithEvents XtraTabControl1 As DevExpress.XtraTab.XtraTabControl
|
||||
Friend WithEvents PageModules As DevExpress.XtraTab.XtraTabPage
|
||||
Friend WithEvents XtraTabPage2 As DevExpress.XtraTab.XtraTabPage
|
||||
Friend WithEvents txtUserId As TextBox
|
||||
Friend WithEvents UserStateBindingSource As BindingSource
|
||||
Friend WithEvents txtGivenName As TextBox
|
||||
Friend WithEvents txtUsername As TextBox
|
||||
Friend WithEvents GridControl1 As DevExpress.XtraGrid.GridControl
|
||||
Friend WithEvents classModuleStateBindingSource As BindingSource
|
||||
Friend WithEvents GridView1 As DevExpress.XtraGrid.Views.Grid.GridView
|
||||
End Class
|
||||
|
||||
@@ -117,4 +117,22 @@
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="UserIdLabel.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</metadata>
|
||||
<metadata name="Label1.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</metadata>
|
||||
<metadata name="Label2.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</metadata>
|
||||
<metadata name="classModuleStateBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>200, 17</value>
|
||||
</metadata>
|
||||
<metadata name="UserStateBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<metadata name="UserStateBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
</root>
|
||||
@@ -1,3 +1,5 @@
|
||||
Public Class frmSettings
|
||||
|
||||
Private Sub frmSettings_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
||||
UserStateBindingSource.DataSource = My.Application.User
|
||||
End Sub
|
||||
End Class
|
||||
@@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="NLog" version="4.5.11" targetFramework="net461" />
|
||||
<package id="NLog" version="4.6.7" targetFramework="net461" />
|
||||
</packages>
|
||||
Reference in New Issue
Block a user