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: 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.3.0.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.3.0.0")>
|
||||||
<Assembly: AssemblyFileVersion("1.0.0.0")>
|
<Assembly: AssemblyFileVersion("1.0.0.0")>
|
||||||
|
|||||||
@@ -33,6 +33,12 @@ Public Class frmMonitor
|
|||||||
Concat(HtmlViewColumns).
|
Concat(HtmlViewColumns).
|
||||||
ToList
|
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 ReadOnly DisplayColumns As New List(Of String) From {"COLUMN1", "COLUMN2", "COLUMN3", "ADDED_WHEN", "STATE", "ICON"}
|
||||||
|
|
||||||
Private SQLResultGrids As List(Of GridControl)
|
Private SQLResultGrids As List(Of GridControl)
|
||||||
@@ -65,6 +71,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 +91,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
|
||||||
@@ -223,6 +239,15 @@ Public Class frmMonitor
|
|||||||
End Function)
|
End Function)
|
||||||
Next
|
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)
|
SetResultCount(TreeListResults.AllNodesCount)
|
||||||
|
|
||||||
TreeListResults.Focus()
|
TreeListResults.Focus()
|
||||||
@@ -397,7 +422,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)
|
||||||
|
|
||||||
@@ -500,6 +525,17 @@ Public Class frmMonitor
|
|||||||
End If
|
End If
|
||||||
End Sub
|
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)
|
Private Sub FillResultHtmlViewer(RichEditControl As RichEditControl, Html As String, Title As String)
|
||||||
RichEditControl.HtmlText = Html
|
RichEditControl.HtmlText = Html
|
||||||
|
|
||||||
@@ -521,11 +557,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
|
||||||
|
|||||||
Reference in New Issue
Block a user