[fix?:] trying

This commit is contained in:
2026-05-15 18:56:55 +02:00
parent 1922b30ada
commit d337f94851
+22 -3
View File
@@ -773,25 +773,36 @@ public partial class MainWindow : Window
}
private async void BtnStartGenerateLabels_OnClick(object? sender, RoutedEventArgs e)
{
try
{
SavePdfExportOptions();
var saveDialog = new SaveFileDialog
{
DefaultExtension = "pdf",
Filters = { new FileDialogFilter { Name = "PDF-Dateien", Extensions = { "pdf" } } }
Filters =
{
new FileDialogFilter
{
Name = "PDF-Dateien",
Extensions = { "pdf" }
}
}
};
// hier nach winpafd prüfen
var filePath = await saveDialog.ShowAsync(this);
Console.WriteLine($"RAW: {filePath}");
if (!string.IsNullOrWhiteSpace(filePath))
{
if (filePath.StartsWith("file://"))
{
filePath = new Uri(filePath).LocalPath;
}
Console.WriteLine(filePath);
Console.WriteLine($"PATH: {filePath}");
var builder = new PdfBuilder(Settings._instance.pdfExport);
@@ -800,6 +811,14 @@ public partial class MainWindow : Window
"Company Logo/Info",
filePath
);
Console.WriteLine("PDF OK");
}
}
catch (Exception ex)
{
Console.WriteLine(ex);
File.WriteAllText("crash.txt", ex.ToString());
}
}