Добавьте файлы проекта.

This commit is contained in:
Курнат Андрей
2026-04-04 10:52:30 +03:00
parent 9b34a92f15
commit 5a55bc5f4c
30 changed files with 3446 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
using Microsoft.Win32;
namespace CRAWLER.Services;
internal interface IFilePickerService
{
IReadOnlyList<string> PickPdfFiles(bool multiselect);
}
internal sealed class FilePickerService : IFilePickerService
{
public IReadOnlyList<string> PickPdfFiles(bool multiselect)
{
var dialog = new OpenFileDialog
{
Filter = "PDF (*.pdf)|*.pdf",
Multiselect = multiselect,
CheckFileExists = true,
CheckPathExists = true
};
return dialog.ShowDialog() == true
? dialog.FileNames
: Array.Empty<string>();
}
}