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
@@ -0,0 +1,23 @@
|
||||
// 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 System.Collections.Generic;
|
||||
using NativeFileDialogs.Net;
|
||||
|
||||
NfdStatus result = Nfd.SaveDialog(out string? savePath, new Dictionary<string, string>()
|
||||
{
|
||||
{ "Source code", "c,cpp,cc" },
|
||||
{ "Headers", "h,hpp" },
|
||||
}, defaultName: "Untitled.c");
|
||||
|
||||
if (result == NfdStatus.Ok)
|
||||
{
|
||||
Console.WriteLine("Success!");
|
||||
Console.WriteLine(savePath);
|
||||
}
|
||||
else
|
||||
{
|
||||
Console.WriteLine("User pressed Cancel.");
|
||||
}
|
||||
Reference in new issue
Block a user