[chore:] selectable pdf file path for label creation
This commit is contained in:
@@ -556,15 +556,26 @@ public partial class MainWindow : Window
|
||||
StartCombine(list, Convert.ToInt32(LstCustomers.SelectedItem.ToString().Split(" - ")[0]), "symdiff");
|
||||
}
|
||||
|
||||
private void BtnGenerateLabels_OnClick(object? sender, RoutedEventArgs e)
|
||||
private async void BtnGenerateLabels_OnClick(object? sender, RoutedEventArgs e)
|
||||
{
|
||||
var saveDialog = new SaveFileDialog
|
||||
{
|
||||
DefaultExtension = "pdf",
|
||||
Filters = { new FileDialogFilter { Name = "PDF-Dateien", Extensions = { "pdf" } } }
|
||||
};
|
||||
var filePath = await saveDialog.ShowAsync(this);
|
||||
|
||||
if (!string.IsNullOrEmpty(filePath))
|
||||
{
|
||||
var builder = new PdfBuilder();
|
||||
|
||||
builder.CreateAddressLabelPdfFromAddressSetWithPlaceholder(
|
||||
Convert.ToInt32(LstCustomerAdressSets.SelectedItems[0].ToString().Split(" - ")[0]),
|
||||
"Company Logo/Info",
|
||||
"output.pdf"
|
||||
filePath
|
||||
);
|
||||
//return true;
|
||||
}
|
||||
}
|
||||
|
||||
private void TbSettingsCustomerSenderAddress_OnTextChanged(object? sender, TextChangedEventArgs e)
|
||||
|
||||
Reference in New Issue
Block a user