Common/SQLEditor: add configurable title for auto/manual palceholders
This commit is contained in:
@@ -52,7 +52,7 @@ Namespace SQLEditor
|
||||
Return oGroup1
|
||||
End Function
|
||||
|
||||
Public Function GetManualPlaceholders(pPlaceholders As Dictionary(Of String, String), pPrefix As String) As GalleryItemGroup
|
||||
Public Function GetManualPlaceholders(pPlaceholders As Dictionary(Of String, String), pPrefix As String, pTitle As String) As GalleryItemGroup
|
||||
Dim oImage As SvgImage = My.Resources.handtool
|
||||
Dim oItems As New List(Of GalleryItem)()
|
||||
Dim oPrefix As String = pPrefix
|
||||
@@ -63,18 +63,18 @@ Namespace SQLEditor
|
||||
|
||||
If pPlaceholders.Count > 0 Then
|
||||
For Each oManualPlaceholder In pPlaceholders
|
||||
Dim oPlaceholder = New Placeholder(oManualPlaceholder.Key, "Manuelles Attribut", oPrefix, oManualPlaceholder.Value)
|
||||
Dim oPlaceholder = New Placeholder(oManualPlaceholder.Key, pTitle, oPrefix, oManualPlaceholder.Value)
|
||||
oItems.Add(GetGalleryItem(oPlaceholder, oImage))
|
||||
Next
|
||||
Else Return Nothing
|
||||
End If
|
||||
|
||||
Dim oGroup1 = New GalleryItemGroup() With {.Caption = "Manuelle Attribute"}
|
||||
Dim oGroup1 = New GalleryItemGroup() With {.Caption = pTitle}
|
||||
oGroup1.Items.AddRange(oItems.ToArray)
|
||||
Return oGroup1
|
||||
End Function
|
||||
|
||||
Public Function GetAutomaticPlaceholders(pPlaceholders As Dictionary(Of String, String), pPrefix As String) As GalleryItemGroup
|
||||
Public Function GetAutomaticPlaceholders(pPlaceholders As Dictionary(Of String, String), pPrefix As String, pTitle As String) As GalleryItemGroup
|
||||
Dim oImage As SvgImage = My.Resources.autoarrange
|
||||
Dim oItems As New List(Of GalleryItem)()
|
||||
Dim oPrefix As String = pPrefix
|
||||
@@ -85,14 +85,14 @@ Namespace SQLEditor
|
||||
|
||||
If pPlaceholders.Count > 0 Then
|
||||
For Each oManualPlaceholder In pPlaceholders
|
||||
Dim oPlaceholder = New Placeholder(oManualPlaceholder.Key, "Automatisches Attribut", oPrefix, oManualPlaceholder.Value)
|
||||
Dim oPlaceholder = New Placeholder(oManualPlaceholder.Key, pTitle, oPrefix, oManualPlaceholder.Value)
|
||||
oItems.Add(GetGalleryItem(oPlaceholder, oImage))
|
||||
Next
|
||||
|
||||
Else Return Nothing
|
||||
End If
|
||||
|
||||
Dim oGroup1 = New GalleryItemGroup() With {.Caption = "Automatisches Attribut"}
|
||||
Dim oGroup1 = New GalleryItemGroup() With {.Caption = pTitle}
|
||||
|
||||
oGroup1.Items.AddRange(oItems.ToArray)
|
||||
Return oGroup1
|
||||
|
||||
Reference in New Issue
Block a user