Class AutomationDownloadButtonOptions
- Namespace
- SLNetTypes.Automation
- Assembly
- SLNetTypes.dll
This class allows you to create a download button in an interactive Automation script.
public class AutomationDownloadButtonOptions : AutomationDateTimeUpDownOptions
- Inheritance
-
AutomationDownloadButtonOptions
- Inherited Members
- Extension Methods
Examples
var downloadButtonOptions = new AutomationDownloadButtonOptions()
{
URL = @"/Documents/DMA_COMMON_DOCUMENTS/DailyReport.pdf",
StartDownloadImmediately = false,
ReturnWhenDownloadIsStarted = false,
FileNameToSave = "Report.PDF",
};
UIBlockDefinition blockItem = new UIBlockDefinition
{
Type = UIBlockType.DownloadButton,
Width = 125,
Text = "Get report of today",
Style = Style.Button.CallToAction,
ConfigOptions = downloadButtonOptions,
};
uiBuilder.AppendBlock(blockItem);
Remarks
note
If the name of a variable starts with the following prefix, IntelliSense in DataMiner Cube will list the object properties: downloadButtonConfig, downloadButtonOptions*
Properties
- FileNameToSave
Gets or sets a value indicating what the file name is that will be saved. By default, this is the same as the file name of the document.
- ReturnWhenDownloadIsStarted
Gets or sets a value indicating whether the engine.ShowUI() method will return as soon as the download is started (either immediately or when clicked by the user, depending on StartDownloadImmediately). When both the StartDownloadImmediately property and the ReturnWhenDownloadIsStarted property are set to true, the script will start the download and exit immediately.
- StartDownloadImmediately
Gets or sets a value indicating whether the download will start immediately when the component is displayed.
- URL
Gets or sets a value indicating which file must be downloaded. This URL can be either an absolute path or a relative path. For example, the absolute path "https://dataminer.services/install/DataMinerCube.exe" will download the latest Cube version from dataminer.services, and the relative path "/Documents/DMA_COMMON_DOCUMENTS/DailyReport.pdf" will download the file "DailyReport.PDF" hosted on the connected DMA, which is located in the Documents module.
Methods
- GetOptionsAsString(bool)
Gets the options as a string.
- SetDefaultOptions()
Sets the default options.
- SetNewValueOnPropertySucceeded(string, string)
Sets the specified property to the specified value.