Files
LehrerApp/LehrerApp.Desktop/Services/ExamPointsTableDrawingBuilder.cs
adminandClaude Opus 5.5 98c5f9eba0
CI / build-and-test (push) Canceled after 0s
TemplateDesigner: Klausur-Deckblatt einrichten und Punktetabelle in der Vorschau
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>
2026-10-07 10:47:12 +02:00

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);
}