Table of Contents

Class FileSelectorDialog

Namespace
AlphaFramework.Editor
Assembly
AlphaFramework.Editor.dll

Allows the user to select a file for the Mod (stored in an Archive or a real file)

public class FileSelectorDialog : Form, IDropTarget, ISynchronizeInvoke, IWin32Window, IBindableComponent, IComponent, IDisposable, IContainerControl
Inheritance
FileSelectorDialog
Implements
Inherited Members
Extension Methods

Constructors

FileSelectorDialog()

Initializes a new instance of the Form class.

public FileSelectorDialog()

Methods

Dispose(bool)

Clean up any resources being used.

protected override void Dispose(bool disposing)

Parameters

disposing bool

true if managed resources should be disposed; otherwise, false.

TryGetPath(string, string, out string)

Gets the file path for a game-content file (not allowing the user to create a new file)

public static bool TryGetPath(string type, string extension, out string path)

Parameters

type string

The type of file you want (e.g. Textures, Sounds, ...)

extension string

The file extension of the file type with a dot, but without an asterisk (e.g. .xml, .png, ...)

path string

The absolute path to the requested content file

Returns

bool

true if a file was selected, false if none was selected

Exceptions

InvalidOperationException

The user didn't select a file.

TryGetPath(string, string, out string, out bool)

Gets the file path for a game-content file (allowing the user to create a new file)

public static bool TryGetPath(string type, string extension, out string path, out bool overwrite)

Parameters

type string

The type of file you want (e.g. Textures, Sounds, ...)

extension string

The file extension of the file type with a dot, but without an asterisk (e.g. .xml, .png, ...)

path string

The absolute path to the requested content file

overwrite bool

Returns whether the user wants an existing file to be overwritten

Returns

bool

true if a file was selected, false if none was selected

Exceptions

InvalidOperationException

The user didn't select a file.