Printing mails. (#471)
* Implemented printing functionality. * Implemented icon for printing. * Remove debug code.
This commit is contained in:
10
Wino.Core.Domain/Enums/PrintingResult.cs
Normal file
10
Wino.Core.Domain/Enums/PrintingResult.cs
Normal file
@@ -0,0 +1,10 @@
|
||||
namespace Wino.Core.Domain.Enums
|
||||
{
|
||||
public enum PrintingResult
|
||||
{
|
||||
Abandoned,
|
||||
Canceled,
|
||||
Failed,
|
||||
Submitted
|
||||
}
|
||||
}
|
||||
@@ -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; }
|
||||
}
|
||||
}
|
||||
|
||||
10
Wino.Core.Domain/Interfaces/IPrintService.cs
Normal file
10
Wino.Core.Domain/Interfaces/IPrintService.cs
Normal 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);
|
||||
}
|
||||
}
|
||||
16
Wino.Core.Domain/Models/Printing/PrintInformation.cs
Normal file
16
Wino.Core.Domain/Models/Printing/PrintInformation.cs
Normal 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; }
|
||||
}
|
||||
}
|
||||
@@ -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?",
|
||||
|
||||
Reference in New Issue
Block a user