Add First Pass of UserManager

This commit is contained in:
Jonathan Jenne
2019-02-19 16:58:01 +01:00
parent 79c2d6c344
commit 6131182d64
22 changed files with 1514 additions and 171 deletions

View File

@@ -0,0 +1,38 @@
Imports DevExpress.XtraGrid
Imports DevExpress.XtraGrid.Views.Grid
Public Class ClassUIUtils
Public Shared Function ConfigureGridVieDefaults(View As GridView)
View.OptionsView.ShowAutoFilterRow = True
View.OptionsView.EnableAppearanceEvenRow = True
With View.Appearance
.EvenRow.BackColor = Color.Aquamarine
.FilterPanel.BackColor = Color.Orange
End With
Return View
End Function
Public Shared Function ConfigureGridViewReadOnly(View As GridView)
View.OptionsBehavior.Editable = False
View.OptionsBehavior.ReadOnly = True
View.OptionsSelection.MultiSelectMode = GridMultiSelectMode.RowSelect
End Function
Public Shared Function ConfigureGridControlDefaults(Grid As GridControl, Optional [ReadOnly] As Boolean = False) As GridControl
For Each oView In Grid.Views
Select Case oView.GetType
Case GetType(GridView)
oView = ConfigureGridVieDefaults(oView)
If [ReadOnly] Then
oView = ConfigureGridViewReadOnly(oView)
End If
End Select
Next
Return Grid
End Function
End Class