CI / build-and-test (push) Canceled after 0s
Platzhalterkatalog und Tabellen-Zeichner liegen jetzt in LehrerApp.Templating, damit Designer und Hauptapp dieselbe Tabelle zeichnen. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
22 lines
992 B
C#
22 lines
992 B
C#
using LehrerApp.Core.Services;
|
|
using LehrerApp.Templating;
|
|
|
|
namespace LehrerApp.Desktop.Services;
|
|
|
|
/// <summary>Brücke von den Klausurdaten zur Punktetabelle des Deckblatts. Gezeichnet wird in
|
|
/// <see cref="ExamPointsTableDrawing"/> (Vorlagenbibliothek), damit der Vorlagen-Designer dieselbe
|
|
/// Tabelle in der Vorschau zeigt.</summary>
|
|
public static class ExamPointsTableDrawingBuilder
|
|
{
|
|
public const string PlaceholderName = ExamPointsTableDrawing.PlaceholderName;
|
|
|
|
public static DrawingValue Build(IReadOnlyList<ExamCoverTaskColumn> columns, float contentWidth = 170,
|
|
float millimeterScale = 1) =>
|
|
ExamPointsTableDrawing.Build(
|
|
columns.Select(c => new ExamPointsTableColumn(c.Number, c.MaxPoints, c.IsBonus, c.AchievedPoints)).ToList(),
|
|
contentWidth, millimeterScale);
|
|
|
|
public static int ColumnsPerBlock(float contentWidth, float millimeterScale = 1) =>
|
|
ExamPointsTableDrawing.ColumnsPerBlock(contentWidth, millimeterScale);
|
|
}
|