From 3f14c3137a2d7b80d84146ed30a79466d6ad024e Mon Sep 17 00:00:00 2001 From: Michael Babienco Date: Mon, 16 Feb 2026 18:13:21 +0900 Subject: [PATCH] Start on PDF report --- Helpers/SourceGenerationContext.cs | 9 +++++++ Models/PDFReport.cs | 42 ++++++++++++++++++++++++++++++ 2 files changed, 51 insertions(+) create mode 100644 Helpers/SourceGenerationContext.cs create mode 100644 Models/PDFReport.cs diff --git a/Helpers/SourceGenerationContext.cs b/Helpers/SourceGenerationContext.cs new file mode 100644 index 0000000..651ff6a --- /dev/null +++ b/Helpers/SourceGenerationContext.cs @@ -0,0 +1,9 @@ +using System.Text.Json.Serialization; +using ReceiptPDFBuilder.Models; + +namespace ReceiptPDFBuilder.Helpers; + +[JsonSerializable(typeof(Settings))] +[JsonSerializable(typeof(ReportFile))] +[JsonSerializable(typeof(PDFReport))] +internal partial class SourceGenerationContext : JsonSerializerContext { } \ No newline at end of file diff --git a/Models/PDFReport.cs b/Models/PDFReport.cs new file mode 100644 index 0000000..b0614e1 --- /dev/null +++ b/Models/PDFReport.cs @@ -0,0 +1,42 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Threading.Tasks; +using ReceiptPDFBuilder.Helpers; + +namespace ReceiptPDFBuilder.Models; + +class PDFReport : ChangeNotifier +{ + private string _baseFolder; + private string _name; + private List _files; + + public PDFReport() + { + _baseFolder = ""; + _name = ""; + _files = []; + } + + public string BaseFolder + { + get => _baseFolder; + set { _baseFolder = value; NotifyPropertyChanged(); } + } + + public string Name + { + get => _name; + set { _name = value; NotifyPropertyChanged(); } + } + + public List Files + { + get => _files; + set { _files = value; NotifyPropertyChanged(); } + } +} \ No newline at end of file