Tanoda
TriLibCore.SFB.StandaloneFileBrowser Class Reference

Represents a platform-specific file browser. More...

Static Public Member Functions

static IList< ItemWithStreamOpenFilePanel (string title, string directory, string extension, bool multiselect)
 Native open file dialog More...
 
static IList< ItemWithStreamOpenFilePanel (string title, string directory, ExtensionFilter[] extensions, bool multiselect)
 Native open file dialog More...
 
static void OpenFilePanelAsync (string title, string directory, string extension, bool multiselect, Action< IList< ItemWithStream > > cb)
 Native open file dialog async More...
 
static void OpenFilePanelAsync (string title, string directory, ExtensionFilter[] extensions, bool multiselect, Action< IList< ItemWithStream > > cb)
 Native open file dialog async More...
 
static IList< ItemWithStreamOpenFolderPanel (string title, string directory, bool multiselect)
 Native open folder dialog More...
 
static void OpenFolderPanelAsync (string title, string directory, bool multiselect, Action< IList< ItemWithStream > > cb)
 Native open folder dialog async More...
 
static ItemWithStream SaveFilePanel (string title, string directory, string defaultName, string extension)
 Native save file dialog More...
 
static ItemWithStream SaveFilePanel (string title, string directory, string defaultName, ExtensionFilter[] extensions)
 Native save file dialog More...
 
static void SaveFilePanelAsync (string title, string directory, string defaultName, string extension, Action< ItemWithStream > cb)
 Native save file dialog async More...
 
static void SaveFilePanelAsync (string title, string directory, string defaultName, ExtensionFilter[] extensions, Action< ItemWithStream > cb)
 Native save file dialog async More...
 

Detailed Description

Represents a platform-specific file browser.

Definition at line 7 of file StandaloneFileBrowser.cs.

Member Function Documentation

◆ OpenFilePanel() [1/2]

static IList< ItemWithStream > TriLibCore.SFB.StandaloneFileBrowser.OpenFilePanel ( string  title,
string  directory,
ExtensionFilter[]  extensions,
bool  multiselect 
)
static

Native open file dialog

Parameters
titleDialog title
directoryRoot directory
extensionsList of extension filters. Filter Example: new ExtensionFilter("Image Files", "jpg", "png")
multiselectAllow multiple file selection
Returns
Returns array of chosen items. Zero length array when cancelled

Definition at line 71 of file StandaloneFileBrowser.cs.

◆ OpenFilePanel() [2/2]

static IList< ItemWithStream > TriLibCore.SFB.StandaloneFileBrowser.OpenFilePanel ( string  title,
string  directory,
string  extension,
bool  multiselect 
)
static

Native open file dialog

Parameters
titleDialog title
directoryRoot directory
extensionAllowed extension
multiselectAllow multiple file selection
Returns
Returns array of chosen items. Zero length array when cancelled

Definition at line 56 of file StandaloneFileBrowser.cs.

◆ OpenFilePanelAsync() [1/2]

static void TriLibCore.SFB.StandaloneFileBrowser.OpenFilePanelAsync ( string  title,
string  directory,
ExtensionFilter[]  extensions,
bool  multiselect,
Action< IList< ItemWithStream > >  cb 
)
static

Native open file dialog async

Parameters
titleDialog title
directoryRoot directory
extensionsList of extension filters. Filter Example: new ExtensionFilter("Image Files", "jpg", "png")
multiselectAllow multiple file selection
cbCallback")

Definition at line 100 of file StandaloneFileBrowser.cs.

◆ OpenFilePanelAsync() [2/2]

static void TriLibCore.SFB.StandaloneFileBrowser.OpenFilePanelAsync ( string  title,
string  directory,
string  extension,
bool  multiselect,
Action< IList< ItemWithStream > >  cb 
)
static

Native open file dialog async

Parameters
titleDialog title
directoryRoot directory
extensionAllowed extension
multiselectAllow multiple file selection
cbCallback")

Definition at line 85 of file StandaloneFileBrowser.cs.

◆ OpenFolderPanel()

static IList< ItemWithStream > TriLibCore.SFB.StandaloneFileBrowser.OpenFolderPanel ( string  title,
string  directory,
bool  multiselect 
)
static

Native open folder dialog

Parameters
title
directoryRoot directory
multiselect
Returns
Returns array of chosen items. Zero length array when cancelled

Definition at line 113 of file StandaloneFileBrowser.cs.

◆ OpenFolderPanelAsync()

static void TriLibCore.SFB.StandaloneFileBrowser.OpenFolderPanelAsync ( string  title,
string  directory,
bool  multiselect,
Action< IList< ItemWithStream > >  cb 
)
static

Native open folder dialog async

Parameters
title
directoryRoot directory
multiselect
cbCallback")

Definition at line 125 of file StandaloneFileBrowser.cs.

◆ SaveFilePanel() [1/2]

static ItemWithStream TriLibCore.SFB.StandaloneFileBrowser.SaveFilePanel ( string  title,
string  directory,
string  defaultName,
ExtensionFilter[]  extensions 
)
static

Native save file dialog

Parameters
titleDialog title
directoryRoot directory
defaultNameDefault file name
extensionsList of extension filters. Filter Example: new ExtensionFilter("Image Files", "jpg", "png")
Returns
Returns chosen item. Null when cancelled

Definition at line 153 of file StandaloneFileBrowser.cs.

◆ SaveFilePanel() [2/2]

static ItemWithStream TriLibCore.SFB.StandaloneFileBrowser.SaveFilePanel ( string  title,
string  directory,
string  defaultName,
string  extension 
)
static

Native save file dialog

Parameters
titleDialog title
directoryRoot directory
defaultNameDefault file name
extensionFile extension
Returns
Returns chosen item. Null when cancelled

Definition at line 139 of file StandaloneFileBrowser.cs.

◆ SaveFilePanelAsync() [1/2]

static void TriLibCore.SFB.StandaloneFileBrowser.SaveFilePanelAsync ( string  title,
string  directory,
string  defaultName,
ExtensionFilter[]  extensions,
Action< ItemWithStream cb 
)
static

Native save file dialog async

Parameters
titleDialog title
directoryRoot directory
defaultNameDefault file name
extensionsList of extension filters. Filter Example: new ExtensionFilter("Image Files", "jpg", "png")
cbCallback")

Definition at line 182 of file StandaloneFileBrowser.cs.

◆ SaveFilePanelAsync() [2/2]

static void TriLibCore.SFB.StandaloneFileBrowser.SaveFilePanelAsync ( string  title,
string  directory,
string  defaultName,
string  extension,
Action< ItemWithStream cb 
)
static

Native save file dialog async

Parameters
titleDialog title
directoryRoot directory
defaultNameDefault file name
extensionFile extension
cbCallback")

Definition at line 167 of file StandaloneFileBrowser.cs.


The documentation for this class was generated from the following file: