Compare commits
7 Commits
8406808bf1
...
768337e968
| Author | SHA1 | Date | |
|---|---|---|---|
| 768337e968 | |||
| 83de375e73 | |||
| e0ec88d763 | |||
| 10dd22fe46 | |||
| 72a831619f | |||
| 41338b596e | |||
| dcac655129 |
@@ -19,6 +19,7 @@
|
||||
Undefined
|
||||
Table
|
||||
TreeView
|
||||
ChartView
|
||||
End Enum
|
||||
|
||||
Public Enum DataTypeEnum
|
||||
@@ -34,4 +35,21 @@
|
||||
List
|
||||
SQL
|
||||
End Enum
|
||||
|
||||
Public Enum ChartPosEnum
|
||||
Undefined
|
||||
TopLeft
|
||||
BottomLeft
|
||||
TopRight
|
||||
BottomRight
|
||||
End Enum
|
||||
|
||||
Public Enum ChartTypeEnum
|
||||
Undefined
|
||||
Bar
|
||||
Line
|
||||
Area
|
||||
Pie
|
||||
End Enum
|
||||
|
||||
End Namespace
|
||||
|
||||
14
GUIs.Monitor/Data/ChartParameter.vb
Normal file
14
GUIs.Monitor/Data/ChartParameter.vb
Normal file
@@ -0,0 +1,14 @@
|
||||
Public Class ChartParameter
|
||||
Public Id As Integer
|
||||
Public Title As String
|
||||
Public ChartPos As Constants.ChartPosEnum
|
||||
Public SQLCommand As String
|
||||
Public ChartType As Constants.ChartTypeEnum
|
||||
Public Argument As String
|
||||
Public Value As String
|
||||
Public SearchId As Integer
|
||||
|
||||
Public Overrides Function ToString() As String
|
||||
Return Title
|
||||
End Function
|
||||
End Class
|
||||
@@ -1,5 +1,4 @@
|
||||
Imports System.Runtime.CompilerServices
|
||||
Imports System.Text.RegularExpressions
|
||||
Imports System.Text.RegularExpressions
|
||||
Imports DevExpress.Utils
|
||||
Imports DevExpress.XtraEditors.Controls
|
||||
Imports DevExpress.XtraEditors.Repository
|
||||
@@ -11,6 +10,7 @@ Imports DevExpress.XtraTab
|
||||
Imports DevExpress.XtraTreeList
|
||||
Imports DevExpress.XtraTreeList.Columns
|
||||
Imports DevExpress.XtraTreeList.Nodes
|
||||
Imports DevExpress.XtraCharts
|
||||
Imports DigitalData.Controls.DocumentViewer
|
||||
Imports DigitalData.GUIs.Common
|
||||
Imports DigitalData.GUIs.Monitor.Constants
|
||||
@@ -20,6 +20,8 @@ Imports DigitalData.Modules.Language
|
||||
Imports DigitalData.Modules.Language.Utils
|
||||
Imports DigitalData.Modules.Logging
|
||||
Imports DigitalData.Modules.Patterns
|
||||
Imports DevExpress.XtraEditors
|
||||
|
||||
|
||||
Public Class frmMonitor
|
||||
Private ReadOnly InvisibleColumnMarkers As New List(Of String) From {"[HTML]", "[SQL]", "[FILENAME]"}
|
||||
@@ -43,7 +45,7 @@ Public Class frmMonitor
|
||||
|
||||
Private SQLResultGrids As List(Of GridControl)
|
||||
Private SQLResultTabs As List(Of XtraTabPage)
|
||||
Private SQLResultGridIndex As Integer = 0
|
||||
'Private SQLResultGridIndex As Integer = 0
|
||||
Private ActiveSQLResultGrid As GridControl
|
||||
|
||||
Private FileResultViewers As List(Of DocumentViewer)
|
||||
@@ -57,6 +59,8 @@ Public Class frmMonitor
|
||||
Private GridControlResults As GridControl
|
||||
Private GridViewResults As GridView
|
||||
|
||||
Private ChartViewResultContainer As SplitContainerControl
|
||||
|
||||
Private InvisibleMarkedColumns As New List(Of GridColumn)
|
||||
Private VisibleMarkedColumns As New List(Of GridColumn)
|
||||
Private ActiveSearch As Search = Nothing
|
||||
@@ -123,6 +127,7 @@ Public Class frmMonitor
|
||||
|
||||
InitGrid()
|
||||
InitTreeList()
|
||||
InitChartContainer()
|
||||
|
||||
Dim oGrids As GridView() = New List(Of GridView) From {GridView1, GridView2, GridView3, GridView4}.ToArray
|
||||
GridBuilder.SetDefaults(oGrids)
|
||||
@@ -154,7 +159,6 @@ Public Class frmMonitor
|
||||
End Sub
|
||||
Next
|
||||
|
||||
|
||||
For Each oViewer As DocumentViewer In FileResultViewers
|
||||
oViewer.Init(LogConfig, oLicense)
|
||||
Next
|
||||
@@ -164,7 +168,6 @@ Public Class frmMonitor
|
||||
SetResultCount(0)
|
||||
SetVersion()
|
||||
|
||||
|
||||
Catch ex As Exception
|
||||
FormHelper.ShowErrorMessage(ex, "frmStart_Load")
|
||||
End Try
|
||||
@@ -210,16 +213,24 @@ Public Class frmMonitor
|
||||
End If
|
||||
|
||||
Dim oControls As List(Of Control) = LayoutControl1.Controls.Cast(Of Control).ToList()
|
||||
Dim oSQL = Patterns.ReplaceControlValues(oSearch.SQLCommand, oControls)
|
||||
Dim oTable As DataTable = Await Database.GetDatatableAsync(oSQL)
|
||||
Dim oSQL As String
|
||||
Dim oTable As DataTable
|
||||
|
||||
If oSearch.SQLCommand.Length > 0 Then
|
||||
oSQL = Patterns.ReplaceControlValues(oSearch.SQLCommand, oControls)
|
||||
Logger.Debug($"SQL after replacing placeholder: [{0}]", oSQL)
|
||||
oTable = Await Database.GetDatatableAsync(oSQL)
|
||||
End If
|
||||
|
||||
Dim oStartTime = Now
|
||||
|
||||
If oSearch.ReturnType = Constants.ReturnTypeEnum.TreeView Then
|
||||
GridControlResults.Visible = False
|
||||
GridControlResults.Dock = DockStyle.None
|
||||
If oSearch.ReturnType = ReturnTypeEnum.TreeView Then
|
||||
' Baum
|
||||
SetResultVisbility(ReturnTypeEnum.TreeView)
|
||||
|
||||
TreeListResults.Visible = True
|
||||
TreeListResults.Dock = DockStyle.Fill
|
||||
If oTable Is Nothing Then
|
||||
Return False
|
||||
End If
|
||||
|
||||
TreeListResults.DataSource = oTable
|
||||
|
||||
@@ -258,12 +269,70 @@ Public Class frmMonitor
|
||||
SetResultCount(TreeListResults.AllNodesCount)
|
||||
|
||||
TreeListResults.Focus()
|
||||
Else
|
||||
GridControlResults.Visible = True
|
||||
GridControlResults.Dock = DockStyle.Fill
|
||||
ElseIf oSearch.ReturnType = Constants.ReturnTypeEnum.ChartView Then
|
||||
' Charts
|
||||
SetResultVisbility(ReturnTypeEnum.ChartView)
|
||||
|
||||
TreeListResults.Visible = False
|
||||
TreeListResults.Dock = DockStyle.None
|
||||
' Oberer SplitContainer
|
||||
Dim splitContainer1 As SplitContainerControl = CType(ChartViewResultContainer.Panel1.Controls(0), SplitContainerControl)
|
||||
' Unterer SplitContainer
|
||||
Dim splitContainer2 As SplitContainerControl = CType(ChartViewResultContainer.Panel2.Controls(0), SplitContainerControl)
|
||||
|
||||
ChartViewResultContainer.PanelVisibility = SplitPanelVisibility.Both
|
||||
splitContainer1.PanelVisibility = SplitPanelVisibility.Both
|
||||
splitContainer2.PanelVisibility = SplitPanelVisibility.Both
|
||||
|
||||
Dim chartArray(4) As ChartControl
|
||||
' TopLeft
|
||||
chartArray(0) = CType(splitContainer1.Panel1.Controls(0), ChartControl)
|
||||
' TopRight
|
||||
chartArray(1) = CType(splitContainer1.Panel2.Controls(0), ChartControl)
|
||||
' BottomLeft
|
||||
chartArray(2) = CType(splitContainer2.Panel1.Controls(0), ChartControl)
|
||||
' BottomRight
|
||||
chartArray(3) = CType(splitContainer2.Panel2.Controls(0), ChartControl)
|
||||
|
||||
For i As Integer = 0 To 3
|
||||
chartArray(i).Titles.Clear()
|
||||
chartArray(i).Series.Clear()
|
||||
Next
|
||||
ResizeCharContainer()
|
||||
|
||||
Dim oChartParameters As List(Of ChartParameter)
|
||||
oChartParameters = SearchLoader.ChartParameters.Where(Function(p) p.SearchId = oSearch.Id And p.ChartType <> ChartTypeEnum.Undefined).ToList()
|
||||
|
||||
For Each oChartParameterSet In oChartParameters
|
||||
Dim ChartViewResults As ChartControl
|
||||
|
||||
Select Case oChartParameterSet.ChartPos
|
||||
Case ChartPosEnum.TopLeft
|
||||
ChartViewResults = chartArray(0)
|
||||
Case ChartPosEnum.TopRight
|
||||
ChartViewResults = chartArray(1)
|
||||
Case ChartPosEnum.BottomLeft
|
||||
ChartViewResults = chartArray(2)
|
||||
Case ChartPosEnum.BottomRight
|
||||
ChartViewResults = chartArray(3)
|
||||
Case Else
|
||||
ChartViewResults = chartArray(0)
|
||||
End Select
|
||||
|
||||
SetChartTitle(ChartViewResults, oChartParameterSet.Title)
|
||||
Dim oSerie As Series = Await GetChartSerie(oChartParameterSet, oControls)
|
||||
ChartViewResults.Series.Add(oSerie)
|
||||
Next
|
||||
|
||||
SetPanelVisibility(chartArray)
|
||||
|
||||
ChartViewResultContainer.Focus()
|
||||
|
||||
Else
|
||||
' Tabelle
|
||||
SetResultVisbility(ReturnTypeEnum.Table)
|
||||
|
||||
If oTable Is Nothing Then
|
||||
Return False
|
||||
End If
|
||||
|
||||
GridControlResults.DataSource = oTable
|
||||
GridViewResults.PopulateColumns()
|
||||
@@ -330,7 +399,7 @@ Public Class frmMonitor
|
||||
|
||||
Workspace.LoadWorkspace(oSearch.Id.ToString)
|
||||
|
||||
btnExportMain.Enabled = True
|
||||
ActivateMenuBarButtons(oSearch.ReturnType)
|
||||
|
||||
Dim oTotalTime = Now.Subtract(oStartTime)
|
||||
lbSearchTime.Caption = oTotalTime.ToString("mm':'ss")
|
||||
@@ -343,6 +412,154 @@ Public Class frmMonitor
|
||||
SplashScreenManager1.CloseWaitForm()
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Private Sub ActivateMenuBarButtons(pSearchType As ReturnTypeEnum)
|
||||
Select Case pSearchType
|
||||
Case ReturnTypeEnum.ChartView
|
||||
btnExportMain.Enabled = False
|
||||
BarButtonItem2.Enabled = False
|
||||
btnResetLayout.Enabled = False
|
||||
Case Else
|
||||
btnExportMain.Enabled = True
|
||||
BarButtonItem2.Enabled = True
|
||||
btnResetLayout.Enabled = True
|
||||
End Select
|
||||
End Sub
|
||||
|
||||
Private Async Function GetChartSerie(pChartParameters As ChartParameter, pControls As List(Of Control)) As Threading.Tasks.Task(Of Series)
|
||||
Dim oSerie As Series
|
||||
|
||||
Select Case pChartParameters.ChartType
|
||||
Case ChartTypeEnum.Bar
|
||||
oSerie = New Series(pChartParameters.Title, ViewType.Bar)
|
||||
Case ChartTypeEnum.Line
|
||||
oSerie = New Series(pChartParameters.Title, ViewType.Line)
|
||||
Case ChartTypeEnum.Area
|
||||
oSerie = New Series(pChartParameters.Title, ViewType.Area)
|
||||
Case ChartTypeEnum.Pie
|
||||
oSerie = New Series(pChartParameters.Title, ViewType.Pie)
|
||||
oSerie.Label.TextPattern = "{V}"
|
||||
oSerie.LegendTextPattern = "{A}"
|
||||
Case Else
|
||||
Return Nothing
|
||||
End Select
|
||||
|
||||
Dim oSQL As String = Patterns.ReplaceControlValues(pChartParameters.SQLCommand, pControls)
|
||||
Logger.Debug($"SQL after replacing placeholder: [{0}]", oSQL)
|
||||
Dim oTable As DataTable = Await Database.GetDatatableAsync(oSQL)
|
||||
|
||||
Dim xAxisTitle As String = pChartParameters.Argument
|
||||
Dim yAxisTitle As String = pChartParameters.Value
|
||||
|
||||
For Each oRow In oTable.Rows
|
||||
Dim value1 As String = oRow.Item(xAxisTitle)
|
||||
Dim value2 As String = oRow.Item(yAxisTitle)
|
||||
oSerie.Points.Add(New SeriesPoint(value1, value2))
|
||||
Next
|
||||
|
||||
oSerie.ArgumentScaleType = ScaleType.Qualitative
|
||||
|
||||
Return oSerie
|
||||
|
||||
End Function
|
||||
|
||||
Private Sub SetChartTitle(pChartView As ChartControl, pTitle As String)
|
||||
' Wenn bereits ein Titel vorhanden ist, wird kein neuer ergänzt
|
||||
' relevant bei mehrere Charts in einem ChartControl
|
||||
If pChartView.Titles.Count = 0 Then
|
||||
Dim oTitle As ChartTitle = New ChartTitle With {
|
||||
.Text = pTitle
|
||||
}
|
||||
pChartView.Titles.Add(oTitle)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub SetPanelVisibility(chartArray() As ChartControl)
|
||||
If chartArray.Length < 4 Then
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
Dim showTop As Boolean = True
|
||||
Dim showBottom As Boolean = True
|
||||
|
||||
If chartArray(0).Titles.Count = 0 And chartArray(1).Titles.Count = 0 Then
|
||||
showTop = False
|
||||
End If
|
||||
|
||||
If chartArray(2).Titles.Count = 0 And chartArray(3).Titles.Count = 0 Then
|
||||
showBottom = False
|
||||
End If
|
||||
|
||||
If showBottom = False Then
|
||||
ChartViewResultContainer.PanelVisibility = SplitPanelVisibility.Panel1
|
||||
ElseIf showTop = False Then
|
||||
ChartViewResultContainer.PanelVisibility = SplitPanelVisibility.Panel2
|
||||
End If
|
||||
|
||||
If showTop = True Then
|
||||
Dim showLeft As Boolean = chartArray(0).Titles.Count > 0
|
||||
Dim showRight As Boolean = chartArray(1).Titles.Count > 0
|
||||
|
||||
Dim splitContainer1 As SplitContainerControl = CType(ChartViewResultContainer.Panel1.Controls(0), SplitContainerControl)
|
||||
|
||||
If showRight = False Then
|
||||
splitContainer1.PanelVisibility = SplitPanelVisibility.Panel1
|
||||
ElseIf showLeft = False Then
|
||||
splitContainer1.PanelVisibility = SplitPanelVisibility.Panel2
|
||||
End If
|
||||
End If
|
||||
|
||||
If showBottom = True Then
|
||||
Dim showLeft As Boolean = chartArray(2).Titles.Count > 0
|
||||
Dim showRight As Boolean = chartArray(3).Titles.Count > 0
|
||||
|
||||
Dim splitContainer2 As SplitContainerControl = CType(ChartViewResultContainer.Panel2.Controls(0), SplitContainerControl)
|
||||
|
||||
If showRight = False Then
|
||||
splitContainer2.PanelVisibility = SplitPanelVisibility.Panel1
|
||||
ElseIf showLeft = False Then
|
||||
splitContainer2.PanelVisibility = SplitPanelVisibility.Panel2
|
||||
End If
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub SetResultVisbility(pSearchMode As ReturnTypeEnum)
|
||||
Select Case pSearchMode
|
||||
Case ReturnTypeEnum.TreeView
|
||||
GridControlResults.Visible = False
|
||||
GridControlResults.Dock = DockStyle.None
|
||||
TreeListResults.Visible = True
|
||||
TreeListResults.Dock = DockStyle.Fill
|
||||
ChartViewResultContainer.Visible = False
|
||||
ChartViewResultContainer.Dock = DockStyle.None
|
||||
btnExportDetails.Enabled = True
|
||||
btnExportMain.Enabled = True
|
||||
|
||||
Case ReturnTypeEnum.ChartView
|
||||
GridControlResults.Visible = False
|
||||
GridControlResults.Dock = DockStyle.None
|
||||
TreeListResults.Visible = False
|
||||
TreeListResults.Dock = DockStyle.None
|
||||
ChartViewResultContainer.Visible = True
|
||||
ChartViewResultContainer.Dock = DockStyle.Fill
|
||||
btnExportDetails.Enabled = False
|
||||
btnExportMain.Enabled = False
|
||||
|
||||
Case ReturnTypeEnum.Table
|
||||
GridControlResults.Visible = True
|
||||
GridControlResults.Dock = DockStyle.Fill
|
||||
TreeListResults.Visible = False
|
||||
TreeListResults.Dock = DockStyle.None
|
||||
ChartViewResultContainer.Visible = False
|
||||
ChartViewResultContainer.Dock = DockStyle.None
|
||||
btnExportDetails.Enabled = True
|
||||
btnExportMain.Enabled = True
|
||||
End Select
|
||||
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' Linklogik für Hyperlink-Spalten
|
||||
''' </summary>
|
||||
@@ -391,7 +608,7 @@ Public Class frmMonitor
|
||||
Private Sub SetColumnsToDisAllowEditInGridViewResults()
|
||||
For Each oColumn As GridColumn In GridViewResults.Columns
|
||||
|
||||
If Not TypeOf oColumn.ColumnEdit Is RepositoryItemHyperLinkEdit Then
|
||||
If TypeOf oColumn.ColumnEdit IsNot RepositoryItemHyperLinkEdit Then
|
||||
' Verbietet Spaltenweise die Bearbeitung
|
||||
oColumn.OptionsColumn.AllowEdit = False
|
||||
End If
|
||||
@@ -419,6 +636,7 @@ Public Class frmMonitor
|
||||
Private Sub LoadSearches()
|
||||
Try
|
||||
SearchLoader.LoadSearchParameters()
|
||||
SearchLoader.LoadChartParameters()
|
||||
SearchLoader.LoadSearches()
|
||||
|
||||
cmbSearches.Properties.Items.Clear()
|
||||
@@ -999,6 +1217,23 @@ Public Class frmMonitor
|
||||
SplitContainerSQL.Panel1.Controls.Add(TreeListResults)
|
||||
End Sub
|
||||
|
||||
Private Sub InitChartContainer()
|
||||
ChartViewResultContainer = GridLoader.InitChartViewResultContainer()
|
||||
|
||||
SplitContainerSQL.Panel1.Controls.Add(ChartViewResultContainer)
|
||||
End Sub
|
||||
|
||||
Private Sub ResizeCharContainer()
|
||||
If ChartViewResultContainer.Visible = True Then
|
||||
Dim splitContainer1 As SplitContainerControl = CType(ChartViewResultContainer.Panel1.Controls(0), SplitContainerControl)
|
||||
Dim splitContainer2 As SplitContainerControl = CType(ChartViewResultContainer.Panel2.Controls(0), SplitContainerControl)
|
||||
|
||||
ChartViewResultContainer.SplitterPosition = CInt(ChartViewResultContainer.Height / 2)
|
||||
splitContainer1.SplitterPosition = CInt(splitContainer1.Width / 2)
|
||||
splitContainer2.SplitterPosition = CInt(splitContainer2.Width / 2)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub BarButtonItem2_ItemClick_1(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonItem2.ItemClick
|
||||
If ActiveSearch Is Nothing Then
|
||||
Exit Sub
|
||||
@@ -1014,5 +1249,6 @@ Public Class frmMonitor
|
||||
FormHelper.ShowErrorMessage(ex, "Log Verzeichnis öffnen")
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
Imports DevExpress.Utils
|
||||
Imports DevExpress.Utils.Extensions
|
||||
Imports DevExpress.XtraCharts
|
||||
Imports DevExpress.XtraEditors
|
||||
Imports DevExpress.XtraEditors.Controls
|
||||
Imports DevExpress.XtraEditors.Repository
|
||||
@@ -81,6 +83,62 @@ Public Class GridLoader
|
||||
Return oGrid
|
||||
End Function
|
||||
|
||||
Public Function InitChartViewResultContainer() As SplitContainerControl
|
||||
' Vorbereiten der SplitContainer-Struktur inkl. der ChartControls
|
||||
Dim oChartViewResultContainer As SplitContainerControl
|
||||
Dim oSplitContainerTop As SplitContainerControl
|
||||
Dim oSplitContainerBottom As SplitContainerControl
|
||||
|
||||
oChartViewResultContainer = New SplitContainerControl With {
|
||||
.Name = "ChartViewResultContainer",
|
||||
.Visible = False,
|
||||
.Dock = DockStyle.Fill,
|
||||
.Horizontal = False,
|
||||
.IsSplitterFixed = True
|
||||
}
|
||||
|
||||
oSplitContainerTop = New SplitContainerControl With {
|
||||
.Name = "SplitContainerTop",
|
||||
.Dock = DockStyle.Fill,
|
||||
.Horizontal = True,
|
||||
.IsSplitterFixed = True
|
||||
}
|
||||
|
||||
oSplitContainerBottom = New SplitContainerControl With {
|
||||
.Name = "SplitContainerBottom",
|
||||
.Dock = DockStyle.Fill,
|
||||
.Horizontal = True,
|
||||
.IsSplitterFixed = True
|
||||
}
|
||||
|
||||
oChartViewResultContainer.Panel1.AddControl(oSplitContainerTop)
|
||||
oChartViewResultContainer.Panel2.AddControl(oSplitContainerBottom)
|
||||
|
||||
Dim oChartControlTopLeft As ChartControl = New ChartControl With {
|
||||
.Name = "ChartControlTopLeft",
|
||||
.Dock = DockStyle.Fill
|
||||
}
|
||||
Dim oChartControlTopRight As ChartControl = New ChartControl With {
|
||||
.Name = "ChartControlTopRight",
|
||||
.Dock = DockStyle.Fill
|
||||
}
|
||||
Dim oChartControlBottomLeft As ChartControl = New ChartControl With {
|
||||
.Name = "ChartControlBottomLeft",
|
||||
.Dock = DockStyle.Fill
|
||||
}
|
||||
Dim oChartControlBottomRight As ChartControl = New ChartControl With {
|
||||
.Name = "ChartControlBottomRight",
|
||||
.Dock = DockStyle.Fill
|
||||
}
|
||||
|
||||
oSplitContainerTop.Panel1.AddControl(oChartControlTopLeft)
|
||||
oSplitContainerTop.Panel2.AddControl(oChartControlTopRight)
|
||||
oSplitContainerBottom.Panel1.AddControl(oChartControlBottomLeft)
|
||||
oSplitContainerBottom.Panel2.AddControl(oChartControlBottomRight)
|
||||
|
||||
Return oChartViewResultContainer
|
||||
End Function
|
||||
|
||||
Public Sub InitTreeListColumns(pTreeList As TreeList, pMaxLength As Integer)
|
||||
Dim oColumn1 = pTreeList.Columns.Item("COLUMN1")
|
||||
Dim oColumn2 = pTreeList.Columns.Item("COLUMN2")
|
||||
|
||||
@@ -12,6 +12,7 @@ Public Class SearchLoader
|
||||
|
||||
Public Searches As New List(Of Search)
|
||||
Public Parameters As New List(Of SearchParameter)
|
||||
Public ChartParameters As New List(Of ChartParameter)
|
||||
|
||||
Public Sub New(pLogConfig As LogConfig, pConfig As Config, pDatabase As MSSQLServer)
|
||||
MyBase.New(pLogConfig)
|
||||
@@ -49,7 +50,8 @@ Public Class SearchLoader
|
||||
End If
|
||||
|
||||
' Es wurde kein SQL Command definiert, ohne geht nix
|
||||
If oSearch.SQLCommand Is Nothing Or oSearch.SQLCommand.Length = 0 Then
|
||||
' Außer es ist eine Chart-Suche
|
||||
If oSearch.ReturnType <> ReturnTypeEnum.ChartView And (oSearch.SQLCommand Is Nothing Or oSearch.SQLCommand.Length = 0) Then
|
||||
Logger.Error($"For searchId [{0}] is NO SQLCommand defined!", oSearch.Id)
|
||||
Continue For
|
||||
End If
|
||||
@@ -90,6 +92,27 @@ Public Class SearchLoader
|
||||
Parameters = oParameters
|
||||
End Sub
|
||||
|
||||
Public Sub LoadChartParameters()
|
||||
Dim oSQL As String = $"SELECT * FROM TBMON_CHARTS"
|
||||
Dim oTable As DataTable = Database.GetDatatable(oSQL)
|
||||
Dim oParameters As New List(Of ChartParameter)
|
||||
|
||||
For Each oRow As DataRow In oTable.Rows
|
||||
oParameters.Add(New ChartParameter With {
|
||||
.Id = oRow.ItemEx("GUID", 0),
|
||||
.Title = oRow.ItemEx("TITLE", String.Empty),
|
||||
.SearchId = oRow.ItemEx("PROFILE_ID", 0),
|
||||
.ChartPos = GetChartPosType(oRow.ItemEx("POS_ID", 0)),
|
||||
.SQLCommand = oRow.ItemEx("SQL_COMMAND", String.Empty),
|
||||
.ChartType = GetChartType(oRow.ItemEx("CHART_TYPE", String.Empty)),
|
||||
.Argument = oRow.ItemEx("ARGUMENT", String.Empty),
|
||||
.Value = oRow.ItemEx("VALUE", String.Empty)
|
||||
})
|
||||
Next
|
||||
|
||||
ChartParameters = oParameters
|
||||
End Sub
|
||||
|
||||
Private Function GetItemType(pTypeString As String) As ItemTypeEnum
|
||||
Select Case pTypeString
|
||||
Case "LIST"
|
||||
@@ -107,6 +130,8 @@ Public Class SearchLoader
|
||||
Return ReturnTypeEnum.Table
|
||||
Case "TreeView"
|
||||
Return ReturnTypeEnum.TreeView
|
||||
Case "ChartView"
|
||||
Return ReturnTypeEnum.ChartView
|
||||
Case Else
|
||||
Return ReturnTypeEnum.Undefined
|
||||
End Select
|
||||
@@ -127,6 +152,34 @@ Public Class SearchLoader
|
||||
End Select
|
||||
End Function
|
||||
|
||||
Private Function GetChartType(pTypeString As String) As ChartTypeEnum
|
||||
Select Case pTypeString.ToUpper
|
||||
Case "BAR"
|
||||
Return ChartTypeEnum.Bar
|
||||
Case "AREA"
|
||||
Return ChartTypeEnum.Area
|
||||
Case "LINE"
|
||||
Return ChartTypeEnum.Line
|
||||
Case "PIE"
|
||||
Return ChartTypeEnum.Pie
|
||||
Case Else
|
||||
Return ChartTypeEnum.Undefined
|
||||
End Select
|
||||
End Function
|
||||
|
||||
Private Function GetChartPosType(pPosTypeId As Integer) As ChartPosEnum
|
||||
Select Case pPosTypeId
|
||||
Case 1
|
||||
Return ChartPosEnum.TopLeft
|
||||
Case 2
|
||||
Return ChartPosEnum.TopRight
|
||||
Case 3
|
||||
Return ChartPosEnum.BottomLeft
|
||||
Case 4
|
||||
Return ChartPosEnum.BottomRight
|
||||
Case Else
|
||||
Return ChartPosEnum.Undefined
|
||||
End Select
|
||||
End Function
|
||||
|
||||
End Class
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<OutputType>WinExe</OutputType>
|
||||
<RootNamespace>DigitalData.GUIs.Monitor</RootNamespace>
|
||||
<AssemblyName>DigitalData.GUIs.Monitor</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
|
||||
<StartupObject>Monitor.Program</StartupObject>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<OptionExplicit>On</OptionExplicit>
|
||||
@@ -59,6 +59,18 @@
|
||||
<Reference Include="DevExpress.Utils.v21.2" />
|
||||
<Reference Include="DevExpress.XtraBars.v21.2" />
|
||||
<Reference Include="DevExpress.Sparkline.v21.2.Core" />
|
||||
<Reference Include="DevExpress.XtraCharts.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>D:\ProgramFiles\DevExpress 21.2\Components\Bin\Framework\DevExpress.XtraCharts.v21.2.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="DevExpress.XtraCharts.v21.2.UI, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>D:\ProgramFiles\DevExpress 21.2\Components\Bin\Framework\DevExpress.XtraCharts.v21.2.UI.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="DevExpress.XtraCharts.v21.2.Wizard, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>D:\ProgramFiles\DevExpress 21.2\Components\Bin\Framework\DevExpress.XtraCharts.v21.2.Wizard.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="DevExpress.XtraDialogs.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
|
||||
<Reference Include="DevExpress.XtraEditors.v21.2" />
|
||||
<Reference Include="DevExpress.XtraGrid.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
|
||||
@@ -90,12 +102,10 @@
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\DDModules\Language\bin\Debug\DigitalData.Modules.Language.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="DigitalData.Modules.Logging, Version=2.5.4.2, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<Reference Include="DigitalData.Modules.Logging">
|
||||
<HintPath>..\..\DDModules\Logging\bin\Debug\DigitalData.Modules.Logging.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="DigitalData.Modules.Patterns, Version=1.1.0.1, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<Reference Include="DigitalData.Modules.Patterns">
|
||||
<HintPath>..\..\DDModules\Patterns\bin\Debug\DigitalData.Modules.Patterns.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
|
||||
@@ -135,6 +145,7 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="ApplicationEvents.vb" />
|
||||
<Compile Include="Data\ChartParameter.vb" />
|
||||
<Compile Include="Data\Config.vb" />
|
||||
<Compile Include="Constants.vb" />
|
||||
<Compile Include="Forms\frmMonitor.Designer.vb">
|
||||
|
||||
@@ -11,7 +11,7 @@ Imports System.Runtime.InteropServices
|
||||
<Assembly: AssemblyCompany("Digital Data")>
|
||||
<Assembly: AssemblyProduct("Monitor")>
|
||||
<Assembly: AssemblyCopyright("Copyright © 2023")>
|
||||
<Assembly: AssemblyTrademark("1.5.0.0")>
|
||||
<Assembly: AssemblyTrademark("1.6.0.1")>
|
||||
<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.5.0.0")>
|
||||
<Assembly: AssemblyVersion("1.6.0.1")>
|
||||
<Assembly: AssemblyFileVersion("1.0.0.0")>
|
||||
|
||||
46
GUIs.Monitor/My Project/Settings.Designer.vb
generated
46
GUIs.Monitor/My Project/Settings.Designer.vb
generated
@@ -12,15 +12,16 @@ Option Strict On
|
||||
Option Explicit On
|
||||
|
||||
|
||||
|
||||
<Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.8.1.0"), _
|
||||
Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Partial Friend NotInheritable Class Settings
|
||||
Inherits Global.System.Configuration.ApplicationSettingsBase
|
||||
|
||||
Private Shared defaultInstance As Settings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New Settings()),Settings)
|
||||
Namespace My
|
||||
|
||||
<Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.4.0.0"), _
|
||||
Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Partial Friend NotInheritable Class Settings
|
||||
Inherits Global.System.Configuration.ApplicationSettingsBase
|
||||
|
||||
Private Shared defaultInstance As Settings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New Settings()),Settings)
|
||||
|
||||
#Region "Automatische My.Settings-Speicherfunktion"
|
||||
#If _MyType = "WindowsForms" Then
|
||||
Private Shared addedHandler As Boolean
|
||||
@@ -29,16 +30,16 @@ Partial Friend NotInheritable Class Settings
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Private Shared Sub AutoSaveSettings(sender As Global.System.Object, e As Global.System.EventArgs)
|
||||
If My.Application.SaveMySettingsOnExit Then
|
||||
My.Settings.Save()
|
||||
End If
|
||||
End Sub
|
||||
' If My.Application.SaveMySettingsOnExit Then
|
||||
' My.Settings.Save()
|
||||
' End If
|
||||
End Sub
|
||||
#End If
|
||||
#End Region
|
||||
|
||||
Public Shared ReadOnly Property [Default]() As Settings
|
||||
Get
|
||||
|
||||
|
||||
Public Shared ReadOnly Property [Default]() As Settings
|
||||
Get
|
||||
|
||||
#If _MyType = "WindowsForms" Then
|
||||
If Not addedHandler Then
|
||||
SyncLock addedHandlerLockObject
|
||||
@@ -49,10 +50,11 @@ Partial Friend NotInheritable Class Settings
|
||||
End SyncLock
|
||||
End If
|
||||
#End If
|
||||
Return defaultInstance
|
||||
End Get
|
||||
End Property
|
||||
End Class
|
||||
Return defaultInstance
|
||||
End Get
|
||||
End Property
|
||||
End Class
|
||||
End Namespace
|
||||
|
||||
Namespace My
|
||||
|
||||
@@ -62,9 +64,9 @@ Namespace My
|
||||
Friend Module MySettingsProperty
|
||||
|
||||
<Global.System.ComponentModel.Design.HelpKeywordAttribute("My.Settings")> _
|
||||
Friend ReadOnly Property Settings() As Global.DigitalData.GUIs.Monitor.Settings
|
||||
Friend ReadOnly Property Settings() As Global.DigitalData.GUIs.Monitor.My.Settings
|
||||
Get
|
||||
Return Global.DigitalData.GUIs.Monitor.Settings.Default
|
||||
Return Global.DigitalData.GUIs.Monitor.My.Settings.Default
|
||||
End Get
|
||||
End Property
|
||||
End Module
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
</DevExpress.LookAndFeel.Design.AppSettings>
|
||||
</applicationSettings>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2"/>
|
||||
</startup>
|
||||
<system.diagnostics>
|
||||
<sources>
|
||||
|
||||
Reference in New Issue
Block a user