bugfixing all day long
- wix setup missing devexpress dll - rework profile filter and control capture
This commit is contained in:
parent
4ddaba693d
commit
61693da2dc
@ -1,557 +0,0 @@
|
||||
Imports System.Text.RegularExpressions
|
||||
Imports DigitalData.Modules.Language.Utils
|
||||
Imports DigitalData.Modules.Windows
|
||||
|
||||
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 _TreeView As TreeView
|
||||
|
||||
Class ProfileData
|
||||
Public Guid As Integer
|
||||
Public Regex As String
|
||||
Public Name As String
|
||||
Public Comment As String
|
||||
Public ProfileType As Integer
|
||||
|
||||
Public Processes As List(Of ProcessData)
|
||||
Public Windows As List(Of WindowData)
|
||||
Public Controls As List(Of ControlData)
|
||||
|
||||
Public CountDocs As Integer = 0
|
||||
Public CountData As Integer = 0
|
||||
Public IsMatched As Boolean = False
|
||||
Public MatchedProcessID As Integer = 0
|
||||
Public MatchedWindowID As Integer = 0
|
||||
Public MatchedControlID As Integer = 0
|
||||
Public SelectCommand As String
|
||||
|
||||
Public Overrides Function Equals(obj As Object) As Boolean
|
||||
Return Guid = DirectCast(obj, ProfileData).Guid
|
||||
End Function
|
||||
|
||||
Public Overrides Function GetHashCode() As Integer
|
||||
Return Guid.ToString.GetHashCode()
|
||||
End Function
|
||||
End Class
|
||||
Class ProcessData
|
||||
Public Guid As Integer
|
||||
Public PROFILE_ID As Integer
|
||||
Public ProcessName As String
|
||||
Public IsMatched As Boolean = False
|
||||
|
||||
Public Overrides Function Equals(obj As Object) As Boolean
|
||||
Return Guid = DirectCast(obj, ProcessData).Guid
|
||||
End Function
|
||||
|
||||
Public Overrides Function GetHashCode() As Integer
|
||||
Return Guid.ToString.GetHashCode()
|
||||
End Function
|
||||
End Class
|
||||
Class WindowData
|
||||
Public Guid As Integer
|
||||
Public WindowProcessID As Integer
|
||||
Public Title As String
|
||||
Public Regex As String
|
||||
Public Sequence As Integer
|
||||
Public IsMatched As Boolean = False
|
||||
|
||||
End Class
|
||||
Class ControlData
|
||||
Public Guid As Integer
|
||||
Public WindowId As Integer
|
||||
Public Description As String
|
||||
Public Regex As String
|
||||
Public AutomationId As String
|
||||
Public ControlName As String
|
||||
Public IsMatched As Boolean = False
|
||||
Public TopLeft As ControlBounds
|
||||
Public TopRight As ControlBounds
|
||||
Public BottomLeft As ControlBounds
|
||||
Public BottomRight As ControlBounds
|
||||
End Class
|
||||
Class ControlBounds
|
||||
Public Top As Integer
|
||||
Public Bottom As Integer
|
||||
Public Left As Integer
|
||||
Public Right As Integer
|
||||
End Class
|
||||
Public ReadOnly Property Profiles As List(Of ProfileData)
|
||||
Get
|
||||
Return _Profiles
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Sub New(ProfileDatatable As DataTable, ProcessTable As DataTable, WindowDatatable As DataTable, ControlDatatable As DataTable, TreeView As TreeView)
|
||||
Try
|
||||
_ProfileTable = ProfileDatatable
|
||||
_ProcessTable = ProcessTable
|
||||
_WindowTable = WindowDatatable
|
||||
_ControlTable = ControlDatatable
|
||||
_Profiles = TransformProfiles()
|
||||
_TreeView = TreeView
|
||||
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 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
|
||||
|
||||
Private Function FindNodeByTag(ByVal nodes As TreeNodeCollection, ByVal Tag As String) As TreeNode
|
||||
For Each node As TreeNode In nodes
|
||||
If (node.Tag.Equals(Tag)) Then
|
||||
Return node
|
||||
End If
|
||||
|
||||
Dim oNext As TreeNode = FindNodeByTag(node.Nodes, Tag)
|
||||
If oNext IsNot Nothing Then
|
||||
Return oNext
|
||||
End If
|
||||
Next
|
||||
Return Nothing
|
||||
End Function
|
||||
|
||||
Private Function GetMatchText(IsMatch As Boolean)
|
||||
Return IIf(IsMatch, "MATCH", "NO MATCH")
|
||||
End Function
|
||||
|
||||
Private Function GetMatchColor(IsMatch As Boolean)
|
||||
Return IIf(IsMatch, Color.LightGreen, Color.LightCoral)
|
||||
End Function
|
||||
|
||||
Private Function NewProfileNode(Profile As ProfileData) As TreeNode
|
||||
Dim oNode As New TreeNode() With {
|
||||
.Text = $"Profile: {Profile.Name}",
|
||||
.ImageIndex = 0,
|
||||
.Tag = Profile.Name & "-PROFILE"
|
||||
}
|
||||
|
||||
Return oNode
|
||||
End Function
|
||||
|
||||
Private Function NewClipboardRegexNode(Profile As ProfileData, IsMatch As Boolean) As TreeNode
|
||||
Dim oText = $"{GetMatchText(IsMatch)} on Global Clipboard Regex {Profile.Regex}"
|
||||
|
||||
Dim oNode As New TreeNode() With {
|
||||
.Text = oText,
|
||||
.ImageIndex = 1,
|
||||
.Tag = Profile.Name & "-REGEX",
|
||||
.BackColor = GetMatchColor(IsMatch)
|
||||
}
|
||||
|
||||
Return oNode
|
||||
End Function
|
||||
Private Function NewProcessNode(Profile As ProfileData, Process As ProcessData, IsMatch As Boolean) As TreeNode
|
||||
Dim oMatchText = IIf(IsMatch, "MATCH", "NO MATCH")
|
||||
Dim oText = $"{GetMatchText(IsMatch)} on ProcessName {Process.ProcessName}"
|
||||
|
||||
Dim oNode As New TreeNode() With {
|
||||
.Text = oText,
|
||||
.ImageIndex = 4,
|
||||
.Tag = Process.Guid & "-PROCESS",
|
||||
.BackColor = GetMatchColor(IsMatch)
|
||||
}
|
||||
|
||||
Return oNode
|
||||
End Function
|
||||
|
||||
Private Function NewWindowNode(Profile As ProfileData, Window As WindowData, IsMatch As Boolean) As TreeNode
|
||||
Dim oMatchText = IIf(IsMatch, "MATCH", "NO MATCH")
|
||||
Dim oText = $"{GetMatchText(IsMatch)} on WindowTitle {Window.Title}"
|
||||
|
||||
Dim oNode As New TreeNode() With {
|
||||
.Text = oText,
|
||||
.ImageIndex = 3,
|
||||
.Tag = Window.Guid & "-WINDOW",
|
||||
.BackColor = GetMatchColor(IsMatch)
|
||||
}
|
||||
|
||||
Return oNode
|
||||
End Function
|
||||
|
||||
Private Function NewControlNode(Profile As ProfileData, Control As ControlData, IsMatch As Boolean) As TreeNode
|
||||
Dim oMatchText = IIf(IsMatch, "MATCH", "NO MATCH")
|
||||
Dim oText = $"{GetMatchText(IsMatch)} on Control {Control.Description}: {IsMatch.ToString}"
|
||||
|
||||
Dim oNode As New TreeNode() With {
|
||||
.Text = oText,
|
||||
.ImageIndex = 2,
|
||||
.Tag = Control.Guid & "-CONTROL",
|
||||
.BackColor = GetMatchColor(IsMatch)
|
||||
}
|
||||
|
||||
Return oNode
|
||||
End Function
|
||||
|
||||
Public Function FilterProfilesByClipboardRegex(Profiles As List(Of ProfileData), ClipboardContents As String) As List(Of ProfileData)
|
||||
Dim oFilteredProfiles As New List(Of ProfileData)
|
||||
|
||||
Dim oRootNode As TreeNode = New TreeNode() With {
|
||||
.Text = $"Suche nach '{ClipboardContents}'",
|
||||
.Tag = "ROOT"
|
||||
}
|
||||
_TreeView.Nodes.Add(oRootNode)
|
||||
|
||||
For Each oProfile In Profiles
|
||||
Logger.Debug("Current Profile: {0}", oProfile.Name)
|
||||
|
||||
Dim oNode = NewProfileNode(oProfile)
|
||||
oRootNode.Nodes.Add(oNode)
|
||||
|
||||
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)
|
||||
oFilteredProfiles.Add(oProfile)
|
||||
oProfile.IsMatched = True
|
||||
|
||||
Dim oSubnode = NewClipboardRegexNode(oProfile, oMatch.Success)
|
||||
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 ProcessData)
|
||||
For Each oProcessDef As ProcessData In oProfile.Processes
|
||||
If oProcessDef.PROFILE_ID <> oGuid Then
|
||||
Continue For
|
||||
End If
|
||||
|
||||
Dim oIsMatch = oProcessDef.ProcessName.ToLower = CurrentProcessName.ToLower
|
||||
Dim oParent = FindNodeByTag(_TreeView.Nodes, oProfile.Name & "-REGEX")
|
||||
If oParent IsNot Nothing Then
|
||||
Dim oNode = NewProcessNode(oProfile, oProcessDef, oIsMatch)
|
||||
oParent.Nodes.Add(oNode)
|
||||
End If
|
||||
|
||||
Logger.Debug($"FilterProfilesByProcess: Checking Profile: {oProfile.Name} ...")
|
||||
If oIsMatch 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
|
||||
|
||||
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 WindowData)
|
||||
|
||||
For Each oWindowDef As 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)
|
||||
oProfile.MatchedWindowID = oWindowDef.Guid
|
||||
oWindowDef.IsMatched = True
|
||||
oWindows.Add(oWindowDef)
|
||||
End If
|
||||
|
||||
Dim oParent = FindNodeByTag(_TreeView.Nodes, oWindowDef.WindowProcessID & "-PROCESS")
|
||||
If oParent IsNot Nothing Then
|
||||
Dim oNode = NewWindowNode(oProfile, oWindowDef, oMatch.Success)
|
||||
oParent.Nodes.Add(oNode)
|
||||
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 FilterProfilesByFocusedControlLocation(Profiles As List(Of ProfileData), ClipboardContents As String, WindowHandle As IntPtr) As List(Of ProfileData)
|
||||
Dim oFilteredProfiles As New List(Of ProfileData)
|
||||
Dim oWindow As New Window(LogConfig)
|
||||
|
||||
For Each oProfile In Profiles
|
||||
If oProfile.IsMatched = False Then Continue For
|
||||
|
||||
If oProfile.Controls.Count = 0 Then
|
||||
oFilteredProfiles.Add(oProfile)
|
||||
Continue For
|
||||
End If
|
||||
|
||||
Dim oControls As New List(Of ControlData)
|
||||
|
||||
For Each oControl In oProfile.Controls
|
||||
Dim oControlBounds = oWindow.GetFocusedControlLocation(WindowHandle)
|
||||
Dim oFound As Boolean = False
|
||||
|
||||
For Each oItem As KeyValuePair(Of String, Window.RectangleInfo) In oControlBounds
|
||||
Select Case oItem.Key
|
||||
Case "TOPLEFT"
|
||||
If oControl.TopLeft.Top = oItem.Value.Top And oControl.TopLeft.Left = oItem.Value.Left Then
|
||||
oFound = True
|
||||
End If
|
||||
Case "TOPRIGHT"
|
||||
If oControl.TopRight.Top = oItem.Value.Top And oControl.TopLeft.Right = oItem.Value.Right Then
|
||||
oFound = True
|
||||
End If
|
||||
Case "BOTTOMLEFT"
|
||||
If oControl.BottomLeft.Bottom = oItem.Value.Bottom And oControl.TopLeft.Left = oItem.Value.Left Then
|
||||
oFound = True
|
||||
End If
|
||||
Case "BOTTOMRIGHT"
|
||||
If oControl.BottomRight.Bottom = oItem.Value.Bottom And oControl.TopLeft.Right = oItem.Value.Right Then
|
||||
oFound = True
|
||||
End If
|
||||
End Select
|
||||
Next
|
||||
|
||||
If oFound Then
|
||||
oFilteredProfiles.Add(oProfile)
|
||||
End If
|
||||
|
||||
Dim oParent = FindNodeByTag(_TreeView.Nodes, oControl.WindowId & "-WINDOW")
|
||||
If oParent IsNot Nothing Then
|
||||
Dim oNode = NewControlNode(oProfile, oControl, oFound)
|
||||
oParent.Nodes.Add(oNode)
|
||||
End If
|
||||
Next
|
||||
|
||||
If oControls.Count > 0 Then
|
||||
oProfile.Controls = oControls
|
||||
oFilteredProfiles.Add(oProfile)
|
||||
End If
|
||||
Next
|
||||
|
||||
|
||||
Return oFilteredProfiles
|
||||
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 WindowData)
|
||||
|
||||
For Each w As 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)
|
||||
oWindows.Add(w)
|
||||
End If
|
||||
|
||||
Dim oResult As TreeNode = FindNodeByTag(_TreeView.Nodes, oProfile.Name & "-REGEX")
|
||||
If Not IsNothing(oResult) Then
|
||||
Dim oNode As New TreeNode($"MATCH on WINDOW Clipboard Regex [{w.Regex}]: {oMatch.Success}")
|
||||
oNode.ImageIndex = 2
|
||||
oNode.Tag = oProfile.Name & "-WINDOW_REGEX"
|
||||
oResult.Nodes.Add(oNode)
|
||||
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 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
|
||||
|
||||
Public Function ClearDuplicateProfiles(Profiles As List(Of ProfileData)) As List(Of ProfileData)
|
||||
Return Profiles.
|
||||
GroupBy(Function(Profile) Profile.Guid).
|
||||
Select(Function(GroupedProfiles) GroupedProfiles.First).
|
||||
ToList()
|
||||
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 ProcessData) = TransformProcesses(oProfileId, _ProcessTable)
|
||||
Dim oWindowList As List(Of WindowData) = TransformWindows(oProfileId, _WindowTable)
|
||||
Dim oControlList As List(Of ControlData) = TransformControls(oProfileId, _ControlTable)
|
||||
|
||||
oList.Add(New ProfileData() With {
|
||||
.Guid = oRow.Item("GUID"),
|
||||
.Regex = oRow.Item("REGEX_EXPRESSION"),
|
||||
.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
|
||||
|
||||
oList = oList.
|
||||
Distinct().
|
||||
ToList()
|
||||
|
||||
Return oList
|
||||
End Function
|
||||
|
||||
Private Function TransformControls(ProfileId As Integer, ControlDatatable As DataTable) As List(Of ControlData)
|
||||
Dim oControlList As New List(Of ControlData)
|
||||
|
||||
For Each oRow As DataRow In ControlDatatable.Rows
|
||||
If oRow.Item("PROFILE_ID") = ProfileId Then
|
||||
oControlList.Add(New ControlData() With {
|
||||
.Guid = oRow.Item("GUID"),
|
||||
.Description = NotNull(oRow.Item("DESCRIPTION"), String.Empty),
|
||||
.WindowId = oRow.Item("WINDOW_ID"),
|
||||
.TopLeft = New ControlBounds() With {
|
||||
.Left = oRow.Item("TOPLEFT_LEFT"),
|
||||
.Right = oRow.Item("TOPLEFT_RIGHT"),
|
||||
.Top = oRow.Item("TOPLEFT_TOP"),
|
||||
.Bottom = oRow.Item("TOPLEFT_BOTTOM")
|
||||
},
|
||||
.TopRight = New ControlBounds() With {
|
||||
.Left = oRow.Item("TOPRIGHT_LEFT"),
|
||||
.Right = oRow.Item("TOPRIGHT_RIGHT"),
|
||||
.Top = oRow.Item("TOPRIGHT_TOP"),
|
||||
.Bottom = oRow.Item("TOPRIGHT_BOTTOM")
|
||||
},
|
||||
.BottomLeft = New ControlBounds() With {
|
||||
.Left = oRow.Item("BOTTOMLEFT_LEFT"),
|
||||
.Right = oRow.Item("BOTTOMLEFT_RIGHT"),
|
||||
.Top = oRow.Item("BOTTOMLEFT_TOP"),
|
||||
.Bottom = oRow.Item("BOTTOMLEFT_BOTTOM")
|
||||
},
|
||||
.BottomRight = New ControlBounds() With {
|
||||
.Left = oRow.Item("BOTTOMRIGHT_LEFT"),
|
||||
.Right = oRow.Item("BOTTOMRIGHT_RIGHT"),
|
||||
.Top = oRow.Item("BOTTOMRIGHT_TOP"),
|
||||
.Bottom = oRow.Item("BOTTOMRIGHT_BOTTOM")
|
||||
}
|
||||
})
|
||||
End If
|
||||
Next
|
||||
|
||||
Return oControlList
|
||||
End Function
|
||||
Private Function TransformProcesses(ProfileId As Integer, ProcessDatatable As DataTable) As List(Of ProcessData)
|
||||
Dim oProcessList As New List(Of ProcessData)
|
||||
|
||||
For Each oRow As DataRow In ProcessDatatable.Rows
|
||||
If oRow.Item("PROFILE_ID") = ProfileId Then
|
||||
oProcessList.Add(New ProcessData() With {
|
||||
.Guid = oRow.Item("GUID"),
|
||||
.PROFILE_ID = oRow.Item("PROFILE_ID"),
|
||||
.ProcessName = NotNull(oRow.Item("PROC_NAME"), String.Empty)
|
||||
})
|
||||
End If
|
||||
Next
|
||||
|
||||
oProcessList = oProcessList.
|
||||
Distinct().
|
||||
ToList()
|
||||
|
||||
Return oProcessList
|
||||
End Function
|
||||
Private Function TransformWindows(ProfileId As Integer, WindowDatatable As DataTable) As List(Of WindowData)
|
||||
Dim oWindowList As New List(Of WindowData)
|
||||
|
||||
For Each oRow As DataRow In WindowDatatable.Rows
|
||||
If oRow.Item("PROFILE_ID") = ProfileId Then
|
||||
oWindowList.Add(New 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)
|
||||
})
|
||||
End If
|
||||
Next
|
||||
|
||||
Return oWindowList
|
||||
End Function
|
||||
End Class
|
||||
@ -1,43 +0,0 @@
|
||||
Imports DD_Clipboard_Watcher.ClassProfileFilter
|
||||
|
||||
Public Class ClassProfileMatch
|
||||
Private TreeView As TreeView
|
||||
Private ImageList As ImageList
|
||||
|
||||
Public Sub New(TreeView As TreeView, ImageList As ImageList)
|
||||
Me.TreeView = TreeView
|
||||
Me.ImageList = ImageList
|
||||
|
||||
Me.TreeView.Nodes.Clear()
|
||||
Me.TreeView.ImageList = ImageList
|
||||
Me.TreeView.SelectedImageIndex = 0
|
||||
End Sub
|
||||
|
||||
Public Function AddProfileNode(Profile As ProfileData) As TreeNode
|
||||
Dim oNode As New TreeNode With {
|
||||
.ImageIndex = 0,
|
||||
.Tag = $"{Profile.Name}-ROOT",
|
||||
.Text = $"Profile: {Profile.Name}"
|
||||
}
|
||||
|
||||
TreeView.Nodes.Add(oNode)
|
||||
|
||||
Return oNode
|
||||
End Function
|
||||
|
||||
Public Function AddProfileRegexNode(ParentNode As TreeNode, Profile As ProfileData, Regex As String, IsMatch As Boolean) As TreeNode
|
||||
Dim oNode As New TreeNode With {
|
||||
.ImageIndex = 1,
|
||||
.Tag = $"{Profile.Name}-REGEX",
|
||||
.Text = $"MATCH on Global Clipboard Regex: {Profile.Regex}"
|
||||
}
|
||||
|
||||
ParentNode.Nodes.Add(oNode)
|
||||
|
||||
Return oNode
|
||||
End Function
|
||||
|
||||
Public Function FindNodeByTag(TagName As String) As TreeNode
|
||||
|
||||
End Function
|
||||
End Class
|
||||
@ -149,13 +149,11 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="ClassAutomation.vb" />
|
||||
<Compile Include="ClassProfileMatch.vb" />
|
||||
<Compile Include="ClassWindow.vb" />
|
||||
<Compile Include="ClassConfig.vb" />
|
||||
<Compile Include="ClassConstants.vb" />
|
||||
<Compile Include="ClassInit.vb" />
|
||||
<Compile Include="ClassLayout.vb" />
|
||||
<Compile Include="ClassProfileFilter.vb" />
|
||||
<Compile Include="ClassHotkey.vb" />
|
||||
<Compile Include="ClassLicense.vb" />
|
||||
<Compile Include="ClassWindowsAPINativeMethods.vb" />
|
||||
|
||||
@ -264,6 +264,10 @@ Public Class ctrlApplicationAssignment
|
||||
|
||||
Dim oBounds As String = frmControlCapture.GetBoundsString(oTopLeft, oTopRight, oBottomLeft, oBottomRight)
|
||||
Dim oForm As New frmControlCapture(EditMode:=True, ControlBounds:=oBounds, ControlName:=oControlName)
|
||||
oForm.TopLeft = oTopLeft
|
||||
oForm.TopRight = oTopRight
|
||||
oForm.BottomLeft = oBottomLeft
|
||||
oForm.BottomRight = oBottomRight
|
||||
|
||||
Dim oResult = oForm.ShowDialog()
|
||||
|
||||
|
||||
@ -367,6 +367,8 @@ Partial Class frmAdministration
|
||||
'
|
||||
Me.GridViewProfiles.Appearance.EvenRow.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer))
|
||||
Me.GridViewProfiles.Appearance.EvenRow.Options.UseBackColor = True
|
||||
Me.GridViewProfiles.Appearance.SelectedRow.Font = New System.Drawing.Font("Tahoma", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
Me.GridViewProfiles.Appearance.SelectedRow.Options.UseFont = True
|
||||
Me.GridViewProfiles.Columns.AddRange(New DevExpress.XtraGrid.Columns.GridColumn() {Me.colGUID, Me.colNAME})
|
||||
Me.GridViewProfiles.GridControl = Me.GridControlProfiles
|
||||
Me.GridViewProfiles.Name = "GridViewProfiles"
|
||||
|
||||
@ -123,6 +123,9 @@
|
||||
<metadata name="MyDataset.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>245, 17</value>
|
||||
</metadata>
|
||||
<metadata name="MyDataset.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>245, 17</value>
|
||||
</metadata>
|
||||
<metadata name="TBWH_UserBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>122, 56</value>
|
||||
</metadata>
|
||||
@ -156,10 +159,69 @@
|
||||
<metadata name="TBCW_PROF_DATA_SEARCHBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>578, 56</value>
|
||||
</metadata>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="TabPageGeneralSettings.ImageOptions.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
|
||||
dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAALdEVYdFRpdGxlAEhvbWU7HnRkOAAAANRJREFUOE+d
|
||||
kT0OgkAQhbG18WQmXsA7AI0dCWZbo7fRxMJGUC9j/MN2nDdhyC6wsLH4YHg770vIRsYYHxNmw+SazdcH
|
||||
AvoNmqEFylsGy0AkoQK7fGTKes65nI0J2uUpM2McCb+bzlhZzyApVmYnEitvBENlRSSMI8EjpKx0JAhx
|
||||
VQjAUFmBRPczBEtmXwe6pAtt7PMTs9AAv+EsVNeEHkUqfC5JnwAd5xachTeX7udUeJW9ApkjIhLsEPP3
|
||||
FtOzTIXqGncE2vMKPAQLxvAKgukI/oOiH3DIH9LquF+BAAAAAElFTkSuQmCC
|
||||
</value>
|
||||
</data>
|
||||
<data name="TabPageDocuments.ImageOptions.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
|
||||
dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAAWdEVYdFRpdGxlAFRleHQ7UGFnZTtSZXBvcnR2YWEA
|
||||
AAAAVUlEQVQ4T2P4//8/RRjOaGlp+Y8H/4PSxsiaQRjFAHwAJN/X13cX3RCSDACCX+iGkGQAMgYC0gxA
|
||||
BngN8G3agReDwKgLaO0CYgDtDCAFYxhAHv7PAAC6Jy+iz67OxwAAAABJRU5ErkJggg==
|
||||
</value>
|
||||
</data>
|
||||
<data name="TabPageData.ImageOptions.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
|
||||
dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAAddEVYdFRpdGxlAERhdGFiYXNlO0RCO1NvdXJjZTtT
|
||||
dG9yrLHqcgAAAIhJREFUOE9j+P//P8O7I0UgLADEUUA8C4jPAfEnJAzig8RB8iB1YH0gDDPACIiXAvF/
|
||||
IjBInRG6AXOQFBCD56Ab8A5NASH8juoGUOwFMyAmJRDN0A1IA2JPICYmGkHq0tANAIXBAyAGKYoDYl0g
|
||||
5kHCID5IHCQPUjcaBrQIA4ozEwiTkZ3/MwAAShbqQY39CKgAAAAASUVORK5CYII=
|
||||
</value>
|
||||
</data>
|
||||
<data name="TabPageProcessAssignment.ImageOptions.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
|
||||
dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAArdEVYdFRpdGxlAFNldHVwO0N1c3RvbWl6O0Rlc2ln
|
||||
bjtTZXR0aW5nO1Byb3BlcnQ4H7UhAAAAvklEQVQ4T62TMQ7DIAxFc4woysqSJcpBeqZIHXuUnqAX6p45
|
||||
C/0P4ciDhwg6PAnbny9jYMg5hzyenySOSoo0cC0kGsXk4lXkyurykxgt9psRvsUmZvESZ4U1OWpo0BYT
|
||||
72qFO6At3RaDaoJ7JI7YbJ83oEUTfMUulgprclafLwMFTJuBcU4T7CYwyLk6WvYkClwTSYZlgiUwoBOr
|
||||
m/b4i0HfEZygbYjOoP0aleh7SAr6nrIzaftMERLd+M55+AHESXAXw39ssQAAAABJRU5ErkJggg==
|
||||
</value>
|
||||
</data>
|
||||
<data name="TabPageUserAssignment.ImageOptions.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
|
||||
dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAAydEVYdFRpdGxlAEN1c3RvbWVyO0VtcGxveWVlO1Bl
|
||||
cnNvbjtDb250YWN0O1VzZXI7Q2xpZW50fhE26AAAAM1JREFUOE+l0TEOQUEUBdBfiN4ySDQqKvTfGuxF
|
||||
pbEIi5DoRcIa/gqovwKRca/MvMw8/zGhODKZd98NpnDO/eX1MVtstSHs4eIdYAxJzipowQmccoY2SNYq
|
||||
6IJeDnogWatgAk3LNAXJWgVLaFomziRrFYzgAXqZd/xzJWsV0A50Ae+S3KcCPtkNwjLP2c8YzOHo8fyW
|
||||
sQo6sIL4zXnmHWeS1QUD2MAd+LXX0Pd45h1nzDCbFJRwhfCbv2G2jAuqaJirigtqNcxRS8HvXPEEp3w/
|
||||
tQHvKFEAAAAASUVORK5CYII=
|
||||
</value>
|
||||
</data>
|
||||
<data name="TabPageGroupAssignment.ImageOptions.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
|
||||
dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAAYdEVYdFRpdGxlAFRlYW07UGVvcGxlO0dyb3VwO1w5
|
||||
6BYAAADzSURBVDhPpdA9CsJAEAVglYBYeQYPoJ2tBxDEMq2FJ5BASsVrWNhqmc4rKHgJsbAXTKXre2En
|
||||
TNZJESw+iPPzzKTlnPuLWWyifJhtT23YwdPbQwfMuhUwBhdgzaxbAbEauMISIm8BZ5B+bAWkvvmBunPe
|
||||
wJnUCujDCy5Qdw57nOn/BPiQBA6gzxGssZfoHb3MW4cwADlHY429EURlAH50YQM3uMMU5BxZLl4b2OMM
|
||||
Z7nTY8AR9D/RCniO/OYza3qGMgbkqvCANcg5E694bWCPMzKfl9/Af4fwnLlXeW29EwZY54QyvRMG6HPq
|
||||
5HqnEtCca30Bw6t+WSTe8moAAAAASUVORK5CYII=
|
||||
</value>
|
||||
</data>
|
||||
<metadata name="ApplicationMenu1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>1270, 95</value>
|
||||
</metadata>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="BarButtonItem16.ImageOptions.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
|
||||
@ -772,77 +834,18 @@
|
||||
<metadata name="TBWH_PROFILE_TYPEBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>1024, 95</value>
|
||||
</metadata>
|
||||
<data name="TabPageGeneralSettings.ImageOptions.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
|
||||
dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAALdEVYdFRpdGxlAEhvbWU7HnRkOAAAANRJREFUOE+d
|
||||
kT0OgkAQhbG18WQmXsA7AI0dCWZbo7fRxMJGUC9j/MN2nDdhyC6wsLH4YHg770vIRsYYHxNmw+SazdcH
|
||||
AvoNmqEFylsGy0AkoQK7fGTKes65nI0J2uUpM2McCb+bzlhZzyApVmYnEitvBENlRSSMI8EjpKx0JAhx
|
||||
VQjAUFmBRPczBEtmXwe6pAtt7PMTs9AAv+EsVNeEHkUqfC5JnwAd5xachTeX7udUeJW9ApkjIhLsEPP3
|
||||
FtOzTIXqGncE2vMKPAQLxvAKgukI/oOiH3DIH9LquF+BAAAAAElFTkSuQmCC
|
||||
</value>
|
||||
</data>
|
||||
<metadata name="TBDD_CONNECTIONBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 134</value>
|
||||
</metadata>
|
||||
<metadata name="TBWHSEARCHPOSITIONBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>499, 134</value>
|
||||
</metadata>
|
||||
<data name="TabPageDocuments.ImageOptions.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
|
||||
dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAAWdEVYdFRpdGxlAFRleHQ7UGFnZTtSZXBvcnR2YWEA
|
||||
AAAAVUlEQVQ4T2P4//8/RRjOaGlp+Y8H/4PSxsiaQRjFAHwAJN/X13cX3RCSDACCX+iGkGQAMgYC0gxA
|
||||
BngN8G3agReDwKgLaO0CYgDtDCAFYxhAHv7PAAC6Jy+iz67OxwAAAABJRU5ErkJggg==
|
||||
</value>
|
||||
</data>
|
||||
<data name="TabPageData.ImageOptions.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
|
||||
dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAAddEVYdFRpdGxlAERhdGFiYXNlO0RCO1NvdXJjZTtT
|
||||
dG9yrLHqcgAAAIhJREFUOE9j+P//P8O7I0UgLADEUUA8C4jPAfEnJAzig8RB8iB1YH0gDDPACIiXAvF/
|
||||
IjBInRG6AXOQFBCD56Ab8A5NASH8juoGUOwFMyAmJRDN0A1IA2JPICYmGkHq0tANAIXBAyAGKYoDYl0g
|
||||
5kHCID5IHCQPUjcaBrQIA4ozEwiTkZ3/MwAAShbqQY39CKgAAAAASUVORK5CYII=
|
||||
</value>
|
||||
</data>
|
||||
<data name="TabPageProcessAssignment.ImageOptions.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
|
||||
dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAArdEVYdFRpdGxlAFNldHVwO0N1c3RvbWl6O0Rlc2ln
|
||||
bjtTZXR0aW5nO1Byb3BlcnQ4H7UhAAAAvklEQVQ4T62TMQ7DIAxFc4woysqSJcpBeqZIHXuUnqAX6p45
|
||||
C/0P4ciDhwg6PAnbny9jYMg5hzyenySOSoo0cC0kGsXk4lXkyurykxgt9psRvsUmZvESZ4U1OWpo0BYT
|
||||
72qFO6At3RaDaoJ7JI7YbJ83oEUTfMUulgprclafLwMFTJuBcU4T7CYwyLk6WvYkClwTSYZlgiUwoBOr
|
||||
m/b4i0HfEZygbYjOoP0aleh7SAr6nrIzaftMERLd+M55+AHESXAXw39ssQAAAABJRU5ErkJggg==
|
||||
</value>
|
||||
</data>
|
||||
<data name="TabPageUserAssignment.ImageOptions.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
|
||||
dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAAydEVYdFRpdGxlAEN1c3RvbWVyO0VtcGxveWVlO1Bl
|
||||
cnNvbjtDb250YWN0O1VzZXI7Q2xpZW50fhE26AAAAM1JREFUOE+l0TEOQUEUBdBfiN4ySDQqKvTfGuxF
|
||||
pbEIi5DoRcIa/gqovwKRca/MvMw8/zGhODKZd98NpnDO/eX1MVtstSHs4eIdYAxJzipowQmccoY2SNYq
|
||||
6IJeDnogWatgAk3LNAXJWgVLaFomziRrFYzgAXqZd/xzJWsV0A50Ae+S3KcCPtkNwjLP2c8YzOHo8fyW
|
||||
sQo6sIL4zXnmHWeS1QUD2MAd+LXX0Pd45h1nzDCbFJRwhfCbv2G2jAuqaJirigtqNcxRS8HvXPEEp3w/
|
||||
tQHvKFEAAAAASUVORK5CYII=
|
||||
</value>
|
||||
</data>
|
||||
<metadata name="VWCW_GROUP_PROFILEBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>500, 95</value>
|
||||
</metadata>
|
||||
<metadata name="TBWH_GROUPBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>290, 95</value>
|
||||
</metadata>
|
||||
<data name="TabPageGroupAssignment.ImageOptions.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
|
||||
dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAAYdEVYdFRpdGxlAFRlYW07UGVvcGxlO0dyb3VwO1w5
|
||||
6BYAAADzSURBVDhPpdA9CsJAEAVglYBYeQYPoJ2tBxDEMq2FJ5BASsVrWNhqmc4rKHgJsbAXTKXre2En
|
||||
TNZJESw+iPPzzKTlnPuLWWyifJhtT23YwdPbQwfMuhUwBhdgzaxbAbEauMISIm8BZ5B+bAWkvvmBunPe
|
||||
wJnUCujDCy5Qdw57nOn/BPiQBA6gzxGssZfoHb3MW4cwADlHY429EURlAH50YQM3uMMU5BxZLl4b2OMM
|
||||
Z7nTY8AR9D/RCniO/OYza3qGMgbkqvCANcg5E694bWCPMzKfl9/Af4fwnLlXeW29EwZY54QyvRMG6HPq
|
||||
5HqnEtCca30Bw6t+WSTe8moAAAAASUVORK5CYII=
|
||||
</value>
|
||||
</data>
|
||||
<metadata name="TBCW_PROF_DATA_SEARCHTableAdapter.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>862, 56</value>
|
||||
</metadata>
|
||||
|
||||
@ -45,8 +45,8 @@ Public Class frmControlCapture
|
||||
End Sub
|
||||
|
||||
Private Sub Watcher_Changed(sender As Object, e As EventArgs)
|
||||
Try
|
||||
' === CONTROL NAME ===
|
||||
|
||||
Dim oControl As WindowInfo = Window.GetFocusedControl(Handle)
|
||||
|
||||
If oControl IsNot Nothing Then
|
||||
@ -54,35 +54,49 @@ Public Class frmControlCapture
|
||||
ControlName = oControl.ControlName
|
||||
End If
|
||||
|
||||
|
||||
Catch ex As Exception
|
||||
Logger.Error(ex)
|
||||
MsgBox($"Control Name konnte nicht ausgelesen werden!{vbNewLine}Dies kann ein temporärer Fehler sein. Bitte versuchen Sie es noch einmal.", MsgBoxStyle.Exclamation, Text)
|
||||
Finally
|
||||
Logger.EndBlock()
|
||||
End Try
|
||||
|
||||
Try
|
||||
' === CONTROL POSITION ===
|
||||
Dim oRectangles As Dictionary(Of String, RectangleInfo) = Window.GetFocusedControlLocation(Handle)
|
||||
|
||||
For Each oAnchor As Anchor In [Enum].GetValues(GetType(Anchor))
|
||||
Dim oRect As RectangleInfo = Window.GetFocusedControlLocation(Handle, oAnchor)
|
||||
|
||||
Select Case oAnchor
|
||||
Case Window.Anchor.TopLeft
|
||||
If oRect IsNot Nothing Then
|
||||
TopLeft = oRect
|
||||
For Each oRect As KeyValuePair(Of String, RectangleInfo) In oRectangles
|
||||
Select Case oRect.Key
|
||||
Case Window.Anchor.TopLeft.ToString
|
||||
If oRect.Value IsNot Nothing Then
|
||||
TopLeft = oRect.Value
|
||||
End If
|
||||
|
||||
Case Window.Anchor.TopRight
|
||||
If oRect IsNot Nothing Then
|
||||
TopRight = oRect
|
||||
Case Window.Anchor.TopRight.ToString
|
||||
If oRect.Value IsNot Nothing Then
|
||||
TopRight = oRect.Value
|
||||
End If
|
||||
|
||||
Case Window.Anchor.BottomLeft
|
||||
If oRect IsNot Nothing Then
|
||||
BottomLeft = oRect
|
||||
Case Window.Anchor.BottomLeft.ToString
|
||||
If oRect.Value IsNot Nothing Then
|
||||
BottomLeft = oRect.Value
|
||||
End If
|
||||
|
||||
Case Window.Anchor.BottomRight
|
||||
If oRect IsNot Nothing Then
|
||||
BottomRight = oRect
|
||||
Case Window.Anchor.BottomRight.ToString
|
||||
If oRect.Value IsNot Nothing Then
|
||||
BottomRight = oRect.Value
|
||||
End If
|
||||
End Select
|
||||
Next
|
||||
|
||||
txtControlBounds.Text = GetBoundsString(TopLeft, TopRight, BottomLeft, BottomRight)
|
||||
Next
|
||||
Catch ex As Exception
|
||||
Logger.Error(ex)
|
||||
MsgBox($"Control Koordinaten konnten nicht ausgelesen werden!{vbNewLine}Dies kann ein temporärer Fehler sein. Bitte versuchen Sie es noch einmal.", MsgBoxStyle.Exclamation, Text)
|
||||
Finally
|
||||
Logger.EndBlock()
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Public Shared Function GetBoundsString(TopLeft As RectangleInfo, TopRight As RectangleInfo, BottomLeft As RectangleInfo, BottomRight As RectangleInfo)
|
||||
|
||||
@ -102,7 +102,8 @@ Public Class frmStart
|
||||
|
||||
Private Sub WatcherChanged_New(ByVal sender As Object, ByVal e As EventArgs) Handles _Watcher.Changed
|
||||
If MONITORING_ACTIVE = False Then
|
||||
NotifyIconMain.ShowBalloonTip(20000, "Clipboard Watcher", "Clipboard-watcher is inactive.", ToolTipIcon.Info)
|
||||
Logger.Info("Clipboard Watcher is inactive!")
|
||||
'NotifyIconMain.ShowBalloonTip(20000, "Clipboard Watcher", "Clipboard-watcher is inactive.", ToolTipIcon.Info)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
@ -129,7 +130,7 @@ Public Class frmStart
|
||||
Dim oWindowInfo = GetWindowInfo()
|
||||
Dim ClipboardContents As String = Clipboard.GetText()
|
||||
Dim oProfileFilter As ProfileFilter
|
||||
Dim oFocusedControl As IntPtr = FocusedControlinActiveWindow(Handle)
|
||||
|
||||
Try
|
||||
CurrMatchTreeView.Nodes.Clear()
|
||||
CurrMatchTreeView.ImageList = ImageList1
|
||||
@ -163,7 +164,7 @@ Public Class frmStart
|
||||
CURRENT_MATCHING_PROFILES = oProfiles
|
||||
CURRENT_CLIPBOARD_CONTENTS = ClipboardContents
|
||||
Catch ex As Exception
|
||||
MsgBox("Fehler beim Auswerten der Profile. Mehr Informationen im Log.")
|
||||
MsgBox("Fehler beim Auswerten der Profile. Mehr Informationen im Log.", MsgBoxStyle.Critical, Text)
|
||||
Logger.Error(ex)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
@ -112,6 +112,8 @@
|
||||
<File Id="DevExpress.Data.v18.1" Name="DevExpress.Data.v18.1.dll" KeyPath="yes" />
|
||||
<File Id="DevExpress.Images.v18.1" Name="DevExpress.Images.v18.1.dll" />
|
||||
<File Id="DevExpress.Printing.v18.1.Core" Name="DevExpress.Printing.v18.1.Core.dll" />
|
||||
<File Id="DevExpress.Office.v18.1.Core" Name="DevExpress.Office.v18.1.Core.dll" />
|
||||
<File Id="DevExpress.Pdf.v18.1.Core" Name="DevExpress.Pdf.v18.1.Core.dll" />
|
||||
<File Id="DevExpress.Sparkline.v18.1.Core" Name="DevExpress.Sparkline.v18.1.Core.dll" />
|
||||
<File Id="DevExpress.Utils.v18.1" Name="DevExpress.Utils.v18.1.dll" />
|
||||
<File Id="DevExpress.XtraBars.v18.1" Name="DevExpress.XtraBars.v18.1.dll" />
|
||||
@ -122,6 +124,8 @@
|
||||
<File Id="DevExpress.XtraLayout.v18.1" Name="DevExpress.XtraLayout.v18.1.dll" />
|
||||
<File Id="DevExpress.XtraPrinting.v18.1" Name="DevExpress.XtraPrinting.v18.1.dll" />
|
||||
<File Id="DevExpress.XtraTreeList.v18.1" Name="DevExpress.XtraTreeList.v18.1.dll" />
|
||||
<File Id="DevExpress.XtraDialogs.v18.1" Name="DevExpress.XtraDialogs.v18.1.dll" />
|
||||
<File Id="DevExpress.Dialogs.v18.1.Core" Name="DevExpress.Dialogs.v18.1.Core.dll" />
|
||||
</Component>
|
||||
|
||||
<Component Id="GDPictureLibs" Guid="9ea5ab43-58ff-4813-9a8b-f854784f0275">
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user