diff --git a/Controls.SQLEditor/Placeholders.vb b/Controls.SQLEditor/Placeholders.vb index 5ba62409..38c4a8e3 100644 --- a/Controls.SQLEditor/Placeholders.vb +++ b/Controls.SQLEditor/Placeholders.vb @@ -2,7 +2,7 @@ Imports DevExpress.XtraBars.Ribbon Public Class Placeholders - Public Function GetInternalGroup() As GalleryItemGroup + Public Function GetInternalPlaceholders() As GalleryItemGroup Dim oModule = "INT" Dim oImage = My.Resources.electronics_desktopmac @@ -18,6 +18,19 @@ Public Class Placeholders Return oGroup1 End Function + Public Function GetClipboardPlaceholder() As GalleryItemGroup + Dim oModule = "CLIP" + Dim oImage = My.Resources.electronics_desktopmac + + Dim oItems As New List(Of GalleryItem)() From { + GetGalleryItem(New Placeholder("BOARD", "Zwischenablage", oModule, "BOARD"), oImage) + } + Dim oGroup1 = New GalleryItemGroup() With {.Caption = "Zwischenablage"} + + oGroup1.Items.AddRange(oItems.ToArray) + Return oGroup1 + End Function + Public Function GetManualPlaceholders() As GalleryItemGroup Return GetManualPlaceholders(New List(Of String)) End Function @@ -30,10 +43,7 @@ Public Class Placeholders For Each oManualPlaceholder In pPlaceholders oItems.Add(GetGalleryItem(New Placeholder(oManualPlaceholder, "Manuelles Attribut", "ATTR_M", oManualPlaceholder), oImage)) Next - - Else - oItems.Add(GetGalleryItem(New Placeholder("Attribut", "Manuelles Attribut", "ATTR_M", "ATTRIBUTE"), oImage)) - + Else Return Nothing End If Dim oGroup1 = New GalleryItemGroup() With {.Caption = "Manuelle Attribute"} @@ -54,9 +64,7 @@ Public Class Placeholders oItems.Add(GetGalleryItem(New Placeholder(oManualPlaceholder, "Automatisches Attribut", "ATTR_A", oManualPlaceholder), oImage)) Next - Else - oItems.Add(GetGalleryItem(New Placeholder("Attribut", "Automatisches Attribut", "ATTR_A", "ATTRIBUTE"), oImage)) - + Else Return Nothing End If Dim oGroup1 = New GalleryItemGroup() With {.Caption = "Automatisches Attribut"} diff --git a/Controls.SQLEditor/frmSQLEditor.vb b/Controls.SQLEditor/frmSQLEditor.vb index 3b70ddf3..d742071c 100644 --- a/Controls.SQLEditor/frmSQLEditor.vb +++ b/Controls.SQLEditor/frmSQLEditor.vb @@ -17,6 +17,7 @@ Public Class frmSQLEditor Public Property SQLCommand As String = "" Public Property SQLConnection As Integer = 0 + Public Property LoadClipboardPlaceholders As Boolean = False Public Property PlaceholdersManual As List(Of String) Public Property PlaceholdersAutomatic As List(Of String) @@ -87,12 +88,26 @@ Public Class frmSQLEditor End Sub Private Function LoadPlaceholders() As List(Of GalleryItemGroup) - Return New List(Of GalleryItemGroup)() From { - Placeholders.GetInternalGroup(), - Placeholders.GetUserGroup(), - Placeholders.GetAutomaticPlaceholders(PlaceholdersAutomatic), - Placeholders.GetManualPlaceholders(PlaceholdersManual) + Dim oPlaceholders = New List(Of GalleryItemGroup)() From { + Placeholders.GetInternalPlaceholders(), + Placeholders.GetUserGroup() } + + Dim oAutomaticAttributes = Placeholders.GetAutomaticPlaceholders(PlaceholdersAutomatic) + If oAutomaticAttributes IsNot Nothing Then + oPlaceholders.Add(oAutomaticAttributes) + End If + + Dim oManualPlaceholders = Placeholders.GetManualPlaceholders(PlaceholdersManual) + If oManualPlaceholders IsNot Nothing Then + oPlaceholders.Add(oManualPlaceholders) + End If + + If LoadClipboardPlaceholders Then + oPlaceholders.Add(Placeholders.GetClipboardPlaceholder) + End If + + Return oPlaceholders End Function Private Function LoadConnections() As GalleryItemGroup @@ -176,8 +191,9 @@ Public Class frmSQLEditor Private Sub ExecuteSQL() Try - Dim oSql = txtSQLCommand.Document.Text + ViewPlaceholders.FocusInvalidRow() + Dim oSql = txtSQLCommand.Document.Text Dim oPlaceholders As List(Of Placeholder) = GridPlaceholders.DataSource If oPlaceholders IsNot Nothing Then diff --git a/Controls.SQLEditor/frmSQLResult.vb b/Controls.SQLEditor/frmSQLResult.vb index 72c96da8..f7ced580 100644 --- a/Controls.SQLEditor/frmSQLResult.vb +++ b/Controls.SQLEditor/frmSQLResult.vb @@ -1,5 +1,8 @@ -Public Class frmSQLResult +Imports DigitalData.GUIs.Common + +Public Class frmSQLResult Private ReadOnly Table As DataTable + Private ReadOnly GridBuilder As GridBuilder Public Sub New(pTable As DataTable) ' Dieser Aufruf ist für den Designer erforderlich. @@ -7,6 +10,8 @@ ' Fügen Sie Initialisierungen nach dem InitializeComponent()-Aufruf hinzu. Table = pTable + GridBuilder = New GridBuilder(GridViewResult). + WithClipboardHandler() End Sub Private Sub frmSQLResult_Load(sender As Object, e As EventArgs) Handles MyBase.Load diff --git a/GUIs.ZooFlow/Administration/Globix/frmAdmin_Globix.vb b/GUIs.ZooFlow/Administration/Globix/frmAdmin_Globix.vb index 86d4da54..9b5c9abe 100644 --- a/GUIs.ZooFlow/Administration/Globix/frmAdmin_Globix.vb +++ b/GUIs.ZooFlow/Administration/Globix/frmAdmin_Globix.vb @@ -354,7 +354,8 @@ Public Class frmAdmin_Globix Dim oForm2 As New frmSQLEditor(My.LogConfig, My.DatabaseECM) With { .SQLCommand = SQL_RESULTTextBox.Text, .SQLConnection = CONNECTION_IDTextBox.Text, - .PlaceholdersManual = AttributesManual + .PlaceholdersManual = AttributesManual, + .LoadClipboardPlaceholders = True } oForm2.ShowDialog()