Compare commits
5 Commits
52eeb0ea5c
...
0e51eec9b1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0e51eec9b1 | ||
|
|
8e47ba31e7 | ||
|
|
ad3de3caa6 | ||
|
|
45b6534f48 | ||
|
|
b4fa36469d |
@@ -1,5 +1,8 @@
|
||||
Imports System.Drawing
|
||||
Imports System.Globalization
|
||||
Imports System.Windows.Forms
|
||||
Imports DevExpress.Utils
|
||||
Imports DevExpress.XtraGrid.Columns
|
||||
Imports DevExpress.XtraGrid.Views.Grid
|
||||
Imports DevExpress.XtraTreeList
|
||||
|
||||
@@ -64,6 +67,26 @@ Public Class GridBuilder
|
||||
Next
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' Applies a proper datetime format string to all columns of the view.
|
||||
''' </summary>
|
||||
''' <remarks>The view's columns need to be loaded for this to work!</remarks>
|
||||
Public Sub SetDateTimeColumns(pView As GridView)
|
||||
If pView.Columns Is Nothing Then
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
Dim oDateColumns = pView.Columns.AsEnumerable.
|
||||
Where(Function(column As GridColumn) column.ColumnType = GetType(Date)).
|
||||
ToList()
|
||||
|
||||
For Each oDateCol In oDateColumns
|
||||
oDateCol.DisplayFormat.FormatType = FormatType.Custom
|
||||
oDateCol.DisplayFormat.FormatString = "g"
|
||||
oDateCol.DisplayFormat.Format = DateTimeFormatInfo.CurrentInfo
|
||||
Next
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' Applies common properties to all GridViews
|
||||
''' </summary>
|
||||
@@ -198,4 +221,5 @@ Public Class GridBuilder
|
||||
e.Handled = True
|
||||
End If
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
5
GUIs.Common/frmSQLEditor.Designer.vb
generated
5
GUIs.Common/frmSQLEditor.Designer.vb
generated
@@ -84,9 +84,8 @@ Partial Class frmSQLEditor
|
||||
'
|
||||
'
|
||||
'
|
||||
Me.GalleryPlaceholders.Gallery.ColumnCount = 4
|
||||
Me.GalleryPlaceholders.Gallery.ColumnCount = 6
|
||||
Me.GalleryPlaceholders.Gallery.Images = Me.SvgImageCollection1
|
||||
Me.GalleryPlaceholders.Gallery.ShowGroupCaption = True
|
||||
Me.GalleryPlaceholders.Gallery.ShowItemText = True
|
||||
Me.GalleryPlaceholders.Id = 1
|
||||
Me.GalleryPlaceholders.Name = "GalleryPlaceholders"
|
||||
@@ -259,7 +258,7 @@ Partial Class frmSQLEditor
|
||||
'
|
||||
'GridPlaceholders
|
||||
'
|
||||
Me.GridPlaceholders.Anchor = System.Windows.Forms.AnchorStyles.Right
|
||||
Me.GridPlaceholders.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.GridPlaceholders.Location = New System.Drawing.Point(0, 0)
|
||||
Me.GridPlaceholders.MainView = Me.ViewPlaceholders
|
||||
Me.GridPlaceholders.MenuManager = Me.RibbonControl1
|
||||
|
||||
@@ -136,7 +136,4 @@
|
||||
LDQgIGw0LTRsMywzbC00LDRMMjMsMjB6IiBjbGFzcz0iUmVkIiAvPg0KPC9zdmc+Cw==
|
||||
</value>
|
||||
</data>
|
||||
<metadata name="SvgImageCollection1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
</root>
|
||||
@@ -106,10 +106,7 @@ Public Class frmSQLEditor
|
||||
End Sub
|
||||
|
||||
Private Function LoadPlaceholders() As List(Of GalleryItemGroup)
|
||||
Dim oPlaceholders = New List(Of GalleryItemGroup)() From {
|
||||
Placeholders.GetInternalPlaceholders(),
|
||||
Placeholders.GetUserPlaceholders()
|
||||
}
|
||||
Dim oPlaceholders = New List(Of GalleryItemGroup)()
|
||||
|
||||
Dim oAutomaticAttributes = Placeholders.GetAutomaticPlaceholders(PlaceholdersAutomatic, PlaceholdersAutomaticPrefix, PlaceholdersAutomaticTitle)
|
||||
If oAutomaticAttributes IsNot Nothing Then
|
||||
@@ -130,6 +127,9 @@ Public Class frmSQLEditor
|
||||
oPlaceholders.Add(Placeholders.GetClipboardPlaceholder)
|
||||
End If
|
||||
|
||||
oPlaceholders.Add(Placeholders.GetUserPlaceholders())
|
||||
oPlaceholders.Add(Placeholders.GetInternalPlaceholders())
|
||||
|
||||
Return oPlaceholders
|
||||
End Function
|
||||
|
||||
|
||||
@@ -52,7 +52,12 @@ Namespace Modules
|
||||
|
||||
Case GetType(DevExpress.XtraEditors.LookUpEdit)
|
||||
Dim oLookupEdit As DevExpress.XtraEditors.LookUpEdit = oControl
|
||||
oReplaceValue = oLookupEdit.EditValue
|
||||
|
||||
If IsNothing(oLookupEdit.EditValue) Then
|
||||
oReplaceValue = String.Empty
|
||||
Else
|
||||
oReplaceValue = oLookupEdit.EditValue
|
||||
End If
|
||||
|
||||
Case GetType(LookupControl3)
|
||||
Dim oLookupControl3 As LookupControl3 = oControl
|
||||
|
||||
Reference in New Issue
Block a user