[#15] MailWindow: Add feature to print
This commit is contained in:
@ -543,7 +543,7 @@ namespace Elwig.Windows {
|
||||
GenerateButton.IsEnabled = true;
|
||||
Mouse.OverrideCursor = null;
|
||||
PreviewButton.IsEnabled = true;
|
||||
//PrintButton.IsEnabled = true;
|
||||
PrintButton.IsEnabled = true;
|
||||
//EmailButton.IsEnabled = true;
|
||||
}
|
||||
|
||||
@ -571,6 +571,24 @@ namespace Elwig.Windows {
|
||||
}
|
||||
}
|
||||
|
||||
private async void PrintButton_Click(object sender, RoutedEventArgs evt) {
|
||||
if (PrintDocument == null) return;
|
||||
var res = MessageBox.Show($"Sollen {PrintDocument.Pages} Blätter ({PrintDocument.TotalPages} Seiten) gedruckt werden?\n" +
|
||||
$"Sind die \"Duplex-Einstellungen\" des Standarddruckers entsprechend eingestellt (doppelseitig bzw. einseitig)?",
|
||||
"Rundschreiben drucken", MessageBoxButton.YesNo, MessageBoxImage.Question, MessageBoxResult.No);
|
||||
if (res == MessageBoxResult.Yes) {
|
||||
if (App.Config.Debug) {
|
||||
PrintDocument.Show();
|
||||
} else {
|
||||
await PrintDocument.Print();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void EmailButton_Click(object sender, RoutedEventArgs evt) {
|
||||
// TODO
|
||||
}
|
||||
|
||||
public void AddDeliveryConfirmation() {
|
||||
AvaiableDocumentsList.SelectedIndex = 1;
|
||||
if (AvaiableDocumentsList.SelectedItem is not string s || SelectedDocs.Any(d => d.Type == DocType.DeliveryConfirmation))
|
||||
|
Reference in New Issue
Block a user