2021-12-27 21:17:54 +00:00
|
|
|
|
using NativeFileDialogSharp;
|
|
|
|
|
using System;
|
|
|
|
|
|
|
|
|
|
namespace NativeFileDialogSharpSandbox
|
|
|
|
|
{
|
|
|
|
|
internal class Program
|
|
|
|
|
{
|
|
|
|
|
static void Main(string[] args)
|
|
|
|
|
{
|
|
|
|
|
PrintResult(Dialog.FileOpenMultiple("pdf", null));
|
|
|
|
|
PrintResult(Dialog.FileOpen(null));
|
|
|
|
|
PrintResult(Dialog.FileSave(null));
|
|
|
|
|
PrintResult(Dialog.FolderPicker(null));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void PrintResult(DialogResult result)
|
|
|
|
|
{
|
|
|
|
|
Console.WriteLine($"Path: {result.Path}, IsError {result.IsError}, IsOk {result.IsOk}, IsCancelled {result.IsCancelled}, ErrorMessage {result.ErrorMessage}");
|
|
|
|
|
if (result.Paths != null)
|
|
|
|
|
{
|
|
|
|
|
Console.WriteLine("Paths");
|
|
|
|
|
Console.WriteLine(string.Join("\n", result.Paths));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|