Migrate mail printing to WinUI print preview
This commit is contained in:
@@ -1,10 +1,9 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using Wino.Core.Domain.Enums;
|
||||
using Wino.Core.Domain.Models.Accounts;
|
||||
using Wino.Core.Domain.Models.Common;
|
||||
using Wino.Core.Domain.Models.Printing;
|
||||
|
||||
namespace Wino.Core.Domain.Interfaces;
|
||||
|
||||
@@ -30,5 +29,4 @@ public interface IDialogServiceBase
|
||||
Task<List<SharedFile>> PickFilesAsync(params object[] typeFilters);
|
||||
Task<List<PickedFileMetadata>> PickFilesMetadataAsync(params object[] typeFilters);
|
||||
Task<string> PickFilePathAsync(string saveFileName);
|
||||
Task<WebView2PrintSettingsModel> ShowPrintDialogAsync(WebView2PrintSettingsModel initialSettings = null);
|
||||
}
|
||||
|
||||
@@ -1,9 +1,12 @@
|
||||
using System.Threading.Tasks;
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Threading.Tasks;
|
||||
using Wino.Core.Domain.Enums;
|
||||
using Wino.Core.Domain.Models.Printing;
|
||||
|
||||
namespace Wino.Core.Domain.Interfaces;
|
||||
|
||||
public interface IPrintService
|
||||
{
|
||||
Task<PrintingResult> PrintPdfFileAsync(string pdfFilePath, string printTitle);
|
||||
Task<PrintingResult> PrintAsync(nint windowHandle, string printTitle, Func<WebView2PrintSettingsModel, Task<Stream>> renderPdfStreamAsync);
|
||||
}
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
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; }
|
||||
}
|
||||
Reference in New Issue
Block a user