You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
#rb trivial #preflight skip #ROBOMERGE-AUTHOR: josh.adams #ROBOMERGE-SOURCE: CL 18242813 via CL 18244989 via CL 18245074 via CL 18245129 via CL 18246346 via CL 18246387 #ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v895-18170469) [CL 18246402 by josh adams in ue5-release-engine-test branch]
41 lines
948 B
C#
41 lines
948 B
C#
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Text;
|
|
using System.Windows.Forms;
|
|
|
|
namespace UnrealWindowsForms
|
|
{
|
|
public static class Utils
|
|
{
|
|
[System.Runtime.InteropServices.DllImport("user32.dll")]
|
|
private static extern bool SetProcessDPIAware();
|
|
|
|
public static void SetupVisuals()
|
|
{
|
|
// make the form look good on modern displays!
|
|
SetProcessDPIAware();
|
|
|
|
Application.EnableVisualStyles();
|
|
Application.SetCompatibleTextRenderingDefault(false);
|
|
}
|
|
|
|
public static string ShowOpenFileDialogAndReturnFilename(string Filter, string InitialDirectory="")
|
|
{
|
|
OpenFileDialog Dialog = new OpenFileDialog();
|
|
Dialog.Filter = Filter;
|
|
Dialog.AutoUpgradeEnabled = true;
|
|
Dialog.CheckFileExists = true;
|
|
Dialog.InitialDirectory = InitialDirectory;
|
|
|
|
if (Dialog.ShowDialog() != DialogResult.OK)
|
|
{
|
|
return null;
|
|
}
|
|
|
|
return Dialog.FileName;
|
|
}
|
|
}
|
|
}
|