SQLEditor: Improve editor, add support for connections
This commit is contained in:
parent
ae6edf4fce
commit
24fb1f00bc
20
Controls.SQLEditor/My Project/Resources.Designer.vb
generated
20
Controls.SQLEditor/My Project/Resources.Designer.vb
generated
@ -170,6 +170,16 @@ Namespace My.Resources
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Sucht eine lokalisierte Ressource vom Typ DevExpress.Utils.Svg.SvgImage.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property editdatasource2() As DevExpress.Utils.Svg.SvgImage
|
||||
Get
|
||||
Dim obj As Object = ResourceManager.GetObject("editdatasource2", resourceCulture)
|
||||
Return CType(obj,DevExpress.Utils.Svg.SvgImage)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Sucht eine lokalisierte Ressource vom Typ DevExpress.Utils.Svg.SvgImage.
|
||||
'''</summary>
|
||||
@ -200,6 +210,16 @@ Namespace My.Resources
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Sucht eine lokalisierte Ressource vom Typ DevExpress.Utils.Svg.SvgImage.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property togglefieldcodes() As DevExpress.Utils.Svg.SvgImage
|
||||
Get
|
||||
Dim obj As Object = ResourceManager.GetObject("togglefieldcodes", resourceCulture)
|
||||
Return CType(obj,DevExpress.Utils.Svg.SvgImage)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Sucht eine lokalisierte Ressource vom Typ DevExpress.Utils.Svg.SvgImage.
|
||||
'''</summary>
|
||||
|
||||
@ -139,18 +139,24 @@
|
||||
<data name="highimportance" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\highimportance.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
|
||||
</data>
|
||||
<data name="actions_database" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\actions_database.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
|
||||
<data name="cleartablestyle" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\cleartablestyle.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
|
||||
</data>
|
||||
<data name="electronics_desktopmac" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\electronics_desktopmac.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
|
||||
</data>
|
||||
<data name="editdatasource2" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\editdatasource2.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
|
||||
</data>
|
||||
<data name="clearall" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\clearall.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
|
||||
</data>
|
||||
<data name="actions_database2" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\actions_database2.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
|
||||
</data>
|
||||
<data name="actions_database" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\actions_database.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
|
||||
</data>
|
||||
<data name="updatedataextract1" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\updatedataextract1.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
|
||||
</data>
|
||||
@ -169,7 +175,7 @@
|
||||
<data name="actions_database1" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\actions_database1.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
|
||||
</data>
|
||||
<data name="cleartablestyle" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\cleartablestyle.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
|
||||
<data name="togglefieldcodes" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\togglefieldcodes.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
|
||||
</data>
|
||||
</root>
|
||||
17
Controls.SQLEditor/Resources/editdatasource2.svg
Normal file
17
Controls.SQLEditor/Resources/editdatasource2.svg
Normal file
@ -0,0 +1,17 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<svg x="0px" y="0px" viewBox="0 0 32 32" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" id="Layer_1" style="enable-background:new 0 0 32 32">
|
||||
<style type="text/css">
|
||||
.Green{fill:#039C23;}
|
||||
.Black{fill:#727272;}
|
||||
.Red{fill:#D11C1C;}
|
||||
.Yellow{fill:#FFB115;}
|
||||
.Blue{fill:#1177D7;}
|
||||
.White{fill:#FFFFFF;}
|
||||
.st0{opacity:0.5;}
|
||||
.st1{opacity:0.75;}
|
||||
</style>
|
||||
<g id="EditDataSource">
|
||||
<path d="M4,10V6c0-2.2,4.5-4,10-4s10,1.8,10,4v4c0,2.2-4.5,4-10,4S4,12.2,4,10z M24,18L24,18C24,18,24,18,24,18 C24,18,24,18,24,18z M14,20c5.5,0,10-1.8,10-4v-4c0,2.2-4.5,4-10,4S4,14.2,4,12v4C4,18.2,8.5,20,14,20z M15.2,26l4.8-4.8 c-1.7,0.5-3.7,0.8-6,0.8c-5.5,0-10-1.8-10-4v4c0,2.2,4.5,4,10,4C14.4,26,14.8,26,15.2,26z" class="Yellow" />
|
||||
<path d="M29,23l-8,8l-4-4l8-8L29,23z M30,22l1.7-1.7c0.4-0.4,0.4-1,0-1.3L29,16.3c-0.4-0.4-1-0.4-1.3,0L26,18L30,22z M16,28v4h4L16,28z" class="Blue" />
|
||||
</g>
|
||||
</svg>
|
||||
13
Controls.SQLEditor/Resources/togglefieldcodes.svg
Normal file
13
Controls.SQLEditor/Resources/togglefieldcodes.svg
Normal file
@ -0,0 +1,13 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<svg x="0px" y="0px" viewBox="0 0 32 32" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" id="ToggleFieldCodes" style="enable-background:new 0 0 32 32">
|
||||
<style type="text/css">
|
||||
.Black{fill:#727272;}
|
||||
.Yellow{fill:#FFB115;}
|
||||
.st0{opacity:0.75;}
|
||||
</style>
|
||||
<path d="M32,31V15c0-0.6-0.5-1-1-1H9c-0.6,0-1,0.4-1,1v16c0,0.5,0.4,1,1,1h22C31.5,32,32,31.5,32,31z" class="Yellow" />
|
||||
<g class="st0">
|
||||
<path d="M24,17V1c0-0.6-0.5-1-1-1H1C0.4,0,0,0.4,0,1v16c0,0.5,0.4,1,1,1h22C23.5,18,24,17.5,24,17z" class="Yellow" />
|
||||
</g>
|
||||
<path d="M12.6,21.4c0.2-0.3,0.5-0.6,0.8-0.8c0.3-0.2,0.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6.2,5.2C6.1,5.5,6,5.8,6,6.2v0.6c0,0.3,0,0.5-0.1,0.7C5.8,7.7,5.7,7.9,5.5,8C5.4,8.1,5.3,8.2,5.1,8.2 c0,0-0.1,0-0.1,0V9.8z" class="Black" />
|
||||
</svg>
|
||||
@ -249,5 +249,11 @@
|
||||
<ItemGroup>
|
||||
<None Include="Resources\cleartablestyle.svg" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\editdatasource2.svg" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\togglefieldcodes.svg" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
|
||||
</Project>
|
||||
85
Controls.SQLEditor/frmSQLEditor.Designer.vb
generated
85
Controls.SQLEditor/frmSQLEditor.Designer.vb
generated
@ -24,21 +24,22 @@ Partial Class frmSQLEditor
|
||||
Private Sub InitializeComponent()
|
||||
Me.components = New System.ComponentModel.Container()
|
||||
Me.RibbonControl1 = New DevExpress.XtraBars.Ribbon.RibbonControl()
|
||||
Me.RibbonGalleryBarItem1 = New DevExpress.XtraBars.RibbonGalleryBarItem()
|
||||
Me.GalleryPlaceholders = New DevExpress.XtraBars.RibbonGalleryBarItem()
|
||||
Me.SvgImageCollection1 = New DevExpress.Utils.SvgImageCollection(Me.components)
|
||||
Me.btnEditConnections = New DevExpress.XtraBars.BarButtonItem()
|
||||
Me.btnSave = New DevExpress.XtraBars.BarButtonItem()
|
||||
Me.btnExecuteSQL = New DevExpress.XtraBars.BarButtonItem()
|
||||
Me.RibbonGalleryBarItem2 = New DevExpress.XtraBars.RibbonGalleryBarItem()
|
||||
Me.GalleryConnection = New DevExpress.XtraBars.RibbonGalleryBarItem()
|
||||
Me.chkClearPlaceholders = New DevExpress.XtraBars.BarCheckItem()
|
||||
Me.btnClearPlaceholders = New DevExpress.XtraBars.BarButtonItem()
|
||||
Me.chkShowPlaceholders = New DevExpress.XtraBars.BarCheckItem()
|
||||
Me.RibbonPage1 = New DevExpress.XtraBars.Ribbon.RibbonPage()
|
||||
Me.RibbonPageGroup3 = New DevExpress.XtraBars.Ribbon.RibbonPageGroup()
|
||||
Me.RibbonPageGroup4 = New DevExpress.XtraBars.Ribbon.RibbonPageGroup()
|
||||
Me.RibbonPageGroup1 = New DevExpress.XtraBars.Ribbon.RibbonPageGroup()
|
||||
Me.RibbonStatusBar1 = New DevExpress.XtraBars.Ribbon.RibbonStatusBar()
|
||||
Me.RibbonPage2 = New DevExpress.XtraBars.Ribbon.RibbonPage()
|
||||
Me.RichEditControl1 = New DevExpress.XtraRichEdit.RichEditControl()
|
||||
Me.txtSQLCommand = New DevExpress.XtraRichEdit.RichEditControl()
|
||||
Me.SplitContainerControl1 = New DevExpress.XtraEditors.SplitContainerControl()
|
||||
Me.GridPlaceholders = New DevExpress.XtraGrid.GridControl()
|
||||
Me.ViewPlaceholders = New DevExpress.XtraGrid.Views.Grid.GridView()
|
||||
@ -59,25 +60,26 @@ Partial Class frmSQLEditor
|
||||
'RibbonControl1
|
||||
'
|
||||
Me.RibbonControl1.ExpandCollapseItem.Id = 0
|
||||
Me.RibbonControl1.Items.AddRange(New DevExpress.XtraBars.BarItem() {Me.RibbonControl1.ExpandCollapseItem, Me.RibbonControl1.SearchEditItem, Me.RibbonGalleryBarItem1, Me.btnEditConnections, Me.btnSave, Me.btnExecuteSQL, Me.RibbonGalleryBarItem2, Me.chkClearPlaceholders, Me.btnClearPlaceholders})
|
||||
Me.RibbonControl1.Items.AddRange(New DevExpress.XtraBars.BarItem() {Me.RibbonControl1.ExpandCollapseItem, Me.RibbonControl1.SearchEditItem, Me.GalleryPlaceholders, Me.btnEditConnections, Me.btnSave, Me.btnExecuteSQL, Me.GalleryConnection, Me.chkClearPlaceholders, Me.btnClearPlaceholders, Me.chkShowPlaceholders})
|
||||
Me.RibbonControl1.Location = New System.Drawing.Point(0, 0)
|
||||
Me.RibbonControl1.MaxItemId = 11
|
||||
Me.RibbonControl1.MaxItemId = 13
|
||||
Me.RibbonControl1.Name = "RibbonControl1"
|
||||
Me.RibbonControl1.Pages.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPage() {Me.RibbonPage1})
|
||||
Me.RibbonControl1.ShowApplicationButton = DevExpress.Utils.DefaultBoolean.[False]
|
||||
Me.RibbonControl1.Size = New System.Drawing.Size(1056, 158)
|
||||
Me.RibbonControl1.StatusBar = Me.RibbonStatusBar1
|
||||
'
|
||||
'RibbonGalleryBarItem1
|
||||
'GalleryPlaceholders
|
||||
'
|
||||
Me.RibbonGalleryBarItem1.Caption = "RibbonGalleryBarItem1"
|
||||
Me.GalleryPlaceholders.Caption = "RibbonGalleryBarItem1"
|
||||
'
|
||||
'
|
||||
'
|
||||
Me.RibbonGalleryBarItem1.Gallery.Images = Me.SvgImageCollection1
|
||||
Me.RibbonGalleryBarItem1.Gallery.ShowGroupCaption = True
|
||||
Me.RibbonGalleryBarItem1.Gallery.ShowItemText = True
|
||||
Me.RibbonGalleryBarItem1.Id = 1
|
||||
Me.RibbonGalleryBarItem1.Name = "RibbonGalleryBarItem1"
|
||||
Me.GalleryPlaceholders.Gallery.Images = Me.SvgImageCollection1
|
||||
Me.GalleryPlaceholders.Gallery.ShowGroupCaption = True
|
||||
Me.GalleryPlaceholders.Gallery.ShowItemText = True
|
||||
Me.GalleryPlaceholders.Id = 1
|
||||
Me.GalleryPlaceholders.Name = "GalleryPlaceholders"
|
||||
'
|
||||
'SvgImageCollection1
|
||||
'
|
||||
@ -104,17 +106,17 @@ Partial Class frmSQLEditor
|
||||
Me.btnExecuteSQL.ImageOptions.SvgImage = Global.DigitalData.Controls.SQLEditor.My.Resources.Resources.updatedataextract3
|
||||
Me.btnExecuteSQL.Name = "btnExecuteSQL"
|
||||
'
|
||||
'RibbonGalleryBarItem2
|
||||
'GalleryConnection
|
||||
'
|
||||
Me.RibbonGalleryBarItem2.Caption = "RibbonGalleryBarItem2"
|
||||
Me.GalleryConnection.Caption = "RibbonGalleryBarItem2"
|
||||
'
|
||||
'
|
||||
'
|
||||
Me.RibbonGalleryBarItem2.Gallery.CheckDrawMode = DevExpress.XtraBars.Ribbon.Gallery.CheckDrawMode.ImageAndText
|
||||
Me.RibbonGalleryBarItem2.Gallery.ItemCheckMode = DevExpress.XtraBars.Ribbon.Gallery.ItemCheckMode.SingleRadio
|
||||
Me.RibbonGalleryBarItem2.Gallery.ShowItemText = True
|
||||
Me.RibbonGalleryBarItem2.Id = 5
|
||||
Me.RibbonGalleryBarItem2.Name = "RibbonGalleryBarItem2"
|
||||
Me.GalleryConnection.Gallery.CheckDrawMode = DevExpress.XtraBars.Ribbon.Gallery.CheckDrawMode.ImageAndText
|
||||
Me.GalleryConnection.Gallery.ItemCheckMode = DevExpress.XtraBars.Ribbon.Gallery.ItemCheckMode.SingleRadio
|
||||
Me.GalleryConnection.Gallery.ShowItemText = True
|
||||
Me.GalleryConnection.Id = 5
|
||||
Me.GalleryConnection.Name = "GalleryConnection"
|
||||
'
|
||||
'chkClearPlaceholders
|
||||
'
|
||||
@ -130,6 +132,15 @@ Partial Class frmSQLEditor
|
||||
Me.btnClearPlaceholders.ImageOptions.SvgImage = Global.DigitalData.Controls.SQLEditor.My.Resources.Resources.clearall
|
||||
Me.btnClearPlaceholders.Name = "btnClearPlaceholders"
|
||||
'
|
||||
'chkShowPlaceholders
|
||||
'
|
||||
Me.chkShowPlaceholders.BindableChecked = True
|
||||
Me.chkShowPlaceholders.Caption = "Platzhalter anzeigen"
|
||||
Me.chkShowPlaceholders.Checked = True
|
||||
Me.chkShowPlaceholders.Id = 12
|
||||
Me.chkShowPlaceholders.ImageOptions.SvgImage = Global.DigitalData.Controls.SQLEditor.My.Resources.Resources.togglefieldcodes
|
||||
Me.chkShowPlaceholders.Name = "chkShowPlaceholders"
|
||||
'
|
||||
'RibbonPage1
|
||||
'
|
||||
Me.RibbonPage1.Groups.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPageGroup() {Me.RibbonPageGroup3, Me.RibbonPageGroup4, Me.RibbonPageGroup1})
|
||||
@ -147,13 +158,14 @@ Partial Class frmSQLEditor
|
||||
'
|
||||
Me.RibbonPageGroup4.Alignment = DevExpress.XtraBars.Ribbon.RibbonPageGroupAlignment.Far
|
||||
Me.RibbonPageGroup4.ImageOptions.SvgImage = Global.DigitalData.Controls.SQLEditor.My.Resources.Resources.actions_database2
|
||||
Me.RibbonPageGroup4.ItemLinks.Add(Me.RibbonGalleryBarItem2)
|
||||
Me.RibbonPageGroup4.ItemLinks.Add(Me.GalleryConnection)
|
||||
Me.RibbonPageGroup4.Name = "RibbonPageGroup4"
|
||||
Me.RibbonPageGroup4.Text = "Verbindungen"
|
||||
'
|
||||
'RibbonPageGroup1
|
||||
'
|
||||
Me.RibbonPageGroup1.ItemLinks.Add(Me.RibbonGalleryBarItem1)
|
||||
Me.RibbonPageGroup1.ItemLinks.Add(Me.GalleryPlaceholders)
|
||||
Me.RibbonPageGroup1.ItemLinks.Add(Me.chkShowPlaceholders)
|
||||
Me.RibbonPageGroup1.ItemLinks.Add(Me.chkClearPlaceholders)
|
||||
Me.RibbonPageGroup1.ItemLinks.Add(Me.btnClearPlaceholders)
|
||||
Me.RibbonPageGroup1.Name = "RibbonPageGroup1"
|
||||
@ -171,24 +183,25 @@ Partial Class frmSQLEditor
|
||||
Me.RibbonPage2.Name = "RibbonPage2"
|
||||
Me.RibbonPage2.Text = "RibbonPage2"
|
||||
'
|
||||
'RichEditControl1
|
||||
'txtSQLCommand
|
||||
'
|
||||
Me.RichEditControl1.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.RichEditControl1.Location = New System.Drawing.Point(0, 0)
|
||||
Me.RichEditControl1.MenuManager = Me.RibbonControl1
|
||||
Me.RichEditControl1.Name = "RichEditControl1"
|
||||
Me.RichEditControl1.Size = New System.Drawing.Size(737, 508)
|
||||
Me.RichEditControl1.TabIndex = 2
|
||||
Me.txtSQLCommand.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.txtSQLCommand.Location = New System.Drawing.Point(0, 0)
|
||||
Me.txtSQLCommand.MenuManager = Me.RibbonControl1
|
||||
Me.txtSQLCommand.Name = "txtSQLCommand"
|
||||
Me.txtSQLCommand.Size = New System.Drawing.Size(802, 508)
|
||||
Me.txtSQLCommand.TabIndex = 2
|
||||
'
|
||||
'SplitContainerControl1
|
||||
'
|
||||
Me.SplitContainerControl1.CollapsePanel = DevExpress.XtraEditors.SplitCollapsePanel.Panel2
|
||||
Me.SplitContainerControl1.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.SplitContainerControl1.Location = New System.Drawing.Point(0, 158)
|
||||
Me.SplitContainerControl1.Name = "SplitContainerControl1"
|
||||
'
|
||||
'SplitContainerControl1.Panel1
|
||||
'
|
||||
Me.SplitContainerControl1.Panel1.Controls.Add(Me.RichEditControl1)
|
||||
Me.SplitContainerControl1.Panel1.Controls.Add(Me.txtSQLCommand)
|
||||
Me.SplitContainerControl1.Panel1.Text = "Panel1"
|
||||
'
|
||||
'SplitContainerControl1.Panel2
|
||||
@ -196,7 +209,7 @@ Partial Class frmSQLEditor
|
||||
Me.SplitContainerControl1.Panel2.Controls.Add(Me.GridPlaceholders)
|
||||
Me.SplitContainerControl1.Panel2.Text = "Panel2"
|
||||
Me.SplitContainerControl1.Size = New System.Drawing.Size(1056, 508)
|
||||
Me.SplitContainerControl1.SplitterPosition = 737
|
||||
Me.SplitContainerControl1.SplitterPosition = 802
|
||||
Me.SplitContainerControl1.TabIndex = 4
|
||||
'
|
||||
'GridPlaceholders
|
||||
@ -206,7 +219,7 @@ Partial Class frmSQLEditor
|
||||
Me.GridPlaceholders.MainView = Me.ViewPlaceholders
|
||||
Me.GridPlaceholders.MenuManager = Me.RibbonControl1
|
||||
Me.GridPlaceholders.Name = "GridPlaceholders"
|
||||
Me.GridPlaceholders.Size = New System.Drawing.Size(309, 508)
|
||||
Me.GridPlaceholders.Size = New System.Drawing.Size(244, 508)
|
||||
Me.GridPlaceholders.TabIndex = 0
|
||||
Me.GridPlaceholders.ViewCollection.AddRange(New DevExpress.XtraGrid.Views.Base.BaseView() {Me.ViewPlaceholders})
|
||||
'
|
||||
@ -242,10 +255,11 @@ Partial Class frmSQLEditor
|
||||
Me.Controls.Add(Me.SplitContainerControl1)
|
||||
Me.Controls.Add(Me.RibbonStatusBar1)
|
||||
Me.Controls.Add(Me.RibbonControl1)
|
||||
Me.IconOptions.SvgImage = Global.DigitalData.Controls.SQLEditor.My.Resources.Resources.editdatasource2
|
||||
Me.Name = "frmSQLEditor"
|
||||
Me.Ribbon = Me.RibbonControl1
|
||||
Me.StatusBar = Me.RibbonStatusBar1
|
||||
Me.Text = "SQL Connector"
|
||||
Me.Text = "SQL Designer"
|
||||
CType(Me.RibbonControl1, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
CType(Me.SvgImageCollection1, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
CType(Me.SplitContainerControl1.Panel1, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
@ -266,9 +280,9 @@ Partial Class frmSQLEditor
|
||||
Friend WithEvents RibbonPageGroup1 As DevExpress.XtraBars.Ribbon.RibbonPageGroup
|
||||
Friend WithEvents RibbonStatusBar1 As DevExpress.XtraBars.Ribbon.RibbonStatusBar
|
||||
Friend WithEvents RibbonPage2 As DevExpress.XtraBars.Ribbon.RibbonPage
|
||||
Friend WithEvents RibbonGalleryBarItem1 As DevExpress.XtraBars.RibbonGalleryBarItem
|
||||
Friend WithEvents GalleryPlaceholders As DevExpress.XtraBars.RibbonGalleryBarItem
|
||||
Friend WithEvents SvgImageCollection1 As DevExpress.Utils.SvgImageCollection
|
||||
Friend WithEvents RichEditControl1 As DevExpress.XtraRichEdit.RichEditControl
|
||||
Friend WithEvents txtSQLCommand As DevExpress.XtraRichEdit.RichEditControl
|
||||
Friend WithEvents SplitContainerControl1 As DevExpress.XtraEditors.SplitContainerControl
|
||||
Friend WithEvents GridPlaceholders As DevExpress.XtraGrid.GridControl
|
||||
Friend WithEvents ViewPlaceholders As DevExpress.XtraGrid.Views.Grid.GridView
|
||||
@ -278,8 +292,9 @@ Partial Class frmSQLEditor
|
||||
Friend WithEvents RibbonPageGroup3 As DevExpress.XtraBars.Ribbon.RibbonPageGroup
|
||||
Friend WithEvents colPattern As DevExpress.XtraGrid.Columns.GridColumn
|
||||
Friend WithEvents colValue As DevExpress.XtraGrid.Columns.GridColumn
|
||||
Friend WithEvents RibbonGalleryBarItem2 As DevExpress.XtraBars.RibbonGalleryBarItem
|
||||
Friend WithEvents GalleryConnection As DevExpress.XtraBars.RibbonGalleryBarItem
|
||||
Friend WithEvents RibbonPageGroup4 As DevExpress.XtraBars.Ribbon.RibbonPageGroup
|
||||
Friend WithEvents chkClearPlaceholders As DevExpress.XtraBars.BarCheckItem
|
||||
Friend WithEvents btnClearPlaceholders As DevExpress.XtraBars.BarButtonItem
|
||||
Friend WithEvents chkShowPlaceholders As DevExpress.XtraBars.BarCheckItem
|
||||
End Class
|
||||
|
||||
@ -15,6 +15,9 @@ Public Class frmSQLEditor
|
||||
Private ClearPlaceholdersAfterSuccessfulExecute As Boolean = False
|
||||
Private FormLoading As Boolean = False
|
||||
|
||||
Public Property SQLCommand As String = ""
|
||||
Public Property SQLConnection As Integer = 0
|
||||
|
||||
Public Enum PlaceholderCollection
|
||||
Globix
|
||||
Zooflow
|
||||
@ -38,11 +41,29 @@ Public Class frmSQLEditor
|
||||
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
||||
FormLoading = True
|
||||
Try
|
||||
Dim oConnectionGroups = LoadConnections()
|
||||
RibbonGalleryBarItem2.Gallery.Groups.AddRange(oConnectionGroups.ToArray)
|
||||
If SQLCommand <> String.Empty Then
|
||||
txtSQLCommand.Document.Text = SQLCommand
|
||||
End If
|
||||
|
||||
Dim oConnectionGroup = LoadConnections()
|
||||
Dim oSelectedItem = Nothing
|
||||
|
||||
If SQLConnection > 0 Then
|
||||
For Each oItem As GalleryItem In oConnectionGroup.Items
|
||||
Dim oConnection = oItem.Tag
|
||||
If SQLConnection = oConnection.id Then
|
||||
oSelectedItem = oItem
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
|
||||
GalleryConnection.Gallery.Groups.Add(oConnectionGroup)
|
||||
GalleryConnection.Gallery.SetItemCheck(oSelectedItem, True)
|
||||
|
||||
Dim oPlaceholderGroups = LoadPlaceholders()
|
||||
RibbonGalleryBarItem1.Gallery.Groups.AddRange(oPlaceholderGroups.ToArray)
|
||||
GalleryPlaceholders.Gallery.Groups.AddRange(oPlaceholderGroups.ToArray)
|
||||
|
||||
|
||||
|
||||
ConfigureRichEditControl()
|
||||
|
||||
@ -54,12 +75,19 @@ Public Class frmSQLEditor
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub RibbonGalleryBarItem1_GalleryItemClick(sender As Object, e As GalleryItemClickEventArgs) Handles RibbonGalleryBarItem1.GalleryItemClick
|
||||
Private Sub RibbonGalleryBarItem1_GalleryItemClick(sender As Object, e As GalleryItemClickEventArgs) Handles GalleryPlaceholders.GalleryItemClick
|
||||
Dim oPlaceholder As Placeholder = e.Item.Tag
|
||||
Dim pPosition = RichEditControl1.Document.CaretPosition
|
||||
RichEditControl1.Document.InsertSingleLineText(pPosition, Patterns.WrapPatternValue(oPlaceholder.Module, oPlaceholder.Name))
|
||||
Dim pPosition = txtSQLCommand.Document.CaretPosition
|
||||
txtSQLCommand.Document.InsertSingleLineText(pPosition, Patterns.WrapPatternValue(oPlaceholder.Module, oPlaceholder.Name))
|
||||
End Sub
|
||||
|
||||
Private Sub RibbonGalleryBarItem2_GalleryItemClick(sender As Object, e As GalleryItemClickEventArgs) Handles GalleryConnection.GalleryItemClick
|
||||
Dim oConnection As Connection = e.Item.Tag
|
||||
SQLConnection = oConnection.Id
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Private Function LoadPlaceholders() As List(Of GalleryItemGroup)
|
||||
Dim oInternalPlaceholders = Placeholders.GetInternalGroup()
|
||||
Dim oUserPlaceholder = Placeholders.GetUserGroup()
|
||||
@ -70,7 +98,7 @@ Public Class frmSQLEditor
|
||||
}
|
||||
End Function
|
||||
|
||||
Private Function LoadConnections() As List(Of GalleryItemGroup)
|
||||
Private Function LoadConnections() As GalleryItemGroup
|
||||
Try
|
||||
Dim oSql = "SELECT GUID, Bezeichnung FROM [DD_ECM].[dbo].[TBDD_CONNECTION] WHERE AKTIV = 1"
|
||||
Dim oTable = Database.GetDatatable(oSql)
|
||||
@ -82,28 +110,27 @@ Public Class frmSQLEditor
|
||||
.Name = oRow.Item("Bezeichnung")})
|
||||
Next
|
||||
|
||||
Dim oGroup1 = New GalleryItemGroup() With {.Caption = "Verbindungen"}
|
||||
Dim oConnectionGroup = New GalleryItemGroup() With {.Caption = "Verbindungen"}
|
||||
Dim oItems As New List(Of GalleryItem)
|
||||
For Each oConnection In oConnections
|
||||
oItems.Add(GetGalleryItem(oConnection))
|
||||
Next
|
||||
oGroup1.Items.AddRange(oItems.ToArray)
|
||||
Dim oConnectionGroups = New List(Of GalleryItemGroup)() From {oGroup1}
|
||||
oConnectionGroup.Items.AddRange(oItems.ToArray)
|
||||
|
||||
Return oConnectionGroups
|
||||
Return oConnectionGroup
|
||||
Catch ex As Exception
|
||||
Return Nothing
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Private Sub ConfigureRichEditControl()
|
||||
RichEditControl1.Options.Search.RegExResultMaxGuaranteedLength = 500
|
||||
RichEditControl1.ReplaceService(Of ISyntaxHighlightService)(New SQLSyntaxHighlightService(RichEditControl1.Document))
|
||||
RichEditControl1.ActiveViewType = DevExpress.XtraRichEdit.RichEditViewType.Simple
|
||||
RichEditControl1.Document.Sections(0).Page.Width = DevExpress.Office.Utils.Units.InchesToDocumentsF(80.0F)
|
||||
txtSQLCommand.Options.Search.RegExResultMaxGuaranteedLength = 500
|
||||
txtSQLCommand.ReplaceService(Of ISyntaxHighlightService)(New SQLSyntaxHighlightService(txtSQLCommand.Document))
|
||||
txtSQLCommand.ActiveViewType = DevExpress.XtraRichEdit.RichEditViewType.Simple
|
||||
txtSQLCommand.Document.Sections(0).Page.Width = DevExpress.Office.Utils.Units.InchesToDocumentsF(80.0F)
|
||||
|
||||
RichEditControl1.Document.DefaultCharacterProperties.FontName = "Courier New"
|
||||
RichEditControl1.Document.DefaultCharacterProperties.FontSize = 12
|
||||
txtSQLCommand.Document.DefaultCharacterProperties.FontName = "Courier New"
|
||||
txtSQLCommand.Document.DefaultCharacterProperties.FontSize = 12
|
||||
End Sub
|
||||
|
||||
|
||||
@ -123,30 +150,27 @@ Public Class frmSQLEditor
|
||||
|
||||
Private Property LastPatterns As New List(Of Pattern)
|
||||
|
||||
Private Sub RichEditControl1_ContentChanged(sender As Object, e As EventArgs) Handles RichEditControl1.ContentChanged
|
||||
Dim oSqlText = RichEditControl1.Document.Text
|
||||
Private Sub RichEditControl1_ContentChanged(sender As Object, e As EventArgs) Handles txtSQLCommand.ContentChanged
|
||||
Dim oSqlText = txtSQLCommand.Document.Text
|
||||
Dim oPatterns = Patterns.GetAllPatterns(oSqlText)
|
||||
|
||||
If oPatterns.Count = 0 Then
|
||||
Exit Sub
|
||||
GridPlaceholders.DataSource = New List(Of Placeholder)
|
||||
ElseIf oPatterns.Count.Equals(LastPatterns.Count) Then
|
||||
' noop
|
||||
Else
|
||||
Dim oPlaceholders = oPatterns.
|
||||
Select(Function(pattern) New Placeholder(pattern.Value, pattern.Value, pattern.Type, pattern.Value) With {.Pattern = pattern}).
|
||||
ToList()
|
||||
GridPlaceholders.DataSource = oPlaceholders
|
||||
End If
|
||||
|
||||
If oPatterns.SequenceEqual(LastPatterns) Then
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
GridPlaceholders.DataSource = oPatterns.Select(Function(pattern)
|
||||
Return New Placeholder(pattern.Value, pattern.Value, pattern.Type, pattern.Value) With {.Pattern = pattern}
|
||||
End Function).ToList()
|
||||
|
||||
|
||||
LastPatterns = oPatterns
|
||||
|
||||
End Sub
|
||||
|
||||
Private Async Sub BarButtonItem3_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles btnExecuteSQL.ItemClick
|
||||
Private Sub BarButtonItem3_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles btnExecuteSQL.ItemClick
|
||||
Try
|
||||
Dim oSql = RichEditControl1.Document.Text
|
||||
Dim oSql = txtSQLCommand.Document.Text
|
||||
|
||||
Dim oPlaceholders As List(Of Placeholder) = GridPlaceholders.DataSource
|
||||
|
||||
@ -163,7 +187,16 @@ Public Class frmSQLEditor
|
||||
Next
|
||||
End If
|
||||
|
||||
Dim oDatatable = Await Database.GetDatatableAsync(oSql)
|
||||
Dim oDatatable As DataTable
|
||||
|
||||
If SQLConnection > 0 Then
|
||||
Dim oConnectionString = Database.GetConnectionStringForId(SQLConnection)
|
||||
oDatatable = Database.GetDatatableWithConnection(oSql, oConnectionString)
|
||||
Else
|
||||
oDatatable = Database.GetDatatable(oSql)
|
||||
End If
|
||||
|
||||
|
||||
Dim oForm As New frmSQLResult(oDatatable)
|
||||
oForm.Show()
|
||||
|
||||
@ -189,4 +222,8 @@ Public Class frmSQLEditor
|
||||
Private Sub btnClearPlaceholders_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles btnClearPlaceholders.ItemClick
|
||||
ClearPlaceholders()
|
||||
End Sub
|
||||
|
||||
Private Sub chkShowPlaceholders_CheckedChanged(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles chkShowPlaceholders.CheckedChanged
|
||||
SplitContainerControl1.Collapsed = Not chkShowPlaceholders.Checked
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
@ -47,7 +47,10 @@ Public Class frmStart
|
||||
End Sub
|
||||
|
||||
Private Sub Button9_Click(sender As Object, e As EventArgs) Handles Button9.Click
|
||||
Dim oForm As New frmSQLEditor(LogConfig, Database)
|
||||
Dim oForm As New frmSQLEditor(LogConfig, Database) With {
|
||||
.SQLCommand = "SELECT * FROM TBDD_USER WHERE EMAIL = '{#USER#EMAIL}'",
|
||||
.SQLConnection = 1
|
||||
}
|
||||
oForm.Show()
|
||||
End Sub
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user