TableCell class was added

This commit is contained in:
Evgeny Redikultsev
2024-01-27 21:19:06 +05:00
parent a9ffd8b903
commit a680e67ab3
13 changed files with 144 additions and 51 deletions

View File

@@ -4,6 +4,7 @@ using StructureHelper.Windows.ViewModels.Errors;
using StructureHelper.Windows.ViewModels.Materials;
using StructureHelperCommon.Infrastructures.Exceptions;
using StructureHelperCommon.Models.Loggers;
using StructureHelperCommon.Models.Tables;
using System;
using System.Collections.Generic;
using System.Linq;
@@ -136,9 +137,20 @@ namespace StructureHelper.Windows.CalculationWindows.ProgressViews
}
else
{
if (cell is StringLoggerEntry stringEntry)
if (cell.Value is StringLoggerEntry stringEntry)
{
tableCell = new TableCell(GetParagraphByStringEntry(stringEntry));
tableCell.ColumnSpan = cell.ColumnSpan;
if (cell.Role == CellRole.Regular)
{
tableCell.TextAlignment = TextAlignment.Left;
tableCell.Background = Brushes.LightYellow;
}
else if (cell.Role == CellRole.Header)
{
tableCell.TextAlignment = TextAlignment.Center;
tableCell.Background = Brushes.AliceBlue;
}
}
else
{