Table of Contents

Method ToCode

Namespace
Skyline.DataMiner.Automation
Assembly
SLManagedAutomation.dll

ToCode()

Returns a string representation of this dialog box item.

public string ToCode()

Returns

string

A string representation of this dialog box item.

Examples

UIBlockDefinition numericBlock = new UIBlockDefinition();
numericBlock.Type = UIBlockType.Numeric;
numericBlock.InitialValue = "5";
numericBlock.DestVar = "num";
numericBlock.WantsOnChange = true;
numericBlock.Row = 0;
numericBlock.Column = 1;
numericBlock.HorizontalAlignment = "Center";
numericBlock.VerticalAlignment = "Top";
numericBlock.RangeHigh = 300;
numericBlock.RangeLow = 5;
numericBlock.RangeStep = 5;
numericBlock.Decimals = 6;
numericBlock.Extra = "Discreet 1;Discreet 2;Discreet 3";

string result = numericBlock.ToCode();

// result:
// [UI]
// type=numeric
// column = 1
// row=0
// range-low=5
// range-high=300
// range-step=5
// decimals=6
// align-hor=Center
// align-ver=Top
// initial = 5
// destvar=num
// extra = Discreet 1; Discreet 2;Discreet 3
// onchange=true
// [/UI]