Add autoresizing of split containers
This commit is contained in:
@@ -65,6 +65,10 @@ Public Class frmMonitor
|
||||
Private FormHelper As FormHelper
|
||||
Private Patterns As Patterns2
|
||||
Private Workspace As Common.DocumentResultList.Workspace(Of Config)
|
||||
|
||||
Private SplitContainerBuilderHTML As SplitContainerBuilder
|
||||
Private SplitContainerBuilderSQL As SplitContainerBuilder
|
||||
|
||||
Private Validator As Validator
|
||||
Private GridLoader As GridLoader
|
||||
|
||||
@@ -81,6 +85,12 @@ Public Class frmMonitor
|
||||
ControlHelper = New Common.ControlHelper(LogConfig)
|
||||
Workspace = New DocumentResultList.Workspace(Of Config)(LogConfig, ConfigManager, WorkspaceManager1)
|
||||
|
||||
SplitContainerBuilderHTML = New SplitContainerBuilder(LogConfig, Me, SplitContainerFileHTML)
|
||||
SplitContainerBuilderHTML.InitAutoResize()
|
||||
|
||||
SplitContainerBuilderSQL = New SplitContainerBuilder(LogConfig, Me, SplitContainerSQL)
|
||||
SplitContainerBuilderSQL.InitAutoResize()
|
||||
|
||||
If ConfigManager.Config.ConnectionString = String.Empty Then
|
||||
Dim oSQLConfig As New frmSQLConfig(LogConfig)
|
||||
If oSQLConfig.ShowDialog() = DialogResult.OK Then
|
||||
@@ -397,7 +407,7 @@ Public Class frmMonitor
|
||||
Try
|
||||
Dim oExtracted = ExtractTitle(oSQLCommand.Value)
|
||||
Dim oCommand = oExtracted.Item1
|
||||
Dim oTitle = oExtracted.Item2
|
||||
Dim oTitle = NotNull(oExtracted.Item2, oSQLCommand.Key)
|
||||
|
||||
Dim oTable As DataTable = Database.GetDatatable(oCommand)
|
||||
|
||||
@@ -521,11 +531,14 @@ Public Class frmMonitor
|
||||
End Sub
|
||||
|
||||
Private Sub FillResultGrid(GridControl As GridControl, Table As DataTable, Title As String)
|
||||
|
||||
|
||||
GridControl.DataSource = Table
|
||||
GridControl.DefaultView.PopulateColumns()
|
||||
|
||||
Dim oTabPage = DirectCast(GridControl.Parent, XtraTabPage)
|
||||
oTabPage.PageVisible = True
|
||||
oTabPage.Text = NotNull(Title, oTabPage.Text)
|
||||
oTabPage.Text = $"{NotNull(Title, oTabPage.Text)} ({Table.Rows.Count})"
|
||||
|
||||
XtraTabControlSQL.SelectedTabPage = oTabPage
|
||||
End Sub
|
||||
|
||||
Reference in New Issue
Block a user