Table of Contents

Method GetChecked

Namespace
Skyline.DataMiner.Automation
Assembly
SLManagedAutomation.dll

GetChecked(string)

Gets a value indicating whether the specified destination variable that is linked to a checkbox was selected.

public bool GetChecked(string key)

Parameters

key string

The destination variable name.

Returns

bool

true if the specified checkbox is selected; otherwise, false.

Examples

UIResults uir = null;
bool isSelected;
UIBlockDefinition blockCheckBox = new UIBlockDefinition();
blockCheckBox.Type = UIBlockType.CheckBox;
blockCheckBox.DestVar = "checkbox";
...
uib.AppendBlock(blockCheckBox);
...
uir = engine.ShowUI(uib);
isSelected = uir.GetChecked("checkbox");

GetChecked(string, string)

Gets a value indicating whether the specified checkbox list item of the specified destination variable that is linked to a checkbox list was selected.

public bool GetChecked(string key, string value)

Parameters

key string

The value of the checkbox.

value string

true if the specified checkbox list item is selected; otherwise, false.

Returns

bool

true if the specified checkbox list item is selected; otherwise, false.

Examples

UIBuilder uiBuilder = new UIBuilder();
...
UIBlockDefinition blockItem = new UIBlockDefinition();
blockItem.Type = UIBlockType.CheckBoxList;
blockItem.AddCheckBoxListOption("1","First option");
blockItem.AddCheckBoxListOption("2","Second option");
blockItem.DestVar = "chekBoxList";
uiBuilder.AppendBlock(blockItem);
...
var uir = engine.ShowUI(uiBuilder);

bool selected = uir.GetChecked("chekBoxList", "2");