Zooflow/SQLEditor: include clipboard ,small fixes
This commit is contained in:
parent
77a7cb4d75
commit
61b2b25f7e
@ -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"}
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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()
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user