Table of Contents

Method WasOnChange

Namespace
Skyline.DataMiner.Automation
Assembly
SLManagedAutomation.dll

WasOnChange(string)

Returns a value indicating whether the user changed the value of a specific dialog box item.

public bool WasOnChange(string key)

Parameters

key string

The destination variable that is linked to the specific dialog box item.

Returns

bool

true if the user changed the value; otherwise, false.

Examples

UIResults uir = null;
do
{
	UIBuilder uib = new UIBuilder();
	uib.RequireResponse = true;
	uib.Width = 800;
	uib.Height = 600;
	uib.RowDefs = "100;100;100";
	uib.ColumnDefs="100;100;100";

	UIBlockDefinition blockCheckBox = new UIBlockDefinition();
	blockCheckBox.Type = UIBlockType.CheckBox;
	blockCheckBox.WantsOnChange = true;
	blockCheckBox.DestVar = "myCheckBox";
	blockCheckBox.Row = 0;
	blockCheckBox.Column = 0;
	uib.AppendBlock(blockCheckBox);

	UIBlockDefinition blockButton = new UIBlockDefinition();
	blockButton.Type = UIBlockType.Button;  
	blockButton.Text = "Next";
	blockButton.DestVar = "buttonNext";
	blockButton.Row = 1;
	blockButton.Column = 0;	
	uib.AppendBlock(blockButton);  

	uir = engine.ShowUI(uib);
	} while (!uir.WasOnChange("myCheckBox"));

Remarks

Use this method to check whether or not the user changed the value of a particular dialog box item:

  • Did the user enter text in a text box?
  • Did the user select a value in a selection box?
  • Did the user specify a date/time in a calendar item?
  • ...
note

For a .WasOnChange to work, you have to put .WantsOnChange to true. See the example.