Common/SQLEditor: Fix bugs, switch to dictionary

This commit is contained in:
Jonathan Jenne
2022-05-11 16:37:52 +02:00
parent ece2ec0e47
commit 25a1386bc6
12 changed files with 120 additions and 77 deletions

View File

@@ -31,11 +31,11 @@ Namespace SQLEditor
FileFlow
End Enum
Public Sub New(pTitle As String, pDescription As String, pModule As String, pName As String)
Public Sub New(pTitle As String, pDescription As String, pModule As String, pValue As String)
Title = pTitle
Description = pDescription
Name = pName
Name = pValue
[Module] = pModule
End Sub

View File

@@ -52,7 +52,7 @@ Namespace SQLEditor
Return oGroup1
End Function
Public Function GetManualPlaceholders(pPlaceholders As List(Of String), pPrefix As String) As GalleryItemGroup
Public Function GetManualPlaceholders(pPlaceholders As Dictionary(Of String, String), pPrefix As String) As GalleryItemGroup
Dim oImage As SvgImage = My.Resources.handtool
Dim oItems As New List(Of GalleryItem)()
Dim oPrefix As String = pPrefix
@@ -63,7 +63,7 @@ Namespace SQLEditor
If pPlaceholders.Count > 0 Then
For Each oManualPlaceholder In pPlaceholders
Dim oPlaceholder = New Placeholder(oManualPlaceholder, "Manuelles Attribut", oPrefix, oManualPlaceholder)
Dim oPlaceholder = New Placeholder(oManualPlaceholder.Key, "Manuelles Attribut", oPrefix, oManualPlaceholder.Value)
oItems.Add(GetGalleryItem(oPlaceholder, oImage))
Next
Else Return Nothing
@@ -74,7 +74,7 @@ Namespace SQLEditor
Return oGroup1
End Function
Public Function GetAutomaticPlaceholders(pPlaceholders As List(Of String), pPrefix As String) As GalleryItemGroup
Public Function GetAutomaticPlaceholders(pPlaceholders As Dictionary(Of String, String), pPrefix As String) As GalleryItemGroup
Dim oImage As SvgImage = My.Resources.autoarrange
Dim oItems As New List(Of GalleryItem)()
Dim oPrefix As String = pPrefix
@@ -85,7 +85,7 @@ Namespace SQLEditor
If pPlaceholders.Count > 0 Then
For Each oManualPlaceholder In pPlaceholders
Dim oPlaceholder = New Placeholder(oManualPlaceholder, "Automatisches Attribut", oPrefix, oManualPlaceholder)
Dim oPlaceholder = New Placeholder(oManualPlaceholder.Key, "Automatisches Attribut", oPrefix, oManualPlaceholder.Value)
oItems.Add(GetGalleryItem(oPlaceholder, oImage))
Next