Merge mit Branch 2.5.4.0

This commit is contained in:
Developer01
2025-08-15 08:29:46 +02:00
52 changed files with 606 additions and 206 deletions

View File

@@ -64,13 +64,7 @@ Public Class frmMonitor
LOGGER.Debug($"Found {oDT2.Rows.Count} rows for GridView2")
GridView2.Columns.Clear()
GridControl2.DataSource = oDT2
Try
GridView2.Columns("Wann").DisplayFormat.FormatType = FormatType.DateTime
GridView2.Columns("Wann").DisplayFormat.FormatString = "dd.MM.yyyy HH:MM:ss"
Catch ex As Exception
GridView2.Columns("When").DisplayFormat.FormatType = FormatType.DateTime
GridView2.Columns("When").DisplayFormat.FormatString = "dd.MM.yyyy HH:MM:ss"
End Try
Format_Datetime_Columns(GridView2, "Grid 2")
End If
If DT_MONITOR_KONFIG.Rows.Count > 2 Then
@@ -86,6 +80,7 @@ Public Class frmMonitor
LOGGER.Debug($"Found {oDT3.Rows.Count} rows for GridView3")
GridView3.Columns.Clear()
GridControl3.DataSource = oDT3
Format_Datetime_Columns(GridView3, "Grid 3")
End If
If DT_MONITOR_KONFIG.Rows.Count = 4 Then
LOGGER.Debug($"DT_MONITOR_KONFIG.Rows.Count = 4")
@@ -100,13 +95,14 @@ Public Class frmMonitor
LOGGER.Debug($"Found {oDT4.Rows.Count} rows for GridView4")
GridView4.Columns.Clear()
GridControl4.DataSource = oDT4
Try
GridView4.Columns("Geändert wann").DisplayFormat.FormatType = FormatType.DateTime
GridView4.Columns("Geändert wann").DisplayFormat.FormatString = "dd.MM.yyyy HH:MM:ss"
Catch ex As Exception
GridView4.Columns("Changed when").DisplayFormat.FormatType = FormatType.DateTime
GridView4.Columns("Changed when").DisplayFormat.FormatString = "dd.MM.yyyy HH:MM:ss"
End Try
Format_Datetime_Columns(GridView4, "Grid 4")
'Try
' GridView4.Columns("Geändert wann").DisplayFormat.FormatType = FormatType.DateTime
' GridView4.Columns("Geändert wann").DisplayFormat.FormatString = "dd.MM.yyyy HH:MM:ss"
'Catch ex As Exception
' GridView4.Columns("Changed when").DisplayFormat.FormatType = FormatType.DateTime
' GridView4.Columns("Changed when").DisplayFormat.FormatString = "dd.MM.yyyy HH:MM:ss"
'End Try
End If
End If
End If
@@ -125,6 +121,49 @@ Public Class frmMonitor
End Try
End Sub
Sub Format_Datetime_Columns(pGridView As GridView, pWhichGridView As String)
Dim oColExists As Boolean = False
Try
If MON_ADDED_COLUMN <> "None" Then
MON_ADDED_COLUMN = MON_ADDED_COLUMN.Replace("[", "")
MON_ADDED_COLUMN = MON_ADDED_COLUMN.Replace("]", "")
For Each ocol As Columns.GridColumn In pGridView.Columns
If ocol.ToString = MON_ADDED_COLUMN Then
oColExists = True
Exit For
End If
Next
If oColExists Then
pGridView.Columns(MON_ADDED_COLUMN).DisplayFormat.FormatType = FormatType.DateTime
pGridView.Columns(MON_ADDED_COLUMN).DisplayFormat.FormatString = "dd.MM.yyyy HH:MM:ss"
End If
End If
Catch ex As Exception
LOGGER.Warn($"Error formatting column [{MON_ADDED_COLUMN}] {ex.Message} - Check wether it exists in columns of GridView [{pWhichGridView}]!")
End Try
Try
If MON_EDITED_COLUMN <> "None" Then
oColExists = False
For Each ocol As Columns.GridColumn In pGridView.Columns
If ocol.ToString = MON_EDITED_COLUMN Then
oColExists = True
Exit For
End If
Next
If oColExists Then
pGridView.Columns(MON_EDITED_COLUMN).DisplayFormat.FormatType = FormatType.DateTime
pGridView.Columns(MON_EDITED_COLUMN).DisplayFormat.FormatString = "dd.MM.yyyy HH:MM:ss"
End If
End If
Catch ex As Exception
LOGGER.Warn($"Error formatting column [{MON_EDITED_COLUMN}] {ex.Message} - Check wether it exists in columns of GridView [{pWhichGridView}]!")
End Try
End Sub
Sub Load_Doc(oDocPath As String)
Try
If SplitContainerControlMain.Collapsed = False And oDocPath <> String.Empty Then
@@ -215,6 +254,7 @@ Public Class frmMonitor
GRID1_TITLE = DT_MONITOR_KONFIG.Rows(0).Item("GRID_TITLE")
GridView1.ViewCaption = GRID1_TITLE
Format_Datetime_Columns(GridView1, "Grid 1")
Try
'GridView1.Columns.Item("FULL_FILE_PATH").Visible = False
Catch ex As Exception