Printing mails. (#471)

* Implemented printing functionality.

* Implemented icon for printing.

* Remove debug code.
This commit is contained in:
Burak Kaan Köse
2024-11-09 19:18:06 +01:00
committed by GitHub
parent 5245feb739
commit b49e1b3a97
18 changed files with 422 additions and 38 deletions

View File

@@ -0,0 +1,10 @@
namespace Wino.Core.Domain.Enums
{
public enum PrintingResult
{
Abandoned,
Canceled,
Failed,
Submitted
}
}

View File

@@ -17,5 +17,11 @@
/// Publisher shared folder path.
/// </summary>
string PublisherSharedFolderPath { get; set; }
/// <summary>
/// Temp folder path of the application.
/// Files here are short-lived and can be deleted by system.
/// </summary>
string ApplicationTempFolderPath { get; set; }
}
}

View File

@@ -0,0 +1,10 @@
using System.Threading.Tasks;
using Wino.Core.Domain.Enums;
namespace Wino.Core.Domain.Interfaces
{
public interface IPrintService
{
Task<PrintingResult> PrintPdfFileAsync(string pdfFilePath, string printTitle);
}
}

View File

@@ -0,0 +1,16 @@
using System;
namespace Wino.Core.Domain.Models.Printing
{
public class PrintInformation
{
public PrintInformation(string pDFFilePath, string pDFTitle)
{
PDFFilePath = pDFFilePath ?? throw new ArgumentNullException(nameof(pDFFilePath));
PDFTitle = pDFTitle ?? throw new ArgumentNullException(nameof(pDFTitle));
}
public string PDFFilePath { get; }
public string PDFTitle { get; }
}
}

View File

@@ -100,6 +100,10 @@
"DialogMessage_ComposerValidationFailedTitle": "Validation Failed",
"DialogMessage_CreateLinkedAccountMessage": "Give this new link a name. Accounts will be merged under this name.",
"DialogMessage_CreateLinkedAccountTitle": "Account Link Name",
"DialogMessage_PrintingFailedMessage": "Failed to print this mail. Result: {0}",
"DialogMessage_PrintingFailedTitle": "Failed",
"DialogMessage_PrintingSuccessTitle": "Success",
"DialogMessage_PrintingSuccessMessage": "Mail is sent to printer.",
"DialogMessage_DeleteAccountConfirmationMessage": "Delete {0}?",
"DialogMessage_DeleteAccountConfirmationTitle": "All data associated with this account will be deleted from disk permanently.",
"DialogMessage_DiscardDraftConfirmationMessage": "This draft will be discarded. Do you want to continue?",