Add autoresizing of split containers

This commit is contained in:
Jonathan Jenne
2022-09-21 16:01:37 +02:00
parent b532ca3ee5
commit d29154bb7f
2 changed files with 17 additions and 4 deletions

View File

@@ -11,7 +11,7 @@ Imports System.Runtime.InteropServices
<Assembly: AssemblyCompany("Digital Data")> <Assembly: AssemblyCompany("Digital Data")>
<Assembly: AssemblyProduct("Monitor")> <Assembly: AssemblyProduct("Monitor")>
<Assembly: AssemblyCopyright("Copyright © 2022")> <Assembly: AssemblyCopyright("Copyright © 2022")>
<Assembly: AssemblyTrademark("1.2.0.0")> <Assembly: AssemblyTrademark("1.2.1.0")>
<Assembly: AssemblyCulture("")> <Assembly: AssemblyCulture("")>
' Setting ComVisible to false makes the types in this assembly not visible ' Setting ComVisible to false makes the types in this assembly not visible
@@ -32,5 +32,5 @@ Imports System.Runtime.InteropServices
' You can specify all the values or you can default the Build and Revision Numbers ' You can specify all the values or you can default the Build and Revision Numbers
' by using the '*' as shown below: ' by using the '*' as shown below:
' [assembly: AssemblyVersion("1.0.*")] ' [assembly: AssemblyVersion("1.0.*")]
<Assembly: AssemblyVersion("1.2.0.0")> <Assembly: AssemblyVersion("1.2.1.0")>
<Assembly: AssemblyFileVersion("1.0.0.0")> <Assembly: AssemblyFileVersion("1.0.0.0")>

View File

@@ -65,6 +65,10 @@ Public Class frmMonitor
Private FormHelper As FormHelper Private FormHelper As FormHelper
Private Patterns As Patterns2 Private Patterns As Patterns2
Private Workspace As Common.DocumentResultList.Workspace(Of Config) Private Workspace As Common.DocumentResultList.Workspace(Of Config)
Private SplitContainerBuilderHTML As SplitContainerBuilder
Private SplitContainerBuilderSQL As SplitContainerBuilder
Private Validator As Validator Private Validator As Validator
Private GridLoader As GridLoader Private GridLoader As GridLoader
@@ -81,6 +85,12 @@ Public Class frmMonitor
ControlHelper = New Common.ControlHelper(LogConfig) ControlHelper = New Common.ControlHelper(LogConfig)
Workspace = New DocumentResultList.Workspace(Of Config)(LogConfig, ConfigManager, WorkspaceManager1) 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 If ConfigManager.Config.ConnectionString = String.Empty Then
Dim oSQLConfig As New frmSQLConfig(LogConfig) Dim oSQLConfig As New frmSQLConfig(LogConfig)
If oSQLConfig.ShowDialog() = DialogResult.OK Then If oSQLConfig.ShowDialog() = DialogResult.OK Then
@@ -397,7 +407,7 @@ Public Class frmMonitor
Try Try
Dim oExtracted = ExtractTitle(oSQLCommand.Value) Dim oExtracted = ExtractTitle(oSQLCommand.Value)
Dim oCommand = oExtracted.Item1 Dim oCommand = oExtracted.Item1
Dim oTitle = oExtracted.Item2 Dim oTitle = NotNull(oExtracted.Item2, oSQLCommand.Key)
Dim oTable As DataTable = Database.GetDatatable(oCommand) Dim oTable As DataTable = Database.GetDatatable(oCommand)
@@ -521,11 +531,14 @@ Public Class frmMonitor
End Sub End Sub
Private Sub FillResultGrid(GridControl As GridControl, Table As DataTable, Title As String) Private Sub FillResultGrid(GridControl As GridControl, Table As DataTable, Title As String)
GridControl.DataSource = Table GridControl.DataSource = Table
GridControl.DefaultView.PopulateColumns()
Dim oTabPage = DirectCast(GridControl.Parent, XtraTabPage) Dim oTabPage = DirectCast(GridControl.Parent, XtraTabPage)
oTabPage.PageVisible = True oTabPage.PageVisible = True
oTabPage.Text = NotNull(Title, oTabPage.Text) oTabPage.Text = $"{NotNull(Title, oTabPage.Text)} ({Table.Rows.Count})"
XtraTabControlSQL.SelectedTabPage = oTabPage XtraTabControlSQL.SelectedTabPage = oTabPage
End Sub End Sub