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
disposingbooltrue 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
typestringThe type of file you want (e.g. Textures, Sounds, ...)
extensionstringThe file extension of the file type with a dot, but without an asterisk (e.g. .xml, .png, ...)
pathstringThe absolute path to the requested content file
Returns
- bool
trueif a file was selected,falseif 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
typestringThe type of file you want (e.g. Textures, Sounds, ...)
extensionstringThe file extension of the file type with a dot, but without an asterisk (e.g. .xml, .png, ...)
pathstringThe absolute path to the requested content file
overwriteboolReturns whether the user wants an existing file to be overwritten
Returns
- bool
trueif a file was selected,falseif none was selected
Exceptions
- InvalidOperationException
The user didn't select a file.