Add new placeholder #&# for tab titles in TreeView

This commit is contained in:
Jonathan Jenne 2022-09-15 14:34:39 +02:00
parent 6852910e9e
commit 0687b80d0e
2 changed files with 16 additions and 12 deletions

View File

@ -138,9 +138,9 @@ Public Class GridLoader
Private Function GetIconEdit() As RepositoryItemImageComboBox
Dim oIconEdit As New RepositoryItemImageComboBox With {
.SmallImages = SvgImageCollection,
.GlyphAlignment = HorzAlignment.Near
}
.SmallImages = SvgImageCollection,
.GlyphAlignment = HorzAlignment.Near
}
oIconEdit.Buttons.Clear()
oIconEdit.Items.AddRange(New List(Of ImageComboBoxItem) From {
New ImageComboBoxItem("Email", "MAIL", NodeImage.Mail),

View File

@ -1,4 +1,5 @@
Imports System.ComponentModel
Imports System.Text.RegularExpressions
Imports DevExpress.Utils
Imports DevExpress.XtraEditors
Imports DevExpress.XtraEditors.Controls
@ -26,8 +27,8 @@ Public Class frmMonitor
Private ReadOnly ColumnMarkers As New List(Of String) From {"[HTML]", "[SQL]", "[FILENAME]"}
Private ReadOnly SQLColumns As New List(Of String) From {"SELECT1", "SELECT2", "SELECT3", "SELECT4"}
Private ReadOnly DocViewColumns As New List(Of String) From {"DOCVIEW1", "DOCVIEW2"}
Private ReadOnly HtmlViewColumns As New List(Of String) From {"HTML1", "HTML2"}
Private ReadOnly DataColumns As List(Of String) = SQLColumns.
Private ReadOnly Property HtmlViewColumns As New List(Of String) From {"HTML1", "HTML2"}
Private ReadOnly Property DataColumns As List(Of String) = SQLColumns.
Concat(DocViewColumns).
Concat(HtmlViewColumns).
ToList
@ -467,16 +468,19 @@ Public Class frmMonitor
End Try
End Sub
Private Function ExtractTitle(Value As String) As Tuple(Of String, String)
If Value.Contains("|"c) Then
Dim oSplit = Value.Split("|"c).ToList
Dim oValue = oSplit.First()
Dim oTitle = oSplit.Item(1)
Private Function ExtractTitle(pValue As String) As Tuple(Of String, String)
Dim oTitleRegex As New Regex("([\s\S]*)#&#([\s\S]*)#&#$")
If oTitleRegex.IsMatch(pValue) Then
Dim oMatch = oTitleRegex.Match(pValue)
Dim oValue = oMatch.Groups.Item(1).Value
Dim oTitle = oMatch.Groups.Item(2).Value
Return New Tuple(Of String, String)(oValue, oTitle)
Else
Return New Tuple(Of String, String)(pValue, Nothing)
End If
Return New Tuple(Of String, String)(Value, Nothing)
End Function
Private Sub ExpandNodes(RootNode As TreeListNode, Condition As Predicate(Of TreeListNode))