Interface IDialogsFactory
Describes object providing methods for dialog based actions.
Methods
| Improve this Doc View SourceActivateGlobalProgress(Action<GlobalProgressActionArgs>, GlobalProgressOptions)
Activates progress dialog blocking app interaction until progress is finished or canceled.
Parameters
Type | Name | Description |
---|---|---|
System.Action<T>GlobalProgressActionArgs | progresAction | Action to be executed. |
GlobalProgressOptions | progressOptions | Options for progress dialog. |
Returns
Type | Description |
---|---|
GlobalProgressResult | Status of the action execution. |
ActivateGlobalProgress(Func<GlobalProgressActionArgs, Task>, GlobalProgressOptions)
Activates progress dialog blocking app interaction until progress is finished or canceled.
Parameters
Type | Name | Description |
---|---|---|
System.Func<T, TResult>GlobalProgressActionArgsSystem.Threading.Tasks.Task | progresAction | Awaitable function to be executed. |
GlobalProgressOptions | progressOptions | Options for progress dialog. |
Returns
Type | Description |
---|---|
GlobalProgressResult | Status of the action execution. |
CreateWindow(WindowCreationOptions)
Creates new window with Playnite's default styling applied.
Parameters
Type | Name | Description |
---|---|---|
WindowCreationOptions | options | Custom window options. |
Returns
Type | Description |
---|---|
System.Windows.Window | New window instance. |
GetCurrentAppWindow()
Gets currently active window. If no window is active, main window is returned instead.
Returns
Type | Description |
---|---|
System.Windows.Window | Window object. |
ChooseImageFile(List<ImageFileOption>, string, double, double)
Displays dialog with an option to choose single image.
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.List<T>ImageFileOption | files | |
string | caption | |
double | itemWidth | |
double | itemHeight |
Returns
Type | Description |
---|---|
ImageFileOption | Null if dialog was canceled otherwise selected ImageFileOption object. |
ChooseItemWithSearch(List<GenericItemOption>, Func<string, List<GenericItemOption>>, string, string)
Displays dialog with an option to choose single item and option to search for different items.
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.List<T>GenericItemOption | items | |
System.Func<T, TResult>stringSystem.Collections.Generic.List<T>GenericItemOption | searchFunction | |
string | defaultSearch | |
string | caption |
Returns
Type | Description |
---|---|
GenericItemOption | Null if dialog was canceled otherwise selected GenericItemOption object. |
SaveFile(string, bool)
Displays system file save dialog.
Parameters
Type | Name | Description |
---|---|---|
string | filter | File filter, for example "ZIP Archive|*.zip" |
bool | promptOverwrite | Indicates whether to ask user for file overrite if selected path exists. |
Returns
Type | Description |
---|---|
string | Selected file path or empty string if user cancels the dialog. |
SaveFile(string)
Displays system file save dialog.
Parameters
Type | Name | Description |
---|---|---|
string | filter | File filter, for example "ZIP Archive|*.zip" |
Returns
Type | Description |
---|---|
string | Selected file path or empty string if user cancels the dialog. |
SelectFile(string)
Displays system open file dialog.
Parameters
Type | Name | Description |
---|---|---|
string | filter | File filter, for example "ZIP Archive|*.zip" |
Returns
Type | Description |
---|---|
string | Selected file path or empty string if user cancels the dialog. |
SelectFiles(string)
Displays system open file dialog allowing to select multiple files.
Parameters
Type | Name | Description |
---|---|---|
string | filter | File filter, for example "ZIP Archive|*.zip" |
Returns
Type | Description |
---|---|
System.Collections.Generic.List<T>string | List of paths or null if user cancels the dialog. |
SelectFolder()
Displays system dialog for folder selection.
Returns
Type | Description |
---|---|
string | Selected folder path or empty string if user cancels the dialog. |
SelectIconFile()
Displays file open dialog with file filter set to show only image files used for icons.
Returns
Type | Description |
---|---|
string | Selected icon path or empty string if user cancels the dialog. |
SelectImagefile()
Displays file open dialog with file filter set to show only image files.
Returns
Type | Description |
---|---|
string | Selected image path or empty string if user cancels the dialog. |
SelectString(string, string, string, List<MessageBoxToggle>)
Parameters
Type | Name | Description |
---|---|---|
string | messageBoxText | |
string | caption | |
string | defaultInput | |
System.Collections.Generic.List<T>MessageBoxToggle | options |
Returns
Type | Description |
---|---|
StringSelectionDialogResult |
SelectString(string, string, string)
Displays dialog asking user to input text string.
Parameters
Type | Name | Description |
---|---|---|
string | messageBoxText | Dialog message text. |
string | caption | Dialog window caption. |
string | defaultInput | Default string presented in input field. |
Returns
Type | Description |
---|---|
StringSelectionDialogResult | Selection result. |
ShowErrorMessage(string, string)
Displays error dialog window with text message.
Parameters
Type | Name | Description |
---|---|---|
string | messageBoxText | Dialog message text. |
string | caption | Dialog window caption. |
Returns
Type | Description |
---|---|
System.Windows.MessageBoxResult |
ShowErrorMessage(string)
Displays error dialog window with text message.
Parameters
Type | Name | Description |
---|---|---|
string | messageBoxText | Dialog message text. |
Returns
Type | Description |
---|---|
System.Windows.MessageBoxResult |
ShowMessage(string, string, MessageBoxButton, MessageBoxImage)
Displays dialog window with text message.
Parameters
Type | Name | Description |
---|---|---|
string | messageBoxText | Dialog message text. |
string | caption | Dialog window caption. |
System.Windows.MessageBoxButton | button | Available response button. |
System.Windows.MessageBoxImage | icon | Dialog icon. |
Returns
Type | Description |
---|---|
System.Windows.MessageBoxResult | Selected dialog response. |
ShowMessage(string, string, MessageBoxButton)
Displays dialog window with text message.
Parameters
Type | Name | Description |
---|---|---|
string | messageBoxText | Dialog message text. |
string | caption | Dialog window caption. |
System.Windows.MessageBoxButton | button | Available response button. |
Returns
Type | Description |
---|---|
System.Windows.MessageBoxResult | Selected dialog response. |
ShowMessage(string, string, MessageBoxImage, List<MessageBoxOption>)
Displays dialog window custom response options.
Parameters
Type | Name | Description |
---|---|---|
string | messageBoxText | Dialog message text. |
string | caption | Dialog window caption. |
System.Windows.MessageBoxImage | icon | Dialog icon. |
System.Collections.Generic.List<T>MessageBoxOption | options | Response options. |
Returns
Type | Description |
---|---|
MessageBoxOption | Selected dialog option. |
ShowMessage(string, string)
Displays dialog window with text message.
Parameters
Type | Name | Description |
---|---|---|
string | messageBoxText | Dialog message text. |
string | caption | Dialog window caption. |
Returns
Type | Description |
---|---|
System.Windows.MessageBoxResult | Selected dialog response. |
ShowMessage(string)
Displays dialog window with text message.
Parameters
Type | Name | Description |
---|---|---|
string | messageBoxText | Dialog message text. |
Returns
Type | Description |
---|---|
System.Windows.MessageBoxResult | Selected dialog response. |
ShowSelectableString(string, string, string)
Displays dialog with textbox allowing to select/copy text.
Parameters
Type | Name | Description |
---|---|---|
string | messageBoxText | Dialog message text. |
string | caption | Dialog window caption. |
string | defaultInput | String added into selectable field. |