Interface IDialogs
- Namespace
- Playnite
- Assembly
- Playnite.SDK.dll
Describes object providing methods for dialog based actions.
public interface IDialogs
Methods
ChooseImageFileAsync(IEnumerable<ChooseDialogImageItem>, string?, double, double)
Task<ChooseDialogImageItem?> ChooseImageFileAsync(IEnumerable<ChooseDialogImageItem> files, string? caption = null, double itemWidth = 240, double itemHeight = 180)
Parameters
filesIEnumerable<ChooseDialogImageItem>captionstringitemWidthdoubleitemHeightdouble
Returns
ChooseImageWithSearchAsync(string, Func<ChooseItemWithSearchAsyncArgs, Task<IEnumerable<ChooseDialogImageItem>>>, string?, double, double)
Task<ChooseDialogImageItem?> ChooseImageWithSearchAsync(string initialSearch, Func<ChooseItemWithSearchAsyncArgs, Task<IEnumerable<ChooseDialogImageItem>>> searchFunction, string? caption = null, double itemWidth = 240, double itemHeight = 180)
Parameters
initialSearchstringsearchFunctionFunc<ChooseItemWithSearchAsyncArgs, Task<IEnumerable<ChooseDialogImageItem>>>captionstringitemWidthdoubleitemHeightdouble
Returns
ChooseItemAsync(IEnumerable<ChooseDialogItem>, string?)
Task<ChooseDialogItem?> ChooseItemAsync(IEnumerable<ChooseDialogItem> items, string? caption = null)
Parameters
itemsIEnumerable<ChooseDialogItem>captionstring
Returns
ChooseItemWithSearchAsync(string, Func<ChooseItemWithSearchAsyncArgs, Task<IEnumerable<ChooseDialogItem>>>, string?)
Task<ChooseDialogItem?> ChooseItemWithSearchAsync(string initialSearch, Func<ChooseItemWithSearchAsyncArgs, Task<IEnumerable<ChooseDialogItem>>> searchFunction, string? caption = null)
Parameters
initialSearchstringsearchFunctionFunc<ChooseItemWithSearchAsyncArgs, Task<IEnumerable<ChooseDialogItem>>>captionstring
Returns
CreateWindow(WindowCreationOptions)
Creates new window with Playnite's default styling applied.
Window CreateWindow(WindowCreationOptions options)
Parameters
optionsWindowCreationOptionsCustom window options.
Returns
- Window
New window instance.
GetLastActiveWindow()
Gets currently active window. If no window is active, main window is returned instead.
Window? GetLastActiveWindow()
Returns
- Window
Window object.
SaveFileAsync(Dictionary<string, string[]>?, bool, string?)
Task<string?> SaveFileAsync(Dictionary<string, string[]>? fileTypeChoices = null, bool promptOverwrite = true, string? initialDir = null)
Parameters
fileTypeChoicesDictionary<string, string[]>promptOverwriteboolinitialDirstring
Returns
SelectFileAsync(Dictionary<string, string[]>?, bool, string?)
Task<List<string>?> SelectFileAsync(Dictionary<string, string[]>? fileTypeChoices = null, bool allowMultiple = false, string? initialDir = null)
Parameters
fileTypeChoicesDictionary<string, string[]>allowMultipleboolinitialDirstring
Returns
SelectFolderAsync(string?, bool)
Task<List<string>?> SelectFolderAsync(string? initialDir = null, bool allowMultiple = false)
Parameters
Returns
SelectImagefileAsync(bool, string?)
Task<List<string>?> SelectImagefileAsync(bool allowMultiple = false, string? initialDir = null)
Parameters
Returns
SelectStringAsync(string, string, string)
Task<StringSelectionDialogResult> SelectStringAsync(string messageBoxText, string caption, string defaultInput)
Parameters
Returns
SelectStringAsync(string, string, string, List<MessageBoxResponse>, List<MessageBoxOption>)
Task<StringSelectionDialogResult> SelectStringAsync(string messageBoxText, string caption, string defaultInput, List<MessageBoxResponse> responses, List<MessageBoxOption> options)
Parameters
messageBoxTextstringcaptionstringdefaultInputstringresponsesList<MessageBoxResponse>optionsList<MessageBoxOption>
Returns
ShowAsyncBlockingProgressAsync(GlobalProgressOptions, Func<IGlobalProgressActionArgs, Task>)
Task<GlobalProgressResult> ShowAsyncBlockingProgressAsync(GlobalProgressOptions progressOptions, Func<IGlobalProgressActionArgs, Task> progresAction)
Parameters
progressOptionsGlobalProgressOptionsprogresActionFunc<IGlobalProgressActionArgs, Task>
Returns
ShowBlockingProgressAsync(GlobalProgressOptions, Action<IGlobalProgressActionArgs>)
Task<GlobalProgressResult> ShowBlockingProgressAsync(GlobalProgressOptions progressOptions, Action<IGlobalProgressActionArgs> progresAction)
Parameters
progressOptionsGlobalProgressOptionsprogresActionAction<IGlobalProgressActionArgs>
Returns
ShowErrorMessageAsync(string, string?, Exception?)
Task<MessageBoxResult> ShowErrorMessageAsync(string messageBoxText, string? caption = null, Exception? exception = null)
Parameters
Returns
ShowMessageAsync(string, string?, MessageBoxButtons, MessageBoxSeverity, MessageBoxResult)
Task<MessageBoxResult> ShowMessageAsync(string messageBoxText, string? caption = null, MessageBoxButtons button = MessageBoxButtons.OK, MessageBoxSeverity severity = MessageBoxSeverity.None, MessageBoxResult defaultResult = MessageBoxResult.None)
Parameters
messageBoxTextstringcaptionstringbuttonMessageBoxButtonsseverityMessageBoxSeveritydefaultResultMessageBoxResult
Returns
ShowMessageAsync(string, string, MessageBoxSeverity, List<MessageBoxResponse>, List<MessageBoxOption>)
Task<MessageBoxResponse?> ShowMessageAsync(string messageBoxText, string caption, MessageBoxSeverity severity, List<MessageBoxResponse> respones, List<MessageBoxOption> options)
Parameters
messageBoxTextstringcaptionstringseverityMessageBoxSeverityresponesList<MessageBoxResponse>optionsList<MessageBoxOption>
Returns
ShowSelectableStringAsync(string, string, string)
Task ShowSelectableStringAsync(string messageBoxText, string caption, string defaultInput)