From e0b499dd3c57977d34d0fda0d2191af8359255f0 Mon Sep 17 00:00:00 2001 From: Michael Babienco Date: Mon, 16 Feb 2026 18:16:21 +0900 Subject: [PATCH] Add WarningView --- ViewModels/WarningViewModel.cs | 25 +++++++++++++++++++++++++ Views/WarningView.axaml | 25 +++++++++++++++++++++++++ Views/WarningView.axaml.cs | 15 +++++++++++++++ 3 files changed, 65 insertions(+) create mode 100644 ViewModels/WarningViewModel.cs create mode 100644 Views/WarningView.axaml create mode 100644 Views/WarningView.axaml.cs diff --git a/ViewModels/WarningViewModel.cs b/ViewModels/WarningViewModel.cs new file mode 100644 index 0000000..087b04a --- /dev/null +++ b/ViewModels/WarningViewModel.cs @@ -0,0 +1,25 @@ +#nullable enable + +using DialogHostAvalonia; + +namespace ReceiptPDFBuilder.ViewModels; + +class WarningViewModel +{ + private string _error; + + public WarningViewModel(string error) + { + _error = error; + } + + public string Error + { + get => _error; + } + + public void Close() + { + DialogHost.Close("DialogHost", null); + } +} \ No newline at end of file diff --git a/Views/WarningView.axaml b/Views/WarningView.axaml new file mode 100644 index 0000000..cf0a3ca --- /dev/null +++ b/Views/WarningView.axaml @@ -0,0 +1,25 @@ + + + +