move clientsuite to GUIs.ClientSuite folder
This commit is contained in:
69
GUIs.ClientSuite/ControlDefaults/GridControlDefaults.vb
Normal file
69
GUIs.ClientSuite/ControlDefaults/GridControlDefaults.vb
Normal file
@@ -0,0 +1,69 @@
|
||||
Imports DevExpress.XtraGrid
|
||||
Imports DevExpress.XtraGrid.Views.Grid
|
||||
|
||||
Public Class GridControlDefaults
|
||||
Public Shared Sub DefaultGridSettings(grid As GridControl, Container As Control)
|
||||
For Each oView In grid.Views
|
||||
If TypeOf oView Is GridView Then
|
||||
DefaultGridViewSettings(oView)
|
||||
End If
|
||||
Next
|
||||
End Sub
|
||||
|
||||
Public Shared Sub ReadOnlyGridSettings(grid As GridControl, Container As Control)
|
||||
For Each oView In grid.Views
|
||||
If TypeOf oView Is GridView Then
|
||||
ReadonlyGridViewSettings(oView, Container)
|
||||
End If
|
||||
Next
|
||||
End Sub
|
||||
|
||||
Public Shared Sub CheckboxSelectGridSettings(grid As GridControl, Container As Control)
|
||||
For Each oView In grid.Views
|
||||
If TypeOf oView Is GridView Then
|
||||
CheckboxSelectGridViewSettings(oView)
|
||||
End If
|
||||
Next
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' Set a view to readonly
|
||||
''' </summary>
|
||||
Private Shared Sub ReadonlyGridViewSettings(ByRef View As GridView, Container As Control)
|
||||
View.OptionsBehavior.Editable = False
|
||||
View.OptionsBehavior.ReadOnly = True
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' Set view Multiselect with checkboxes
|
||||
''' </summary>
|
||||
Private Shared Sub CheckboxSelectGridViewSettings(ByRef View As GridView)
|
||||
View.OptionsSelection.MultiSelectMode = GridMultiSelectMode.CheckBoxRowSelect
|
||||
View.OptionsSelection.MultiSelect = True
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' Set default settings for view
|
||||
''' </summary>
|
||||
Private Shared Sub DefaultGridViewSettings(ByRef View As GridView)
|
||||
View.OptionsView.ShowAutoFilterRow = True
|
||||
|
||||
' Color Settings
|
||||
View.OptionsView.EnableAppearanceEvenRow = True
|
||||
View.Appearance.EvenRow.BackColor = Color.Aquamarine
|
||||
View.Appearance.FilterPanel.BackColor = Color.Orange
|
||||
|
||||
AddHandler View.RowStyle, AddressOf GridView_RowStyle
|
||||
'AddHandler View.Layout, AddressOf GridView_Layout
|
||||
End Sub
|
||||
|
||||
Private Shared Sub GridView_Layout(sender As Object, e As EventArgs)
|
||||
'Throw New NotImplementedException()
|
||||
End Sub
|
||||
|
||||
Private Shared Sub GridView_RowStyle(sender As Object, e As RowStyleEventArgs)
|
||||
If e.RowHandle = GridControl.AutoFilterRowHandle Then
|
||||
e.Appearance.BackColor = Color.LightSalmon
|
||||
End If
|
||||
End Sub
|
||||
End Class
|
||||
29
GUIs.ClientSuite/ControlDefaults/TreeListDefaults.vb
Normal file
29
GUIs.ClientSuite/ControlDefaults/TreeListDefaults.vb
Normal file
@@ -0,0 +1,29 @@
|
||||
Imports DevExpress.XtraTreeList
|
||||
|
||||
Public Class TreeListDefaults
|
||||
Public Shared Sub DefaultTreeListSettings(TreeList As TreeList, Container As Control)
|
||||
With TreeList.OptionsView
|
||||
.FocusRectStyle = DrawFocusRectStyle.None
|
||||
.ShowColumns = False
|
||||
.ShowHorzLines = False
|
||||
.ShowIndentAsRowStyle = True
|
||||
.ShowIndicator = False
|
||||
.ShowVertLines = False
|
||||
End With
|
||||
|
||||
With TreeList.OptionsSelection
|
||||
.EnableAppearanceFocusedCell = False
|
||||
End With
|
||||
|
||||
With TreeList.Appearance.Empty
|
||||
.BackColor = Color.Transparent
|
||||
.Options.UseBackColor = True
|
||||
End With
|
||||
|
||||
With TreeList.Appearance.Row
|
||||
.BackColor = Color.Transparent
|
||||
.Options.UseBackColor = True
|
||||
End With
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
Reference in New Issue
Block a user