Better colors for file grid, small tweaks

This commit is contained in:
Jonathan Jenne 2022-04-20 11:46:14 +02:00
parent 1bef72d65c
commit f87b1018de
3 changed files with 30 additions and 10 deletions

View File

@ -19,7 +19,6 @@ Namespace Documents
''' </summary>
Public Property Rows As New List(Of DocumentRow)
Public Property Selected As Boolean = False
Public Property Imported As Boolean = False
Public ReadOnly Property HasErrors As Boolean

View File

@ -701,6 +701,8 @@ Namespace Winline
Where(Function(item) item.DestinationName = "MANDATOR" And item.DestinationValue = oMandator.Id And item.SourceName = "ARTICLE").
ToList()
Logger.Debug("Processing [{0}] Mappings for Articlenumber [{1}]", oMappingConfigItems.Count, oArticleNumber)
' If not match was found, continune to next mandator.
' For a catch all mandator, a regex like ".+" is needed.
For Each oItem In oMappingConfigItems

View File

@ -136,17 +136,36 @@ Public Class frmImportMain
#Region "Grid Events"
Private Sub GridViewFiles_CustomDrawCell(sender As Object, e As Views.Base.RowCellCustomDrawEventArgs) Handles GridViewFiles.CustomDrawCell
Dim oDocument As Document = GridViewFiles.GetRow(e.RowHandle)
Try
Dim oDocument As Document = GridViewFiles.GetRow(e.RowHandle)
If oDocument.HasErrors Then
e.Appearance.Options.UseBackColor = True
e.Appearance.BackColor = Color.LightCoral
End If
If oDocument.Equals(CurrentDocument) Then
e.Appearance.Options.UseBackColor = True
e.Appearance.BackColor = Color.LightYellow
End If
If oDocument.Imported Then
e.Appearance.Options.UseBackColor = True
e.Appearance.BackColor = Color.LightGreen
End If
If oDocument.HasErrors Then
e.Appearance.Options.UseBackColor = True
e.Appearance.BackColor = Color.LightCoral
End If
If oDocument.HasErrors And oDocument.Equals(CurrentDocument) Then
e.Appearance.Options.UseBackColor = True
e.Appearance.BackColor = Color.Coral
End If
If oDocument.Imported Then
e.Appearance.Options.UseBackColor = True
e.Appearance.BackColor = Color.LightGreen
End If
If oDocument.Imported And oDocument.Equals(CurrentDocument) Then
e.Appearance.Options.UseBackColor = True
e.Appearance.BackColor = Color.Green
End If
Catch ex As Exception
Logger.Error(ex)
End Try
End Sub
Private Sub GridView_CustomDrawCell(sender As Object, e As Views.Base.RowCellCustomDrawEventArgs)