[fix?:] windows file path for label export?
This commit is contained in:
+10
-3
@@ -781,18 +781,25 @@ public partial class MainWindow : Window
|
|||||||
DefaultExtension = "pdf",
|
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);
|
var filePath = await saveDialog.ShowAsync(this);
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(filePath))
|
if (!string.IsNullOrEmpty(filePath))
|
||||||
{
|
{
|
||||||
|
if (Uri.TryCreate(filePath, UriKind.Absolute, out var uri)
|
||||||
|
&& uri.IsFile)
|
||||||
|
{
|
||||||
|
filePath = uri.LocalPath;
|
||||||
|
}
|
||||||
|
|
||||||
var builder = new PdfBuilder(Settings._instance.pdfExport);
|
var builder = new PdfBuilder(Settings._instance.pdfExport);
|
||||||
|
|
||||||
builder.CreateAddressLabelPdfFromAddressSetWithPlaceholder((
|
builder.CreateAddressLabelPdfFromAddressSetWithPlaceholder(
|
||||||
(KasAddressList)LstCustomerAdressSets.SelectedItem).ID,
|
((KasAddressList)LstCustomerAdressSets.SelectedItem).ID,
|
||||||
"Company Logo/Info",
|
"Company Logo/Info",
|
||||||
filePath
|
filePath
|
||||||
);
|
);
|
||||||
//return true;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user