DocumentResultList: Layout et al
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
Imports DevExpress.Utils
|
||||
Imports DevExpress.XtraBars.Docking
|
||||
Imports DevExpress.XtraGrid.Views.BandedGrid
|
||||
Imports DevExpress.XtraGrid.Views.Grid
|
||||
Imports DigitalData.Modules.Base
|
||||
Imports DigitalData.Modules.Config
|
||||
@@ -10,12 +11,18 @@ Namespace DocumentResultList
|
||||
Inherits BaseClass
|
||||
|
||||
Private Config As ConfigManager(Of Config)
|
||||
Private GridViews As List(Of GridView)
|
||||
|
||||
Public Sub New(pLogConfig As LogConfig, pConfig As ConfigManager(Of DocumentResultList.Config))
|
||||
Public Sub New(pLogConfig As LogConfig, pConfig As ConfigManager(Of DocumentResultList.Config), pGridViews As List(Of GridView))
|
||||
MyBase.New(pLogConfig)
|
||||
Config = pConfig
|
||||
GridViews = pGridViews
|
||||
End Sub
|
||||
|
||||
#Region "Saving and Restoring layout"
|
||||
|
||||
|
||||
|
||||
Public Sub DockManager_SaveLayout(pDockManager As DockManager)
|
||||
Try
|
||||
Dim oXml As String = GetDockmanager_LayoutName()
|
||||
@@ -69,6 +76,44 @@ Namespace DocumentResultList
|
||||
Dim oDirectory As String = IO.Path.GetDirectoryName(Config.UserConfigPath)
|
||||
Return IO.Path.Combine(oDirectory, Filename)
|
||||
End Function
|
||||
#End Region
|
||||
|
||||
Public Sub SetGroupPanelVisible(pVisible As Boolean)
|
||||
For Each oView In GridViews
|
||||
oView.OptionsView.ShowGroupPanel = pVisible
|
||||
Next
|
||||
End Sub
|
||||
|
||||
Public Function GetGroupPanelVisible() As Boolean
|
||||
Dim oView = GridViews.First()
|
||||
Return oView.OptionsView.ShowGroupPanel
|
||||
End Function
|
||||
|
||||
Public Sub SetFilterRowVisible(pVisible As Boolean)
|
||||
For Each oView In GridViews
|
||||
oView.OptionsView.ShowAutoFilterRow = pVisible
|
||||
Next
|
||||
End Sub
|
||||
|
||||
Public Function GetFilterRowVisible() As Boolean
|
||||
Dim oView = GridViews.First()
|
||||
Return oView.OptionsView.ShowAutoFilterRow
|
||||
End Function
|
||||
|
||||
Public Sub SetBandTitleVisible(pVisible As Boolean)
|
||||
For Each oView In GridViews
|
||||
DirectCast(oView, BandedGridView).OptionsView.ShowBands = pVisible
|
||||
Next
|
||||
End Sub
|
||||
|
||||
Public Function GetBandTitleVisible() As Boolean
|
||||
Dim oView = GridViews.First()
|
||||
Return DirectCast(oView, BandedGridView).OptionsView.ShowBands
|
||||
End Function
|
||||
|
||||
End Class
|
||||
|
||||
|
||||
|
||||
|
||||
End Namespace
|
||||
Reference in New Issue
Block a user