ServerFolderPicker
Class in Oadm.Sdk.Client.Controls · Oadm.Sdk.Client.dll
The field of a folder on the server’s computer (SDK 0.17.0; “Folder on the server” of a plugin’s settings): a text box with the path and the secondary “Choose folder” that opens ServerFolderWindow on ServerFolderPicker.Folders (ICorePluginClientContext.ServerFolders; never the local folder dialog, the client may run elsewhere). Bind ServerFolderPicker.Path two-way inside a ui:FormField (class wide): the view model’s error of the bound property shows directly below the text box like on every input, leaving the field shows it (IFormFieldVisits). Without such an error the field shows the server’s check of the path (ServerFolderPicker.Problem, read after a choice and when the user leaves a typed path), so a plugin can refuse a bad folder; its server part checks again on save.
public sealed class ServerFolderPicker : GridInherits Grid
XAML properties
Section titled “XAML properties”Set them in XAML (<ui:ServerFolderPicker Name="..." />) or bind them.
| Name | Type | Description |
|---|---|---|
Folders |
IServerFolders? |
The server’s folders; without them (an older host, no administrator) Choose folder is off. |
Heading |
string? |
The dialog’s title (ServerFolderWindow.DefaultHeading). |
Path |
string? |
The chosen folder’s full path on the server (two-way). |
Placeholder |
string? |
The text box’s placeholder. |
Problem |
string? |
The server’s check of ServerFolderPicker.Path (IServerFolders.CheckAsync), null when it passed or was not asked yet; shown below the text box while the bound property has no error of its own. Bind it OneWayToSource to keep Save off while it is set. |
Properties
Section titled “Properties”Button
Section titled “Button”Button Button { get; }Choose folder (tests).
TextBox
Section titled “TextBox”TextBox TextBox { get; }The text box (tests).
Methods
Section titled “Methods”CheckAsync
Section titled “CheckAsync”Task CheckAsync()Asks the server about the current path (after a typed path was left); the answer sets ServerFolderPicker.Problem.
ChooseAsync
Section titled “ChooseAsync”Task ChooseAsync()Opens the dialog on the current path and takes the chosen folder.
Fields
Section titled “Fields”ButtonText
Section titled “ButtonText”const string ButtonText = "Choose folder"The text of the button.