implement search by control bounds
This commit is contained in:
43
app/DD_Clipboard_Searcher/ClassProfileMatch.vb
Normal file
43
app/DD_Clipboard_Searcher/ClassProfileMatch.vb
Normal file
@@ -0,0 +1,43 @@
|
||||
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
|
||||
Reference in New Issue
Block a user