Clean up
This commit is contained in:
parent
9e77be80e7
commit
ad289ae666
@ -44,10 +44,10 @@ Public Class SearchLoader
|
|||||||
|
|
||||||
For Each oRow As DataRow In oTable.Rows
|
For Each oRow As DataRow In oTable.Rows
|
||||||
oAttributes.Add(New SearchAttribute With {
|
oAttributes.Add(New SearchAttribute With {
|
||||||
.Id = oRow.Item("GUID"),
|
.Id = oRow.ItemEx("GUID", 0),
|
||||||
.Caption = oRow.Item("CAPTION"),
|
.Caption = oRow.ItemEx("CAPTION", String.Empty),
|
||||||
.Description = oRow.Item("DESCRIPTION"),
|
.Description = oRow.ItemEx("DESCRIPTION", String.Empty),
|
||||||
.DataType = oRow.Item("DATA_TYPE")
|
.DataType = oRow.ItemEx("DATA_TYPE", "VARCHAR")
|
||||||
})
|
})
|
||||||
Next
|
Next
|
||||||
|
|
||||||
|
|||||||
7
GUIs.Monitor/frmMonitor.Designer.vb
generated
7
GUIs.Monitor/frmMonitor.Designer.vb
generated
@ -1,9 +1,6 @@
|
|||||||
Imports DigitalData.GUIs.Common.Base
|
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()>
|
||||||
|
|
||||||
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()>
|
|
||||||
Partial Class frmMonitor
|
Partial Class frmMonitor
|
||||||
'Inherits DevExpress.XtraBars.Ribbon.RibbonForm
|
Inherits DevExpress.XtraBars.Ribbon.RibbonForm
|
||||||
Inherits BaseRibbonForm
|
|
||||||
|
|
||||||
'Das Formular überschreibt den Löschvorgang, um die Komponentenliste zu bereinigen.
|
'Das Formular überschreibt den Löschvorgang, um die Komponentenliste zu bereinigen.
|
||||||
<System.Diagnostics.DebuggerNonUserCode()> _
|
<System.Diagnostics.DebuggerNonUserCode()> _
|
||||||
|
|||||||
@ -22,8 +22,10 @@ Imports DevExpress.XtraTreeList
|
|||||||
|
|
||||||
Public Class frmMonitor
|
Public Class frmMonitor
|
||||||
Public Property LogConfig As LogConfig
|
Public Property LogConfig As LogConfig
|
||||||
|
Public Property Logger As Logger
|
||||||
Public Property ConfigManager As ConfigManager(Of Config)
|
Public Property ConfigManager As ConfigManager(Of Config)
|
||||||
Public Property Database As MSSQLServer
|
Public Property Database As MSSQLServer
|
||||||
|
Public Property FormHelper As FormHelper
|
||||||
|
|
||||||
Private ReadOnly SQLColumns As New List(Of String) From {"SELECT1", "SELECT2", "SELECT3", "SELECT4"}
|
Private ReadOnly SQLColumns As New List(Of String) From {"SELECT1", "SELECT2", "SELECT3", "SELECT4"}
|
||||||
Private ReadOnly DocViewColumns As New List(Of String) From {"DOCVIEW1", "DOCVIEW2"}
|
Private ReadOnly DocViewColumns As New List(Of String) From {"DOCVIEW1", "DOCVIEW2"}
|
||||||
@ -78,9 +80,9 @@ Public Class frmMonitor
|
|||||||
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()
|
||||||
ConfigManager = New ConfigManager(Of Config)(LogConfig, Application.UserAppDataPath, Application.UserAppDataPath, Application.StartupPath)
|
ConfigManager = New ConfigManager(Of Config)(LogConfig, Application.UserAppDataPath, Application.UserAppDataPath, Application.StartupPath)
|
||||||
|
FormHelper = New FormHelper(LogConfig, Me)
|
||||||
InitializeBaseForm(LogConfig)
|
|
||||||
|
|
||||||
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)
|
||||||
@ -89,7 +91,7 @@ Public Class frmMonitor
|
|||||||
ConfigManager.Save()
|
ConfigManager.Save()
|
||||||
Application.Restart()
|
Application.Restart()
|
||||||
Else
|
Else
|
||||||
ShowErrorMessage("No Database configured. Application will close!")
|
FormHelper.ShowErrorMessage(New ApplicationException("No Database configured. Application will close!"), "Form Load")
|
||||||
Application.Exit()
|
Application.Exit()
|
||||||
|
|
||||||
End If
|
End If
|
||||||
@ -145,7 +147,7 @@ Public Class frmMonitor
|
|||||||
SplitContainerControl3.Collapsed = True
|
SplitContainerControl3.Collapsed = True
|
||||||
SplitContainerControl2.Collapsed = True
|
SplitContainerControl2.Collapsed = True
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
ShowErrorMessage(ex)
|
FormHelper.ShowErrorMessage(ex, "frmStart_Load")
|
||||||
End Try
|
End Try
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@ -193,14 +195,14 @@ Public Class frmMonitor
|
|||||||
For Each oNode As TreeListNode In TreeListResults.Nodes
|
For Each oNode As TreeListNode In TreeListResults.Nodes
|
||||||
ExpandNodes(oNode, Function(n)
|
ExpandNodes(oNode, Function(n)
|
||||||
Dim oObjectValue = n.GetValue(oStateColumn)
|
Dim oObjectValue = n.GetValue(oStateColumn)
|
||||||
Dim oValue As String = NotNull(oObjectValue, 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_WARNING Or oValue = STATE_FAILURE)
|
||||||
End Function)
|
End Function)
|
||||||
Next
|
Next
|
||||||
|
|
||||||
Return True
|
Return True
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
ShowErrorMessage(ex)
|
FormHelper.ShowErrorMessage(ex, "LoadData")
|
||||||
Return False
|
Return False
|
||||||
End Try
|
End Try
|
||||||
End Function
|
End Function
|
||||||
@ -212,7 +214,7 @@ Public Class frmMonitor
|
|||||||
cmbSearches.Properties.Items.Clear()
|
cmbSearches.Properties.Items.Clear()
|
||||||
cmbSearches.Properties.Items.AddRange(SearchLoader.Searches)
|
cmbSearches.Properties.Items.AddRange(SearchLoader.Searches)
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
ShowErrorMessage(ex)
|
FormHelper.ShowErrorMessage(ex, "LoadSearches")
|
||||||
End Try
|
End Try
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@ -411,7 +413,7 @@ Public Class frmMonitor
|
|||||||
End Try
|
End Try
|
||||||
Next
|
Next
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
ShowErrorMessage(ex)
|
FormHelper.ShowErrorMessage(ex, "TreeListResults_FocusedNodeChanged")
|
||||||
End Try
|
End Try
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user