Compare commits
3 Commits
b532ca3ee5
...
55e2498d32
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
55e2498d32 | ||
|
|
812d087ada | ||
|
|
d29154bb7f |
@ -11,7 +11,7 @@ Imports System.Runtime.InteropServices
|
||||
<Assembly: AssemblyCompany("Digital Data")>
|
||||
<Assembly: AssemblyProduct("Monitor")>
|
||||
<Assembly: AssemblyCopyright("Copyright © 2022")>
|
||||
<Assembly: AssemblyTrademark("1.2.0.0")>
|
||||
<Assembly: AssemblyTrademark("1.3.0.0")>
|
||||
<Assembly: AssemblyCulture("")>
|
||||
|
||||
' 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
|
||||
' by using the '*' as shown below:
|
||||
' [assembly: AssemblyVersion("1.0.*")]
|
||||
<Assembly: AssemblyVersion("1.2.0.0")>
|
||||
<Assembly: AssemblyVersion("1.3.0.0")>
|
||||
<Assembly: AssemblyFileVersion("1.0.0.0")>
|
||||
|
||||
@ -33,6 +33,12 @@ Public Class frmMonitor
|
||||
Concat(HtmlViewColumns).
|
||||
ToList
|
||||
|
||||
Private Enum TristateBoolean
|
||||
[False]
|
||||
[True]
|
||||
Indeterminate
|
||||
End Enum
|
||||
|
||||
Private ReadOnly DisplayColumns As New List(Of String) From {"COLUMN1", "COLUMN2", "COLUMN3", "ADDED_WHEN", "STATE", "ICON"}
|
||||
|
||||
Private SQLResultGrids As List(Of GridControl)
|
||||
@ -65,6 +71,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 +91,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
|
||||
@ -223,6 +239,15 @@ Public Class frmMonitor
|
||||
End Function)
|
||||
Next
|
||||
|
||||
For Each oNode As TreeListNode In TreeListResults.Nodes
|
||||
Try
|
||||
Dim oExpanded As TristateBoolean = Utils.NotNull(oNode.Item("EXPANDED"), TristateBoolean.Indeterminate)
|
||||
ExpandCollapseNode(oNode, oExpanded)
|
||||
Catch ex As Exception
|
||||
Logger.Error(ex)
|
||||
End Try
|
||||
Next
|
||||
|
||||
SetResultCount(TreeListResults.AllNodesCount)
|
||||
|
||||
TreeListResults.Focus()
|
||||
@ -397,7 +422,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)
|
||||
|
||||
@ -500,6 +525,17 @@ Public Class frmMonitor
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub ExpandCollapseNode(pNode As TreeListNode, pState As TristateBoolean)
|
||||
Select Case pState
|
||||
Case TristateBoolean.False
|
||||
pNode.Collapse()
|
||||
Case TristateBoolean.True
|
||||
pNode.Expand()
|
||||
Case Else
|
||||
'noop
|
||||
End Select
|
||||
End Sub
|
||||
|
||||
Private Sub FillResultHtmlViewer(RichEditControl As RichEditControl, Html As String, Title As String)
|
||||
RichEditControl.HtmlText = Html
|
||||
|
||||
@ -521,11 +557,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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user