Loading Form, center integer columns, use sequence field, simplify, fix layout

This commit is contained in:
Jonathan Jenne 2022-07-14 11:49:41 +02:00
parent a9dcf0a7ed
commit 0958e46eab
15 changed files with 663 additions and 267 deletions

View File

@ -7,6 +7,14 @@
'Public Const STATE_DEFAULT As String = "DEFAULT" 'Public Const STATE_DEFAULT As String = "DEFAULT"
'Public Const STATE_USER As String = "USER" 'Public Const STATE_USER As String = "USER"
Public Class State
Public Const STATE_SUCCESS As String = "SUCCESS"
Public Const STATE_FAILURE As String = "FAILURE"
Public Const STATE_WARNING As String = "WARNING"
Public Const STATE_WAITING As String = "WAITING"
Public Const STATE_HIGHLIGHT As String = "HIGHLIGHT"
End Class
Public Enum ReturnTypeEnum Public Enum ReturnTypeEnum
Undefined Undefined
Table Table

171
GUIs.Monitor/GridLoader.vb Normal file
View File

@ -0,0 +1,171 @@
Imports DevExpress.Utils
Imports DevExpress.XtraEditors.Controls
Imports DevExpress.XtraEditors.Repository
Imports DevExpress.XtraGrid
Imports DevExpress.XtraGrid.Views.Grid
Imports DevExpress.XtraTreeList
Imports DigitalData.GUIs.Common
Imports DigitalData.Modules.Base
Imports DigitalData.Modules.Logging
Public Class GridLoader
Inherits BaseClass
Public Const STATE_SUCCESS As String = "SUCCESS"
Public Const STATE_FAILURE As String = "FAILURE"
Public Const STATE_WARNING As String = "WARNING"
Public Const STATE_WAITING As String = "WAITING"
Public Const STATE_HIGHLIGHT As String = "HIGHLIGHT"
Public ReadOnly Property SvgImageCollection As SvgImageCollection
Public ReadOnly Property GridBuilder As GridBuilder
Private ReadOnly StateIcons As New Dictionary(Of String, NodeImage) From {
{STATE_SUCCESS, NodeImage.Success},
{STATE_FAILURE, NodeImage.Failure}
}
Private Enum NodeImage
[Default] = 0
SQL = 1
File = 2
Mail = 3
Success = 4
Failure = 5
Warning = 6
Waiting = 7
User = 8
Highlight = 9
End Enum
Public Sub New(pLogConfig As LogConfig, pSvgImageCollection As SvgImageCollection)
MyBase.New(pLogConfig)
Me.SvgImageCollection = pSvgImageCollection
Me.GridBuilder = New GridBuilder()
End Sub
Public Function InitTreeList() As TreeList
Dim oTreeList = New TreeList() With {
.Name = "TreeListResults",
.Visible = False
}
oTreeList.ForceInitialize()
oTreeList.KeyFieldName = "GUID"
oTreeList.ParentFieldName = "PARENT_ID"
GridBuilder.SetDefaults(oTreeList)
GridBuilder.SetClipboardHandler(oTreeList)
GridBuilder.SetReadOnlyOptions(oTreeList)
Return oTreeList
End Function
Public Function InitGrid() As GridControl
Dim oGrid = New GridControl() With {
.Name = "GridViewResults",
.Visible = False
}
oGrid.ForceInitialize()
Dim oView = DirectCast(oGrid.DefaultView, GridView)
GridBuilder.SetDefaults(oView)
GridBuilder.SetClipboardHandler(oView)
GridBuilder.SetReadOnlyOptions(oView)
Return oGrid
End Function
Public Sub InitTreeListColumns(pTreeList As TreeList, pMaxLength As Integer)
Dim oColumn1 = pTreeList.Columns.Item("COLUMN1")
Dim oColumn2 = pTreeList.Columns.Item("COLUMN2")
Dim oColumn3 = pTreeList.Columns.Item("COLUMN3")
Dim oAddedWhenColumn = pTreeList.Columns.Item("ADDED_WHEN")
Dim oStateColumn = pTreeList.Columns.Item("STATE")
Dim oIconColumn = pTreeList.Columns.Item("ICON")
Dim oStateEdit As RepositoryItemImageComboBox = GetStateEdit()
Dim oIconEdit As RepositoryItemImageComboBox = GetIconEdit()
oColumn1.VisibleIndex = 0
oStateColumn.VisibleIndex = 1
oIconColumn.VisibleIndex = 2
Dim oColumnLength = pMaxLength * 5
With oColumn1
.Caption = "Titel"
.MinWidth = oColumnLength
.MaxWidth = oColumnLength
.Width = oColumnLength
.OptionsColumn.AllowSize = False
.OptionsColumn.AllowSort = False
End With
With oColumn2
.Caption = "Wert 1"
End With
With oColumn3
.Caption = "Wert 2"
End With
With oAddedWhenColumn
.Caption = "Datum"
End With
With oStateColumn
.ColumnEdit = oStateEdit
.MaxWidth = 25
.MinWidth = 25
.Width = 25
.Caption = " "
.OptionsColumn.AllowSize = False
.OptionsColumn.AllowSort = False
.ImageOptions.Image = SvgImageCollection.GetImage(NodeImage.Success)
End With
With oIconColumn
.ColumnEdit = oIconEdit
.MaxWidth = 25
.MinWidth = 25
.Width = 25
.Caption = " "
.OptionsColumn.AllowSize = False
.OptionsColumn.AllowSort = False
.ImageOptions.Image = SvgImageCollection.GetImage(NodeImage.SQL)
End With
End Sub
Private Function GetIconEdit() As RepositoryItemImageComboBox
Dim oIconEdit As New RepositoryItemImageComboBox With {
.SmallImages = SvgImageCollection,
.GlyphAlignment = HorzAlignment.Near
}
oIconEdit.Buttons.Clear()
oIconEdit.Items.AddRange(New List(Of ImageComboBoxItem) From {
New ImageComboBoxItem("Email", "MAIL", NodeImage.Mail),
New ImageComboBoxItem("SQL", "SQL", NodeImage.SQL),
New ImageComboBoxItem("File", "FILE", NodeImage.File)
})
Return oIconEdit
End Function
Private Function GetStateEdit() As RepositoryItemImageComboBox
Dim oStateEdit As New RepositoryItemImageComboBox With {
.SmallImages = SvgImageCollection,
.GlyphAlignment = HorzAlignment.Near
}
oStateEdit.Buttons.Clear()
oStateEdit.Items.AddRange(New List(Of ImageComboBoxItem) From {
New ImageComboBoxItem("Success", "SUCCESS", NodeImage.Success),
New ImageComboBoxItem("Failure", "FAILURE", NodeImage.Failure),
New ImageComboBoxItem("Warning", "WARNING", NodeImage.Warning),
New ImageComboBoxItem("Waiting", "WAITING", NodeImage.Waiting),
New ImageComboBoxItem("Default", "DEFAULT", NodeImage.Default),
New ImageComboBoxItem("User", "USER", NodeImage.User),
New ImageComboBoxItem("Highlight", "HIGHLIGHT", NodeImage.Highlight)
})
Return oStateEdit
End Function
End Class

View File

@ -145,6 +145,7 @@
<Compile Include="frmMonitor.vb"> <Compile Include="frmMonitor.vb">
<SubType>Form</SubType> <SubType>Form</SubType>
</Compile> </Compile>
<Compile Include="GridLoader.vb" />
<Compile Include="My Project\Application.Designer.vb"> <Compile Include="My Project\Application.Designer.vb">
<AutoGen>True</AutoGen> <AutoGen>True</AutoGen>
<DependentUpon>Application.myapp</DependentUpon> <DependentUpon>Application.myapp</DependentUpon>
@ -155,6 +156,13 @@
<Compile Include="Search.vb" /> <Compile Include="Search.vb" />
<Compile Include="SearchLoader.vb" /> <Compile Include="SearchLoader.vb" />
<Compile Include="SearchParameter.vb" /> <Compile Include="SearchParameter.vb" />
<Compile Include="frmLoading.Designer.vb">
<DependentUpon>frmLoading.vb</DependentUpon>
</Compile>
<Compile Include="frmLoading.vb">
<SubType>Form</SubType>
</Compile>
<Compile Include="Validator.vb" />
<EmbeddedResource Include="frmMonitor.resx"> <EmbeddedResource Include="frmMonitor.resx">
<DependentUpon>frmMonitor.vb</DependentUpon> <DependentUpon>frmMonitor.vb</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
@ -170,6 +178,9 @@
<DependentUpon>Resources.resx</DependentUpon> <DependentUpon>Resources.resx</DependentUpon>
<DesignTime>True</DesignTime> <DesignTime>True</DesignTime>
</Compile> </Compile>
<EmbeddedResource Include="frmLoading.resx">
<DependentUpon>frmLoading.vb</DependentUpon>
</EmbeddedResource>
<None Include="app.config" /> <None Include="app.config" />
<None Include="My Project\Settings.settings"> <None Include="My Project\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator> <Generator>SettingsSingleFileGenerator</Generator>
@ -211,6 +222,7 @@
<Content Include="MailLicense.xml"> <Content Include="MailLicense.xml">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content> </Content>
<None Include="Resources\movepivottable.svg" />
<None Include="Resources\exporttoxlsx1.svg" /> <None Include="Resources\exporttoxlsx1.svg" />
<None Include="Resources\exporttoxlsx.svg" /> <None Include="Resources\exporttoxlsx.svg" />
<None Include="Resources\deletetable.svg" /> <None Include="Resources\deletetable.svg" />

View File

@ -159,5 +159,15 @@ Namespace My.Resources
Return CType(obj,DevExpress.Utils.Svg.SvgImage) Return CType(obj,DevExpress.Utils.Svg.SvgImage)
End Get End Get
End Property End Property
'''<summary>
''' Sucht eine lokalisierte Ressource vom Typ DevExpress.Utils.Svg.SvgImage.
'''</summary>
Friend ReadOnly Property movepivottable() As DevExpress.Utils.Svg.SvgImage
Get
Dim obj As Object = ResourceManager.GetObject("movepivottable", resourceCulture)
Return CType(obj,DevExpress.Utils.Svg.SvgImage)
End Get
End Property
End Module End Module
End Namespace End Namespace

View File

@ -124,9 +124,15 @@
<data name="exporttoxlsx" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="exporttoxlsx" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\exporttoxlsx.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value> <value>..\Resources\exporttoxlsx.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
</data> </data>
<data name="exporttoxlsx1" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\exporttoxlsx1.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
</data>
<data name="export" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="export" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\export.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value> <value>..\Resources\export.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
</data> </data>
<data name="managedatasource" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\managedatasource.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
</data>
<data name="deletetable" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="deletetable" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\deletetable.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value> <value>..\Resources\deletetable.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
</data> </data>
@ -136,16 +142,13 @@
<data name="enablesearch" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="enablesearch" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\enablesearch.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value> <value>..\Resources\enablesearch.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
</data> </data>
<data name="bo_dashboard" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\bo_dashboard.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
</data>
<data name="gettingstarted" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="gettingstarted" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\gettingstarted.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value> <value>..\Resources\gettingstarted.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
</data> </data>
<data name="managedatasource" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="bo_dashboard" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\managedatasource.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value> <value>..\Resources\bo_dashboard.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
</data> </data>
<data name="exporttoxlsx1" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="movepivottable" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\exporttoxlsx1.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value> <value>..\Resources\movepivottable.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
</data> </data>
</root> </root>

View File

@ -0,0 +1,14 @@
<?xml version='1.0' encoding='UTF-8'?>
<svg x="0px" y="0px" viewBox="0 0 32 32" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" id="Move_PivotTable" style="enable-background:new 0 0 32 32">
<style type="text/css">
.Black{fill:#727272;}
.Blue{fill:#1177D7;}
.Green{fill:#039C23;}
.st0{opacity:0.5;}
</style>
<g class="st0">
<path d="M10,10H6V6h4V10z M24,6H12v4h12V6z M10,12H6v12h4V12z" class="Blue" />
</g>
<path d="M18,26h-6H4V4h22v11.6l2,1.3V3c0-0.6-0.4-1-1-1H3C2.4,2,2,2.4,2,3v24c0,0.6,0.4,1,1,1h15V26z" class="Black" />
<path d="M12,24h8v6l12-8l-12-8v6h-8V24z" class="Green" />
</svg>

View File

@ -4,7 +4,7 @@ Imports DigitalData.Modules.Logging
Imports DigitalData.Modules.Language Imports DigitalData.Modules.Language
Imports DigitalData.GUIs.Monitor.Constants Imports DigitalData.GUIs.Monitor.Constants
Partial Public Class SearchLoader Public Class SearchLoader
Inherits BaseClass Inherits BaseClass
Private ReadOnly Config As Config Private ReadOnly Config As Config
@ -30,6 +30,7 @@ Partial Public Class SearchLoader
Dim oSearchId = oRow.ItemEx("GUID", 0) Dim oSearchId = oRow.ItemEx("GUID", 0)
Dim oParams = Parameters. Dim oParams = Parameters.
Where(Function(param) param.SearchId = oSearchId). Where(Function(param) param.SearchId = oSearchId).
OrderBy(Function(param) param.Sequence).
ToList() ToList()
Searches.Add(New Search With { Searches.Add(New Search With {
@ -48,43 +49,6 @@ Partial Public Class SearchLoader
End Try End Try
End Sub End Sub
Public Function GetItemType(pTypeString As String) As ItemTypeEnum
Select Case pTypeString
Case "LIST"
Return ItemTypeEnum.List
Case "SQL"
Return ItemTypeEnum.SQL
Case Else
Return ItemTypeEnum.Undefined
End Select
End Function
Public Function GetReturnType(pTypeString As String) As ReturnTypeEnum
Select Case pTypeString
Case "Table"
Return ReturnTypeEnum.Table
Case "TreeView"
Return ReturnTypeEnum.TreeView
Case Else
Return ReturnTypeEnum.Undefined
End Select
End Function
Public Function GetDataType(pTypeString As String) As DataTypeEnum
Select Case pTypeString
Case "BIT"
Return DataTypeEnum.Boolean
Case "VARCHAR"
Return DataTypeEnum.String
Case "INT"
Return DataTypeEnum.Integer
Case "DATE"
Return DataTypeEnum.Date
Case Else
Return DataTypeEnum.Undefined
End Select
End Function
Public Sub LoadSearchParameters() Public Sub LoadSearchParameters()
Dim oSQL As String = $"SELECT * FROM TBMON_PROFILE_PARAM WHERE ACTIVE = 1 ORDER BY SEQUENCE" Dim oSQL As String = $"SELECT * FROM TBMON_PROFILE_PARAM WHERE ACTIVE = 1 ORDER BY SEQUENCE"
Dim oTable As DataTable = Database.GetDatatable(oSQL) Dim oTable As DataTable = Database.GetDatatable(oSQL)
@ -101,11 +65,51 @@ Partial Public Class SearchLoader
.Required = oRow.ItemEx("REQUIRED", True), .Required = oRow.ItemEx("REQUIRED", True),
.PatternTitle = oRow.ItemEx("PATTERN", String.Empty), .PatternTitle = oRow.ItemEx("PATTERN", String.Empty),
.SearchId = oRow.ItemEx("PROFILE_ID", 0), .SearchId = oRow.ItemEx("PROFILE_ID", 0),
.DefaultValue = oRow.ItemEx("DEFAULT_VALUE", String.Empty) .DefaultValue = oRow.ItemEx("DEFAULT_VALUE", String.Empty),
.Sequence = oRow.ItemEx("SEQUENCE", 0)
}) })
Next Next
Parameters = oParameters Parameters = oParameters
End Sub End Sub
Private Function GetItemType(pTypeString As String) As ItemTypeEnum
Select Case pTypeString
Case "LIST"
Return ItemTypeEnum.List
Case "SQL"
Return ItemTypeEnum.SQL
Case Else
Return ItemTypeEnum.Undefined
End Select
End Function
Private Function GetReturnType(pTypeString As String) As ReturnTypeEnum
Select Case pTypeString
Case "Table"
Return ReturnTypeEnum.Table
Case "TreeView"
Return ReturnTypeEnum.TreeView
Case Else
Return ReturnTypeEnum.Undefined
End Select
End Function
Private Function GetDataType(pTypeString As String) As DataTypeEnum
Select Case pTypeString
Case "BIT"
Return DataTypeEnum.Boolean
Case "VARCHAR"
Return DataTypeEnum.String
Case "INT"
Return DataTypeEnum.Integer
Case "DATE"
Return DataTypeEnum.Date
Case Else
Return DataTypeEnum.Undefined
End Select
End Function
End Class End Class

View File

@ -9,6 +9,7 @@
Public Required As Boolean Public Required As Boolean
Public SearchId As Integer Public SearchId As Integer
Public DefaultValue As String Public DefaultValue As String
Public Sequence As Integer
Public ReadOnly Property HasItems As Boolean Public ReadOnly Property HasItems As Boolean
Get Get

79
GUIs.Monitor/Validator.vb Normal file
View File

@ -0,0 +1,79 @@
Imports DevExpress.Utils
Imports DevExpress.Utils.VisualEffects
Imports DevExpress.XtraLayout
Imports DigitalData.GUIs.Common
Imports DigitalData.Modules.Base
Imports DigitalData.Modules.Logging
Public Class Validator
Inherits BaseClass
Public Sub New(pLogConfig As LogConfig, pLayoutControl As LayoutControl, pAdornerUIManager As AdornerUIManager, pControlHelper As ControlHelper)
MyBase.New(pLogConfig)
Me.LayoutControl = pLayoutControl
Me.AdornerUIManager = pAdornerUIManager
Me.ControlHelper = pControlHelper
End Sub
Public ReadOnly Property LayoutControl As LayoutControl
Public ReadOnly Property AdornerUIManager As AdornerUIManager
Public ReadOnly Property ControlHelper As ControlHelper
Public Function Validate(pSearch As Search) As Boolean
With AdornerUIManager.ValidationHintProperties
.State = ValidationHintState.Invalid
.InvalidState.ShowBorder = True
.InvalidState.ShowBackgroundMode = ValidationHintBackgroundMode.Target
End With
AdornerUIManager.Hide()
AdornerUIManager.Elements.Clear()
Dim oMissingParams As Boolean = False
Dim oControls As New List(Of Control)
For Each oItem As Control In LayoutControl.Controls
Dim oParam = pSearch.Parameters.
Where(Function(param) param.PatternTitle = oItem.Name).
FirstOrDefault()
If oParam Is Nothing Then
Continue For
End If
oControls.Add(oItem)
If oParam.Required And Not ControlHelper.HasValue(oItem) Then
AdornerUIManager.Elements.Add(New ValidationHint With {
.TargetElement = oItem,
.Visible = True
})
oMissingParams = True
End If
Next
AdornerUIManager.Show()
Return oMissingParams
End Function
Public Function GetControlsWithParams(pSearch As Search) As List(Of Control)
Dim oControls As New List(Of Control)
For Each oItem As Control In LayoutControl.Controls
Dim oParam = pSearch.Parameters.
Where(Function(param) param.PatternTitle = oItem.Name).
FirstOrDefault()
If oParam Is Nothing Then
Continue For
End If
oControls.Add(oItem)
Next
Return oControls
End Function
End Class

83
GUIs.Monitor/frmLoading.Designer.vb generated Normal file
View File

@ -0,0 +1,83 @@
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Partial Class frmLoading
Inherits DevExpress.XtraWaitForm.WaitForm
'Form overrides dispose to clean up the component list.
<System.Diagnostics.DebuggerNonUserCode()> _
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
Try
If disposing AndAlso components IsNot Nothing Then
components.Dispose()
End If
Finally
MyBase.Dispose(disposing)
End Try
End Sub
'Required by the Windows Form Designer
Private components As System.ComponentModel.IContainer
'NOTE: The following procedure is required by the Windows Form Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
<System.Diagnostics.DebuggerStepThrough()> _
Private Sub InitializeComponent()
Me.progressPanel1 = New DevExpress.XtraWaitForm.ProgressPanel()
Me.tableLayoutPanel1 = New System.Windows.Forms.TableLayoutPanel()
Me.tableLayoutPanel1.SuspendLayout()
Me.SuspendLayout()
'
'progressPanel1
'
Me.progressPanel1.Appearance.BackColor = System.Drawing.Color.Transparent
Me.progressPanel1.Appearance.Options.UseBackColor = True
Me.progressPanel1.AppearanceCaption.Font = New System.Drawing.Font("Microsoft Sans Serif", 12.0!)
Me.progressPanel1.AppearanceCaption.Options.UseFont = True
Me.progressPanel1.AppearanceDescription.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!)
Me.progressPanel1.AppearanceDescription.Options.UseFont = True
Me.progressPanel1.Dock = System.Windows.Forms.DockStyle.Fill
Me.progressPanel1.ImageHorzOffset = 20
Me.progressPanel1.Location = New System.Drawing.Point(0, 17)
Me.progressPanel1.Margin = New System.Windows.Forms.Padding(0, 3, 0, 3)
Me.progressPanel1.Name = "progressPanel1"
Me.progressPanel1.Size = New System.Drawing.Size(246, 39)
Me.progressPanel1.TabIndex = 0
Me.progressPanel1.Text = "progressPanel1"
'
'tableLayoutPanel1
'
Me.tableLayoutPanel1.AutoSize = True
Me.tableLayoutPanel1.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink
Me.tableLayoutPanel1.BackColor = System.Drawing.Color.Transparent
Me.tableLayoutPanel1.ColumnCount = 1
Me.tableLayoutPanel1.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100.0!))
Me.tableLayoutPanel1.Controls.Add(Me.progressPanel1, 0, 0)
Me.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill
Me.tableLayoutPanel1.Location = New System.Drawing.Point(0, 0)
Me.tableLayoutPanel1.Name = "tableLayoutPanel1"
Me.tableLayoutPanel1.Padding = New System.Windows.Forms.Padding(0, 14, 0, 14)
Me.tableLayoutPanel1.RowCount = 1
Me.tableLayoutPanel1.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100.0!))
Me.tableLayoutPanel1.Size = New System.Drawing.Size(246, 73)
Me.tableLayoutPanel1.TabIndex = 1
'
'Form1
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.AutoSize = True
Me.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink
Me.ClientSize = New System.Drawing.Size(246, 73)
Me.Controls.Add(Me.tableLayoutPanel1)
Me.DoubleBuffered = True
Me.Name = "Form1"
Me.StartPosition = FormStartPosition.Manual
Me.Text = "Form1"
Me.tableLayoutPanel1.ResumeLayout(false)
Me.ResumeLayout(False)
Me.PerformLayout()
End Sub
Private WithEvents progressPanel1 As DevExpress.XtraWaitForm.ProgressPanel
Private WithEvents tableLayoutPanel1 As System.Windows.Forms.TableLayoutPanel
End Class

View File

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace"></xsd:import>
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0"></xsd:element>
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string"></xsd:attribute>
<xsd:attribute name="type" type="xsd:string"></xsd:attribute>
<xsd:attribute name="mimetype" type="xsd:string"></xsd:attribute>
<xsd:attribute ref="xml:space"></xsd:attribute>
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string"></xsd:attribute>
<xsd:attribute name="name" type="xsd:string"></xsd:attribute>
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1"></xsd:element>
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2"></xsd:element>
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1"></xsd:attribute>
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3"></xsd:attribute>
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4"></xsd:attribute>
<xsd:attribute ref="xml:space"></xsd:attribute>
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1"></xsd:element>
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required"></xsd:attribute>
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@ -0,0 +1,24 @@
Public Class frmLoading
Sub New
InitializeComponent()
Me.progressPanel1.AutoHeight = True
End Sub
Public Overrides Sub SetCaption(ByVal caption As String)
MyBase.SetCaption(caption)
Me.progressPanel1.Caption = caption
End Sub
Public Overrides Sub SetDescription(ByVal description As String)
MyBase.SetDescription(description)
Me.progressPanel1.Description = description
End Sub
Public Overrides Sub ProcessCommand(ByVal cmd As System.Enum, ByVal arg As Object)
MyBase.ProcessCommand(cmd, arg)
End Sub
Public Enum WaitFormCommand
SomeCommandId
End Enum
End Class

View File

@ -34,6 +34,7 @@ Partial Class frmMonitor
Me.lbResultCount = New DevExpress.XtraBars.BarStaticItem() Me.lbResultCount = New DevExpress.XtraBars.BarStaticItem()
Me.btnReloadSearches = New DevExpress.XtraBars.BarButtonItem() Me.btnReloadSearches = New DevExpress.XtraBars.BarButtonItem()
Me.btnResetLayout = New DevExpress.XtraBars.BarButtonItem() Me.btnResetLayout = New DevExpress.XtraBars.BarButtonItem()
Me.BarButtonItem2 = New DevExpress.XtraBars.BarButtonItem()
Me.RibbonPage1 = New DevExpress.XtraBars.Ribbon.RibbonPage() Me.RibbonPage1 = New DevExpress.XtraBars.Ribbon.RibbonPage()
Me.RibbonPageGroup1 = New DevExpress.XtraBars.Ribbon.RibbonPageGroup() Me.RibbonPageGroup1 = New DevExpress.XtraBars.Ribbon.RibbonPageGroup()
Me.RibbonPageGroup3 = New DevExpress.XtraBars.Ribbon.RibbonPageGroup() Me.RibbonPageGroup3 = New DevExpress.XtraBars.Ribbon.RibbonPageGroup()
@ -80,6 +81,7 @@ Partial Class frmMonitor
Me.XtraSaveFileDialog1 = New DevExpress.XtraEditors.XtraSaveFileDialog(Me.components) Me.XtraSaveFileDialog1 = New DevExpress.XtraEditors.XtraSaveFileDialog(Me.components)
Me.AdornerUIManager2 = New DevExpress.Utils.VisualEffects.AdornerUIManager(Me.components) Me.AdornerUIManager2 = New DevExpress.Utils.VisualEffects.AdornerUIManager(Me.components)
Me.WorkspaceManager1 = New DevExpress.Utils.WorkspaceManager(Me.components) Me.WorkspaceManager1 = New DevExpress.Utils.WorkspaceManager(Me.components)
Me.SplashScreenManager1 = New DevExpress.XtraSplashScreen.SplashScreenManager(Me, GetType(Global.DigitalData.GUIs.Monitor.frmLoading), True, True)
CType(Me.RibbonControl1, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.RibbonControl1, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.ApplicationMenu1, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.ApplicationMenu1, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.XtraTabControlFileHTML, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.XtraTabControlFileHTML, System.ComponentModel.ISupportInitialize).BeginInit()
@ -139,9 +141,9 @@ Partial Class frmMonitor
' '
Me.RibbonControl1.ApplicationButtonDropDownControl = Me.ApplicationMenu1 Me.RibbonControl1.ApplicationButtonDropDownControl = Me.ApplicationMenu1
Me.RibbonControl1.ExpandCollapseItem.Id = 0 Me.RibbonControl1.ExpandCollapseItem.Id = 0
Me.RibbonControl1.Items.AddRange(New DevExpress.XtraBars.BarItem() {Me.RibbonControl1.ExpandCollapseItem, Me.RibbonControl1.SearchEditItem, Me.buttonSearch, Me.BarButtonItem1, Me.btnExportDetails, Me.btnExportMain, Me.lbResultCount, Me.btnReloadSearches, Me.btnResetLayout}) Me.RibbonControl1.Items.AddRange(New DevExpress.XtraBars.BarItem() {Me.RibbonControl1.ExpandCollapseItem, Me.RibbonControl1.SearchEditItem, Me.buttonSearch, Me.BarButtonItem1, Me.btnExportDetails, Me.btnExportMain, Me.lbResultCount, Me.btnReloadSearches, Me.btnResetLayout, Me.BarButtonItem2})
Me.RibbonControl1.Location = New System.Drawing.Point(0, 0) Me.RibbonControl1.Location = New System.Drawing.Point(0, 0)
Me.RibbonControl1.MaxItemId = 9 Me.RibbonControl1.MaxItemId = 10
Me.RibbonControl1.Name = "RibbonControl1" Me.RibbonControl1.Name = "RibbonControl1"
Me.RibbonControl1.Pages.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPage() {Me.RibbonPage1}) Me.RibbonControl1.Pages.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPage() {Me.RibbonPage1})
Me.RibbonControl1.ShowToolbarCustomizeItem = False Me.RibbonControl1.ShowToolbarCustomizeItem = False
@ -172,7 +174,7 @@ Partial Class frmMonitor
' '
'btnExportDetails 'btnExportDetails
' '
Me.btnExportDetails.Caption = "SQL Ansicht exportieren" Me.btnExportDetails.Caption = "Export SQL Ansicht"
Me.btnExportDetails.Enabled = False Me.btnExportDetails.Enabled = False
Me.btnExportDetails.Id = 4 Me.btnExportDetails.Id = 4
Me.btnExportDetails.ImageOptions.SvgImage = Global.DigitalData.GUIs.Monitor.My.Resources.Resources.exporttoxlsx1 Me.btnExportDetails.ImageOptions.SvgImage = Global.DigitalData.GUIs.Monitor.My.Resources.Resources.exporttoxlsx1
@ -180,7 +182,7 @@ Partial Class frmMonitor
' '
'btnExportMain 'btnExportMain
' '
Me.btnExportMain.Caption = "Hauptansicht exportieren" Me.btnExportMain.Caption = "Export Übersicht"
Me.btnExportMain.Enabled = False Me.btnExportMain.Enabled = False
Me.btnExportMain.Id = 5 Me.btnExportMain.Id = 5
Me.btnExportMain.ImageOptions.SvgImage = Global.DigitalData.GUIs.Monitor.My.Resources.Resources.exporttoxlsx Me.btnExportMain.ImageOptions.SvgImage = Global.DigitalData.GUIs.Monitor.My.Resources.Resources.exporttoxlsx
@ -198,7 +200,7 @@ Partial Class frmMonitor
' '
'btnReloadSearches 'btnReloadSearches
' '
Me.btnReloadSearches.Caption = "Suchen neuladen" Me.btnReloadSearches.Caption = "Suchen neu laden"
Me.btnReloadSearches.Id = 7 Me.btnReloadSearches.Id = 7
Me.btnReloadSearches.ImageOptions.SvgImage = Global.DigitalData.GUIs.Monitor.My.Resources.Resources.actions_reload Me.btnReloadSearches.ImageOptions.SvgImage = Global.DigitalData.GUIs.Monitor.My.Resources.Resources.actions_reload
Me.btnReloadSearches.Name = "btnReloadSearches" Me.btnReloadSearches.Name = "btnReloadSearches"
@ -210,6 +212,13 @@ Partial Class frmMonitor
Me.btnResetLayout.ImageOptions.SvgImage = Global.DigitalData.GUIs.Monitor.My.Resources.Resources.deletetable Me.btnResetLayout.ImageOptions.SvgImage = Global.DigitalData.GUIs.Monitor.My.Resources.Resources.deletetable
Me.btnResetLayout.Name = "btnResetLayout" Me.btnResetLayout.Name = "btnResetLayout"
' '
'BarButtonItem2
'
Me.BarButtonItem2.Caption = "Layout speichern"
Me.BarButtonItem2.Id = 9
Me.BarButtonItem2.ImageOptions.SvgImage = Global.DigitalData.GUIs.Monitor.My.Resources.Resources.movepivottable
Me.BarButtonItem2.Name = "BarButtonItem2"
'
'RibbonPage1 'RibbonPage1
' '
Me.RibbonPage1.Groups.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPageGroup() {Me.RibbonPageGroup1, Me.RibbonPageGroup3, Me.RibbonPageGroup2}) Me.RibbonPage1.Groups.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPageGroup() {Me.RibbonPageGroup1, Me.RibbonPageGroup3, Me.RibbonPageGroup2})
@ -226,6 +235,7 @@ Partial Class frmMonitor
'RibbonPageGroup3 'RibbonPageGroup3
' '
Me.RibbonPageGroup3.Alignment = DevExpress.XtraBars.Ribbon.RibbonPageGroupAlignment.Far Me.RibbonPageGroup3.Alignment = DevExpress.XtraBars.Ribbon.RibbonPageGroupAlignment.Far
Me.RibbonPageGroup3.ItemLinks.Add(Me.BarButtonItem2)
Me.RibbonPageGroup3.ItemLinks.Add(Me.btnResetLayout) Me.RibbonPageGroup3.ItemLinks.Add(Me.btnResetLayout)
Me.RibbonPageGroup3.Name = "RibbonPageGroup3" Me.RibbonPageGroup3.Name = "RibbonPageGroup3"
Me.RibbonPageGroup3.Text = "Layout" Me.RibbonPageGroup3.Text = "Layout"
@ -634,6 +644,10 @@ Partial Class frmMonitor
Me.WorkspaceManager1.TargetControl = Me Me.WorkspaceManager1.TargetControl = Me
Me.WorkspaceManager1.TransitionType = PushTransition1 Me.WorkspaceManager1.TransitionType = PushTransition1
' '
'SplashScreenManager1
'
Me.SplashScreenManager1.ClosingDelay = 500
'
'frmMonitor 'frmMonitor
' '
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
@ -762,4 +776,6 @@ Partial Class frmMonitor
Friend WithEvents Root As DevExpress.XtraLayout.LayoutControlGroup Friend WithEvents Root As DevExpress.XtraLayout.LayoutControlGroup
Friend WithEvents lbParams As DevExpress.XtraLayout.SimpleLabelItem Friend WithEvents lbParams As DevExpress.XtraLayout.SimpleLabelItem
Friend WithEvents EmptySpaceItem1 As DevExpress.XtraLayout.EmptySpaceItem Friend WithEvents EmptySpaceItem1 As DevExpress.XtraLayout.EmptySpaceItem
Friend WithEvents SplashScreenManager1 As DevExpress.XtraSplashScreen.SplashScreenManager
Friend WithEvents BarButtonItem2 As DevExpress.XtraBars.BarButtonItem
End Class End Class

View File

@ -118,7 +118,7 @@
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader> </resheader>
<metadata name="ApplicationMenu1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <metadata name="ApplicationMenu1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>183, 17</value> <value>362, 17</value>
</metadata> </metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="lbResultCount.ImageOptions.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <data name="lbResultCount.ImageOptions.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
@ -146,15 +146,15 @@
</value> </value>
</data> </data>
<metadata name="SvgImageCollection1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <metadata name="SvgImageCollection1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value> <value>196, 17</value>
</metadata> </metadata>
<metadata name="XtraSaveFileDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <metadata name="XtraSaveFileDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>335, 17</value> <value>514, 17</value>
</metadata> </metadata>
<metadata name="AdornerUIManager2.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <metadata name="AdornerUIManager2.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>494, 17</value> <value>673, 17</value>
</metadata> </metadata>
<metadata name="WorkspaceManager1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <metadata name="WorkspaceManager1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>657, 17</value> <value>836, 17</value>
</metadata> </metadata>
</root> </root>

View File

@ -50,34 +50,10 @@ Public Class frmMonitor
Private GridControlResults As GridControl Private GridControlResults As GridControl
Private GridViewResults As GridView Private GridViewResults As GridView
Private Const STATE_SUCCESS As String = "SUCCESS"
Private Const STATE_FAILURE As String = "FAILURE"
Private Const STATE_WARNING As String = "WARNING"
Private Const STATE_WAITING As String = "WAITING"
Private Const STATE_HIGHLIGHT As String = "HIGHLIGHT"
Private MarkedColumns As New List(Of GridColumn) Private MarkedColumns As New List(Of GridColumn)
Private ActiveSearch As Search = Nothing Private ActiveSearch As Search = Nothing
Private LastSearch As Search = Nothing 'Private LastSearch As Search = Nothing
Private LastLoadedSearch As Search = Nothing 'Private LastLoadedSearch As Search = Nothing
Private Enum NodeImage
[Default] = 0
SQL = 1
File = 2
Mail = 3
Success = 4
Failure = 5
Warning = 6
Waiting = 7
User = 8
Highlight = 9
End Enum
Private ReadOnly StateIcons As New Dictionary(Of String, NodeImage) From {
{STATE_SUCCESS, NodeImage.Success},
{STATE_FAILURE, NodeImage.Failure}
}
Private GridBuilder As GridBuilder Private GridBuilder As GridBuilder
Private ControlHelper As Common.ControlHelper Private ControlHelper As Common.ControlHelper
@ -90,13 +66,15 @@ 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 Validator As Validator
Private GridLoader As GridLoader
Private Sub frmStart_Load(sender As Object, e As EventArgs) Handles MyBase.Load Private Sub frmStart_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Try Try
LogConfig = New LogConfig(LogConfig.PathType.AppData, Nothing, Nothing, "Digital Data", "Monitor") LogConfig = New LogConfig(LogConfig.PathType.AppData, Nothing, Nothing, "Digital Data", "Monitor")
Logger = LogConfig.GetLogger() Logger = LogConfig.GetLogger()
ConfigManager = New ConfigManager(Of Config)(LogConfig, Application.UserAppDataPath, Application.UserAppDataPath, Application.StartupPath) ConfigManager = New ConfigManager(Of Config)(LogConfig, Application.UserAppDataPath, Application.CommonAppDataPath, Application.StartupPath)
Patterns = New Patterns2(LogConfig) Patterns = New Patterns2(LogConfig)
FormHelper = New FormHelper(LogConfig, Me) FormHelper = New FormHelper(LogConfig, Me)
ControlHelper = New Common.ControlHelper(LogConfig) ControlHelper = New Common.ControlHelper(LogConfig)
@ -128,6 +106,8 @@ Public Class frmMonitor
SearchLoader = New SearchLoader(LogConfig, ConfigManager.Config, Database) SearchLoader = New SearchLoader(LogConfig, ConfigManager.Config, Database)
ParamLoader = New ParameterLoader(LogConfig, Database, LayoutControl1) ParamLoader = New ParameterLoader(LogConfig, Database, LayoutControl1)
GridBuilder = New GridBuilder() GridBuilder = New GridBuilder()
Validator = New Validator(LogConfig, LayoutControl1, AdornerUIManager2, ControlHelper)
GridLoader = New GridLoader(LogConfig, SvgImageCollection1)
InitGrid() InitGrid()
InitTreeList() InitTreeList()
@ -146,7 +126,6 @@ Public Class frmMonitor
HtmlResultViewers = New List(Of RichEditControl) From {RichEditControl1, RichEditControl2} HtmlResultViewers = New List(Of RichEditControl) From {RichEditControl1, RichEditControl2}
HtmlResultTabs = New List(Of XtraTabPage) From {XtraTabPageHtml1, XtraTabPageHtml2} HtmlResultTabs = New List(Of XtraTabPage) From {XtraTabPageHtml1, XtraTabPageHtml2}
SearchLoader.LoadSearchParameters()
LoadSearches() LoadSearches()
@ -183,12 +162,14 @@ Public Class frmMonitor
Return Database.GetScalarValue(oSQL) Return Database.GetScalarValue(oSQL)
End Function End Function
Private Sub buttonSearch_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles buttonSearch.ItemClick Private Async Sub buttonSearch_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles buttonSearch.ItemClick
LoadData() Await LoadData()
End Sub End Sub
Private Function LoadData() As Boolean Private Async Function LoadData() As Threading.Tasks.Task(Of Boolean)
Try Try
SplashScreenManager1.ShowWaitForm()
TreeListResults.DataSource = Nothing TreeListResults.DataSource = Nothing
GridControlResults.DataSource = Nothing GridControlResults.DataSource = Nothing
@ -197,57 +178,24 @@ Public Class frmMonitor
End If End If
Dim oSearch As Search = cmbSearches.EditValue Dim oSearch As Search = cmbSearches.EditValue
Dim oMissingParams = False
If LastLoadedSearch IsNot Nothing AndAlso oSearch.Id = LastLoadedSearch.Id Then 'If LastLoadedSearch IsNot Nothing AndAlso oSearch.Id = LastLoadedSearch.Id Then
Workspace.SaveWorkspace(oSearch.Id.ToString) ' Workspace.SaveWorkspace(oSearch.Id.ToString)
End If 'End If
MarkedColumns.Clear() MarkedColumns.Clear()
HideAllTabs() HideAllTabs()
With AdornerUIManager2.ValidationHintProperties Dim oMissingParams = Validator.Validate(oSearch)
.State = VisualEffects.ValidationHintState.Invalid
.InvalidState.ShowBorder = True
.InvalidState.ShowBackgroundMode = VisualEffects.ValidationHintBackgroundMode.Target
End With
AdornerUIManager2.Hide()
AdornerUIManager2.Elements.Clear()
Dim oSQL As String = oSearch.SQLCommand
Dim oControls As New List(Of Control)
For Each oItem As Control In LayoutControl1.Controls
Dim oParam = oSearch.Parameters.
Where(Function(param) param.PatternTitle = oItem.Name).
FirstOrDefault()
If oParam Is Nothing Then
Continue For
End If
oControls.Add(oItem)
If oParam.Required And Not ControlHelper.HasValue(oItem) Then
AdornerUIManager2.Elements.Add(New VisualEffects.ValidationHint With {
.TargetElement = oItem,
.Visible = True
})
oMissingParams = True
End If
Next
AdornerUIManager2.Show()
If oMissingParams = True Then If oMissingParams = True Then
Return False Return False
End If End If
oSQL = Patterns.ReplaceControlValues(oSQL, oControls) Dim oControls As List(Of Control) = LayoutControl1.Controls.Cast(Of Control).ToList()
Dim oTable As DataTable = Database.GetDatatable(oSQL) Dim oSQL = Patterns.ReplaceControlValues(oSearch.SQLCommand, oControls)
Dim oTable As DataTable = Await Database.GetDatatableAsync(oSQL)
If oSearch.ReturnType = Constants.ReturnTypeEnum.TreeView Then If oSearch.ReturnType = Constants.ReturnTypeEnum.TreeView Then
GridControlResults.Visible = False GridControlResults.Visible = False
@ -267,7 +215,7 @@ Public Class frmMonitor
End If End If
Next Next
InitTreeListColumns(oMaxLength) GridLoader.InitTreeListColumns(TreeListResults, oMaxLength)
' Show all columns in DisplayColumns List ' Show all columns in DisplayColumns List
For Each oColumn In TreeListResults.Columns For Each oColumn In TreeListResults.Columns
@ -283,7 +231,7 @@ Public Class frmMonitor
ExpandNodes(oNode, Function(n) ExpandNodes(oNode, Function(n)
Dim oObjectValue = n.GetValue(oStateColumn) Dim oObjectValue = n.GetValue(oStateColumn)
Dim oValue As String = NotNull(oObjectValue.ToString, String.Empty) Dim oValue As String = NotNull(oObjectValue.ToString, String.Empty)
Return oValue IsNot Nothing AndAlso (oValue = STATE_WARNING Or oValue = STATE_FAILURE) Return oValue IsNot Nothing AndAlso (oValue = State.STATE_WARNING Or oValue = State.STATE_FAILURE)
End Function) End Function)
Next Next
@ -299,6 +247,12 @@ Public Class frmMonitor
GridViewResults.PopulateColumns() GridViewResults.PopulateColumns()
GridBuilder.SetDateTimeColumns(GridViewResults) GridBuilder.SetDateTimeColumns(GridViewResults)
For Each oColumn As GridColumn In GridViewResults.Columns
If oColumn.ColumnType = GetType(Integer) Then
oColumn.AppearanceCell.TextOptions.HAlignment = HorzAlignment.Center
End If
Next
MarkedColumns = GridViewResults.Columns.AsEnumerable. MarkedColumns = GridViewResults.Columns.AsEnumerable.
Where(Function(column) Where(Function(column)
Dim oCaption = column.FieldName.ToUpper.Trim Dim oCaption = column.FieldName.ToUpper.Trim
@ -315,7 +269,7 @@ Public Class frmMonitor
GridViewResults.FocusInvalidRow() GridViewResults.FocusInvalidRow()
Workspace.LoadWorkspace(oSearch.Id.ToString) Workspace.LoadWorkspace(oSearch.Id.ToString)
LastLoadedSearch = oSearch 'LastLoadedSearch = oSearch
btnExportMain.Enabled = True btnExportMain.Enabled = True
@ -323,11 +277,14 @@ Public Class frmMonitor
Catch ex As Exception Catch ex As Exception
FormHelper.ShowErrorMessage(ex, "LoadData") FormHelper.ShowErrorMessage(ex, "LoadData")
Return False Return False
Finally
SplashScreenManager1.CloseWaitForm()
End Try End Try
End Function End Function
Private Sub LoadSearches() Private Sub LoadSearches()
Try Try
SearchLoader.LoadSearchParameters()
SearchLoader.LoadSearches() SearchLoader.LoadSearches()
cmbSearches.Properties.Items.Clear() cmbSearches.Properties.Items.Clear()
@ -348,79 +305,9 @@ Public Class frmMonitor
Private Sub InitTreeListColumns(pMaxLength As Integer)
Dim oColumn1 = TreeListResults.Columns.Item("COLUMN1")
Dim oColumn2 = TreeListResults.Columns.Item("COLUMN2")
Dim oColumn3 = TreeListResults.Columns.Item("COLUMN3")
Dim oAddedWhenColumn = TreeListResults.Columns.Item("ADDED_WHEN")
Dim oStateColumn = TreeListResults.Columns.Item("STATE")
Dim oIconColumn = TreeListResults.Columns.Item("ICON")
Dim oStateEdit As RepositoryItemImageComboBox = GetStateEdit()
Dim oIconEdit As RepositoryItemImageComboBox = GetIconEdit()
oColumn1.VisibleIndex = 0
oStateColumn.VisibleIndex = 1
oIconColumn.VisibleIndex = 2
Dim oColumnLength = pMaxLength * 5
With oColumn1
.Caption = "Titel"
.MinWidth = oColumnLength
.MaxWidth = oColumnLength
.Width = oColumnLength
.OptionsColumn.AllowSize = False
.OptionsColumn.AllowSort = False
End With
With oColumn2
.Caption = "Wert 1"
End With
With oColumn3
.Caption = "Wert 2"
End With
With oAddedWhenColumn
.Caption = "Datum"
End With
With oStateColumn
.ColumnEdit = oStateEdit
.MaxWidth = 25
.MinWidth = 25
.Width = 25
.Caption = " "
.OptionsColumn.AllowSize = False
.OptionsColumn.AllowSort = False
.ImageOptions.Image = SvgImageCollection1.GetImage(NodeImage.Success)
End With
With oIconColumn
.ColumnEdit = oIconEdit
.MaxWidth = 25
.MinWidth = 25
.Width = 25
.Caption = " "
.OptionsColumn.AllowSize = False
.OptionsColumn.AllowSort = False
.ImageOptions.Image = SvgImageCollection1.GetImage(NodeImage.SQL)
End With
End Sub
Private Function GetIconEdit() As RepositoryItemImageComboBox
Dim oIconEdit As New RepositoryItemImageComboBox With {
.SmallImages = SvgImageCollection1,
.GlyphAlignment = HorzAlignment.Near
}
oIconEdit.Buttons.Clear()
oIconEdit.Items.AddRange(New List(Of ImageComboBoxItem) From {
New ImageComboBoxItem("Email", "MAIL", NodeImage.Mail),
New ImageComboBoxItem("SQL", "SQL", NodeImage.SQL),
New ImageComboBoxItem("File", "FILE", NodeImage.File)
})
Return oIconEdit
End Function
Private Sub cmbSearches_SelectedValueChanged(sender As Object, e As EventArgs) Handles cmbSearches.SelectedValueChanged Private Sub cmbSearches_SelectedValueChanged(sender As Object, e As EventArgs) Handles cmbSearches.SelectedValueChanged
DisposeTreeList() DisposeTreeList()
@ -449,11 +336,11 @@ Public Class frmMonitor
Dim oSearch As Search = CType(cmbSearches.SelectedItem, Search) Dim oSearch As Search = CType(cmbSearches.SelectedItem, Search)
If ActiveSearch IsNot Nothing Then 'If ActiveSearch IsNot Nothing Then
Workspace.SaveWorkspace(ActiveSearch.Id.ToString) ' Workspace.SaveWorkspace(ActiveSearch.Id.ToString)
End If 'End If
LastSearch = ActiveSearch 'LastSearch = ActiveSearch
ActiveSearch = oSearch ActiveSearch = oSearch
AdornerUIManager2.Hide() AdornerUIManager2.Hide()
@ -701,13 +588,13 @@ Public Class frmMonitor
Dim oColor As Color = Nothing Dim oColor As Color = Nothing
Select Case oState.ToString Select Case oState.ToString
Case STATE_SUCCESS Case State.STATE_SUCCESS
oColor = Color.LightGreen oColor = Color.LightGreen
Case STATE_FAILURE Case State.STATE_FAILURE
oColor = Color.LightCoral oColor = Color.LightCoral
Case STATE_WARNING Case State.STATE_WARNING
oColor = Color.Yellow oColor = Color.Yellow
Case STATE_WAITING Case State.STATE_WAITING
oColor = Color.LightSkyBlue oColor = Color.LightSkyBlue
End Select End Select
@ -762,16 +649,15 @@ Public Class frmMonitor
End If End If
End Sub End Sub
Private Sub frmMonitor_KeyUp(sender As Object, e As KeyEventArgs) Handles Me.KeyUp Private Async Sub frmMonitor_KeyUp(sender As Object, e As KeyEventArgs) Handles Me.KeyUp
If e.KeyCode = Keys.F5 Then If e.KeyCode = Keys.F5 Then
Debug.Write("Debug.Write") Debug.Write("Debug.Write")
Console.WriteLine("Console.WriteLine") Console.WriteLine("Console.WriteLine")
Debug.Print("Debug.Print") Debug.Print("Debug.Print")
LoadData() Await LoadData()
End If End If
End Sub End Sub
Private Sub TreeListResults_MouseClick(sender As Object, e As MouseEventArgs) Private Sub TreeListResults_MouseClick(sender As Object, e As MouseEventArgs)
Dim oInfo As TreeListHitInfo = TreeListResults.CalcHitInfo(New Point(e.X, e.Y)) Dim oInfo As TreeListHitInfo = TreeListResults.CalcHitInfo(New Point(e.X, e.Y))
@ -813,7 +699,7 @@ Public Class frmMonitor
End Sub End Sub
Private Sub BarButtonItem4_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles btnReloadSearches.ItemClick Private Sub BarButtonItem4_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles btnReloadSearches.ItemClick
SearchLoader.LoadSearchParameters()
LoadSearches() LoadSearches()
TreeListResults.DataSource = Nothing TreeListResults.DataSource = Nothing
@ -913,17 +799,17 @@ Public Class frmMonitor
SplitContainerFileHTML.Collapsed = True SplitContainerFileHTML.Collapsed = True
End Sub End Sub
Private Sub frmMonitor_Closing(sender As Object, e As CancelEventArgs) Handles Me.Closing 'Private Sub frmMonitor_Closing(sender As Object, e As CancelEventArgs) Handles Me.Closing
If ActiveSearch IsNot Nothing Then ' If ActiveSearch IsNot Nothing Then
Workspace.SaveWorkspace(ActiveSearch.Id.ToString) ' Workspace.SaveWorkspace(ActiveSearch.Id.ToString)
End If ' End If
End Sub 'End Sub
Private Sub btnResetLayout_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles btnResetLayout.ItemClick Private Sub btnResetLayout_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles btnResetLayout.ItemClick
If ActiveSearch IsNot Nothing Then If ActiveSearch IsNot Nothing Then
Workspace.ResetWorkspace(ActiveSearch.Id.ToString) Workspace.ResetWorkspace(ActiveSearch.Id.ToString)
LastLoadedSearch = Nothing 'LastLoadedSearch = Nothing
ActiveSearch = Nothing 'ActiveSearch = Nothing
DisposeTreeList() DisposeTreeList()
InitTreeList() InitTreeList()
@ -931,9 +817,11 @@ Public Class frmMonitor
DisposeGrid() DisposeGrid()
InitGrid() InitGrid()
LoadSearch() 'LoadSearch()
HideAllTabs() HideAllTabs()
LoadData()
lbResultCount.Caption = String.Format(lbResultCount.Tag, 0) lbResultCount.Caption = String.Format(lbResultCount.Tag, 0)
End If End If
End Sub End Sub
@ -946,19 +834,12 @@ Public Class frmMonitor
End Sub End Sub
Private Sub InitGrid() Private Sub InitGrid()
GridControlResults = New GridControl() With { GridControlResults = GridLoader.InitGrid()
.Name = "GridViewResults",
.Visible = False
}
SplitContainerSQL.Panel1.Controls.Add(GridControlResults)
GridControlResults.ForceInitialize()
GridViewResults = DirectCast(GridControlResults.DefaultView, GridView) GridViewResults = DirectCast(GridControlResults.DefaultView, GridView)
AddHandler GridViewResults.FocusedRowChanged, AddressOf GridViewResults_FocusedRowChanged AddHandler GridViewResults.FocusedRowChanged, AddressOf GridViewResults_FocusedRowChanged
GridBuilder.SetDefaults(GridViewResults) SplitContainerSQL.Panel1.Controls.Add(GridControlResults)
GridBuilder.SetClipboardHandler(GridViewResults)
GridBuilder.SetReadOnlyOptions(GridViewResults)
End Sub End Sub
Private Sub DisposeTreeList() Private Sub DisposeTreeList()
@ -967,51 +848,21 @@ Public Class frmMonitor
End Sub End Sub
Private Sub InitTreeList() Private Sub InitTreeList()
TreeListResults = New TreeList() With { TreeListResults = GridLoader.InitTreeList()
.Name = "TreeListResults",
.Visible = False
}
SplitContainerSQL.Panel1.Controls.Add(TreeListResults)
TreeListResults.ForceInitialize()
TreeListResults.KeyFieldName = "GUID"
TreeListResults.ParentFieldName = "PARENT_ID"
AddHandler TreeListResults.FocusedNodeChanged, AddressOf TreeListResults_FocusedNodeChanged AddHandler TreeListResults.FocusedNodeChanged, AddressOf TreeListResults_FocusedNodeChanged
AddHandler TreeListResults.MouseClick, AddressOf TreeListResults_MouseClick AddHandler TreeListResults.MouseClick, AddressOf TreeListResults_MouseClick
AddHandler TreeListResults.CustomDrawNodeCell, AddressOf TreeListResults_CustomDrawNodeCell AddHandler TreeListResults.CustomDrawNodeCell, AddressOf TreeListResults_CustomDrawNodeCell
GridBuilder.SetDefaults(TreeListResults) SplitContainerSQL.Panel1.Controls.Add(TreeListResults)
GridBuilder.SetClipboardHandler(TreeListResults)
GridBuilder.SetReadOnlyOptions(TreeListResults)
End Sub End Sub
'Private DisallowedComponentNames As New List(Of String) From {"LayoutControlItem", "LayoutControlGroup", "LayoutControl"} Private Sub BarButtonItem2_ItemClick_1(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonItem2.ItemClick
If ActiveSearch Is Nothing Then
Exit Sub
End If
'Private Sub WorkspaceManager1_PropertyDeserializing(sender As Object, ea As PropertyCancelEventArgs) Handles WorkspaceManager1.PropertyDeserializing, WorkspaceManager1.PropertySerializing Workspace.SaveWorkspace(ActiveSearch.Id.ToString)
' Dim oName = ea.Component?.GetType.Name End Sub
' If DisallowedComponentNames.Contains(oName) Then
' ea.Cancel = True
' End If
'End Sub
Private Function GetStateEdit() As RepositoryItemImageComboBox
Dim oStateEdit As New RepositoryItemImageComboBox With {
.SmallImages = SvgImageCollection1,
.GlyphAlignment = HorzAlignment.Near
}
oStateEdit.Buttons.Clear()
oStateEdit.Items.AddRange(New List(Of ImageComboBoxItem) From {
New ImageComboBoxItem("Success", "SUCCESS", NodeImage.Success),
New ImageComboBoxItem("Failure", "FAILURE", NodeImage.Failure),
New ImageComboBoxItem("Warning", "WARNING", NodeImage.Warning),
New ImageComboBoxItem("Waiting", "WAITING", NodeImage.Waiting),
New ImageComboBoxItem("Default", "DEFAULT", NodeImage.Default),
New ImageComboBoxItem("User", "USER", NodeImage.User),
New ImageComboBoxItem("Highlight", "HIGHLIGHT", NodeImage.Highlight)
})
Return oStateEdit
End Function
End Class End Class