Improve namespace and assmebly names.
This commit is contained in:
@@ -3,22 +3,22 @@ using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using NativeFileDialogSharp.Native;
|
||||
using NativeFileDialog.Native;
|
||||
|
||||
namespace NativeFileDialogSharp
|
||||
namespace NativeFileDialog
|
||||
{
|
||||
public static class Dialog
|
||||
{
|
||||
private static readonly Encoder utf8encoder = Encoding.UTF8.GetEncoder();
|
||||
|
||||
private static readonly bool need32bit = Is32BitWindowsOnNetFramework();
|
||||
|
||||
|
||||
private static bool Is32BitWindowsOnNetFramework()
|
||||
{
|
||||
try
|
||||
{
|
||||
// we call a function that does nothing just to test if we can load it properly
|
||||
NativeFileDialogSharp.Native.NativeFunctions.NFD_Dummy();
|
||||
NativeFileDialog.Native.NativeFunctions.NFD_Dummy();
|
||||
return false;
|
||||
}
|
||||
catch
|
||||
@@ -26,7 +26,7 @@ namespace NativeFileDialogSharp
|
||||
// a call to a default library failed, let's attempt the other one
|
||||
try
|
||||
{
|
||||
NativeFileDialogSharp.Native.NativeFunctions32.NFD_Dummy();
|
||||
NativeFileDialog.Native.NativeFunctions32.NFD_Dummy();
|
||||
return true;
|
||||
}
|
||||
catch
|
||||
@@ -78,7 +78,7 @@ namespace NativeFileDialogSharp
|
||||
string path = null;
|
||||
string errorMessage = null;
|
||||
IntPtr outPathIntPtr;
|
||||
var result = need32bit
|
||||
var result = need32bit
|
||||
? NativeFunctions32.NFD_OpenDialog(filterListNts, defaultPathNts, out outPathIntPtr)
|
||||
: NativeFunctions.NFD_OpenDialog(filterListNts, defaultPathNts, out outPathIntPtr);
|
||||
if (result == nfdresult_t.NFD_ERROR)
|
||||
@@ -104,8 +104,8 @@ namespace NativeFileDialogSharp
|
||||
string path = null;
|
||||
string errorMessage = null;
|
||||
IntPtr outPathIntPtr;
|
||||
var result = need32bit
|
||||
? NativeFunctions32.NFD_SaveDialog(filterListNts, defaultPathNts, out outPathIntPtr)
|
||||
var result = need32bit
|
||||
? NativeFunctions32.NFD_SaveDialog(filterListNts, defaultPathNts, out outPathIntPtr)
|
||||
: NativeFunctions.NFD_SaveDialog(filterListNts, defaultPathNts, out outPathIntPtr);
|
||||
if (result == nfdresult_t.NFD_ERROR)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user