44 lines
1.2 KiB
VB.net
44 lines
1.2 KiB
VB.net
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
|