mirror of
https://github.com/AssetRipper/NativeFileDialogs.NET.git
synced 2026-11-13 18:07:38 -10:00
Add NativeFileDialogs.Net examples
They look much easier to deal with, don't they?
This commit is contained in:
9 files changed
+191
No files matched your search
+18
@@ -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.");
|
||||
}
|
||||
Reference in new issue
Block a user