Add NativeFileDialogs.Net examples

They look much easier to deal with, don't they?
This commit is contained in:
Speykious committed 2022-03-27 19:40:16 +02:00
1 parent 732fcb176e
commit cd5c3d37dc
9 files changed
+191

No files matched your search

@@ -0,0 +1,18 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup Label="Project">
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>disable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup Label="Project References">
<ProjectReference Include="..\..\..\NativeFileDialogs.Net\NativeFileDialogs.Net.csproj" />
</ItemGroup>
<ItemGroup Label="Package References">
<PackageReference Include="NativeFileDialogs.Net.Runtime" Version="0.1.0-alpha" />
</ItemGroup>
</Project>
@@ -0,0 +1,18 @@
// Copyright (c) Speykious
// This file is part of NativeFileDialogs.NET.
// NativeFileDialogs.NET is licensed under the Zlib License. See LICENSE for details.
using System;
using NativeFileDialogs.Net;
NfdStatus result = Nfd.PickFolder(out string? outPath);
if (result == NfdStatus.Ok)
{
Console.WriteLine("Success!");
Console.WriteLine(outPath);
}
else
{
Console.WriteLine("User pressed Cancel.");
}