Profile_group_color wird aktualisiert - frmMain

This commit is contained in:
OlgunR 2025-09-04 14:37:51 +02:00
parent 468f6e8ff0
commit 544f710083

View File

@ -2242,50 +2242,84 @@ Public Class frmMain
Item_Scope("DOUBLECLICK") Item_Scope("DOUBLECLICK")
End Sub End Sub
'Private Sub GridViewWorkflows_CustomDrawGroupRow(sender As Object, e As Views.Base.RowObjectCustomDrawEventArgs) Handles GridViewWorkflows.CustomDrawGroupRow
' Try
' ' Added
' If FormOpenClose = True And GridIsLoaded = False Then
' Exit Sub
' End If
' Dim info As GridGroupRowInfo = TryCast(e.Info, GridGroupRowInfo)
' Dim view As GridView = sender
' If info.Column.FieldName = "GROUP_TEXT" Then
' info.GroupText = info.GroupValueText
' Dim oColorString As String = "LightGray"
' Dim oFontColorString As String = "Black"
' Dim oFoundConfig As Boolean = False
' Dim oGROUP_TEXT_COL As String
' If USER_LANGUAGE = "de-DE" Then
' oGROUP_TEXT_COL = "GROUP_TEXT"
' Else
' oGROUP_TEXT_COL = "GROUP_TEXT_LANG"
' End If
' For Each oProfileRow As DataRow In CURR_DT_VWPM_PROFILE_ACTIVE.Rows
' If oProfileRow.Item(oGROUP_TEXT_COL) = info.GroupValueText Then
' oFoundConfig = True
' oColorString = oProfileRow.Item("GROUP_COLOR")
' oFontColorString = oProfileRow.Item("GROUP_FONT_COLOR")
' ' Added
' Exit For
' End If
' Next
' If oFoundConfig = False Then
' LOGGER.Info($"CustomDrawGroupRow: Could not find a ColorConfig for ProfileGroupValueText [{info.GroupValueText}]...")
' ' Added
' Exit Sub
' End If
' Dim oColor As Color = ParseColorString(oColorString, Color.LightGray, "Background Color")
' Dim oFontColor As Color = ParseColorString(oFontColorString, Color.Black, "Font Color")
' info.Appearance.BackColor = oColor
' info.Appearance.ForeColor = oFontColor
' End If
' Catch ex As Exception
' LOGGER.Error(ex)
' End Try
'End Sub
Private Sub GridViewWorkflows_CustomDrawGroupRow(sender As Object, e As Views.Base.RowObjectCustomDrawEventArgs) Handles GridViewWorkflows.CustomDrawGroupRow Private Sub GridViewWorkflows_CustomDrawGroupRow(sender As Object, e As Views.Base.RowObjectCustomDrawEventArgs) Handles GridViewWorkflows.CustomDrawGroupRow
Try Try
' Added
If FormOpenClose = True And GridIsLoaded = False Then If FormOpenClose = True And GridIsLoaded = False Then
Exit Sub Exit Sub
End If End If
Dim info As GridGroupRowInfo = TryCast(e.Info, GridGroupRowInfo) Dim oInfo As GridGroupRowInfo = TryCast(e.Info, GridGroupRowInfo)
Dim view As GridView = sender If oInfo Is Nothing OrElse oInfo.Column Is Nothing Then
Exit Sub
End If
If info.Column.FieldName = "GROUP_TEXT" Then Dim oView As GridView = sender
info.GroupText = info.GroupValueText
If oInfo.Column.FieldName = "GROUP_TEXT" Then
oInfo.GroupText = oInfo.GroupValueText
Dim oColorString As String = "LightGray" Dim oColorString As String = "LightGray"
Dim oFontColorString As String = "Black" Dim oFontColorString As String = "Black"
Dim oFoundConfig As Boolean = False Dim oChildRowHandle As Integer = oView.GetChildRowHandle(oInfo.RowHandle, 0)
Dim oGROUP_TEXT_COL As String
If USER_LANGUAGE = "de-DE" Then
oGROUP_TEXT_COL = "GROUP_TEXT"
Else
oGROUP_TEXT_COL = "GROUP_TEXT_LANG"
End If
oColorString = oView.GetRowCellValue(oChildRowHandle, "GROUP_COLOR")
For Each oProfileRow As DataRow In CURR_DT_VWPM_PROFILE_ACTIVE.Rows
If oProfileRow.Item(oGROUP_TEXT_COL) = info.GroupValueText Then
oFoundConfig = True
oColorString = oProfileRow.Item("GROUP_COLOR")
oFontColorString = oProfileRow.Item("GROUP_FONT_COLOR")
' Added
Exit For
End If
Next
If oFoundConfig = False Then
LOGGER.Info($"CustomDrawGroupRow: Could not find a ColorConfig for ProfileGroupValueText [{info.GroupValueText}]...")
' Added
Exit Sub
End If
Dim oColor As Color = ParseColorString(oColorString, Color.LightGray, "Background Color") Dim oColor As Color = ParseColorString(oColorString, Color.LightGray, "Background Color")
Dim oFontColor As Color = ParseColorString(oFontColorString, Color.Black, "Font Color") Dim oFontColor As Color = ParseColorString(oFontColorString, Color.Black, "Font Color")
info.Appearance.BackColor = oColor oInfo.Appearance.BackColor = oColor
info.Appearance.ForeColor = oFontColor oInfo.Appearance.ForeColor = oFontColor
End If End If
Catch ex As Exception Catch ex As Exception
LOGGER.Error(ex) LOGGER.Error(ex)
@ -3262,7 +3296,7 @@ FROM VWPM_PROFILE_ACTIVE T WHERE T.GUID IN (SELECT PROFILE_ID FROM [dbo].[FNPM_G
LOGGER.Debug($"oTargetPath with NowParams: {oTargetPath}") LOGGER.Debug($"oTargetPath with NowParams: {oTargetPath}")
Dim oResult = WINDREAM_MOD.NewFileStream(oSourcePath, oTargetPath, oWMObjecttype, True) Dim oResult = WINDREAM_MOD.NewFileStream(oSourcePath, oTargetPath, oWMObjecttype)
If oResult = True Then If oResult = True Then
WM_AHWF_docPath = oTargetPath WM_AHWF_docPath = oTargetPath
Dim oDocID = WINDREAM_MOD.NewDocumentID Dim oDocID = WINDREAM_MOD.NewDocumentID