Method AppendButton
- Namespace
- Skyline.DataMiner.Automation
- Assembly
- SLManagedAutomation.dll
AppendButton(string, string)
Adds a button to this dialog box with the specified destination variable name and button text.
public UIBuilder AppendButton(string destVar, string displayText)
Parameters
Returns
Examples
UIBuilder uibDialogBox = new UIBuilder();
// ...
uibDialogBox.AppendButton("applyButtonDestVar", "Apply");
// ...
var uir = engine.ShowUI(uibDialogBox);
string value = uir.GetString("applyButtonDestVar"); // If the button was pressed, the value will be "applyButtonDestVar"; otherwise, null.
Remarks
When the button is pressed, the destination variable is filled with its own name.
This is a convenience method that will create a new instance of UIBlockDefinition of type Button and sets RequireResponse to true
.
AppendButton(string, string, string)
Adds a button to this dialog box with the specified destination variable name, button text, and style.
The supported button styles can be accessed through const strings on the Style.Button class.
This is supported from DataMiner 10.3.1/10.4.0 onwards.
public UIBuilder AppendButton(string destVar, string displayText, string style)
Parameters
destVar
stringThe name of the destination variable.
displayText
stringThe button text.
style
stringThe button style (see Style.Button for supported styles).
Returns
Examples
UIBuilder uibDialogBox = new UIBuilder();
// ...
uibDialogBox.AppendButton("applyButtonDestVar", "Apply", Style.Button.CallToAction);
// ...
var uir = engine.ShowUI(uibDialogBox);
string value = uir.GetString("applyButtonDestVar"); // If the button was pressed, the value will be "applyButtonDestVar"; otherwise, null.
Remarks
When the button is pressed, the destination variable is filled in with its own name.
This is a convenience method that will create a new instance of UIBlockDefinition of type Button and set RequireResponse to true
.