Table of Contents

Class EnumDropDown<T>

Namespace
Skyline.DataMiner.Utils.InteractiveAutomationScript
Assembly
Skyline.DataMiner.Utils.InteractiveAutomationScriptToolkit.dll

A dropdown that allows users to select a value defined by an enum.

public class EnumDropDown<T> : DropDown<T>, IDropDownBase, IValidationWidget, IDropDown<T>, IOptionWidget<T> where T : struct, Enum

Type Parameters

T

Enum type to represent with the dropdown.

Inheritance
EnumDropDown<T>
Implements
Inherited Members
Extension Methods

Examples

public enum Capitol
{
	Brussels,
	[Description("Washington DC")]
	WashingtonDc,
	[Description("Buenos Aires")]
	BuenosAires,
	Lisbon,
	Cairo,
	Paris
}

var capitolDropDown = new EnumDropDown<Capitol>();
var selectedCapitol = capitolDropDown.Selected;
capitolDropDown.Changed += (s, e) =>
{
	engine.Log($"Capitol changed from {e.Previous} to {e.Selected}");
	selectedCapitol = e.Selected;
};

Constructors

EnumDropDown(ICollection<T>)

Initializes a new instance of the EnumDropDown<T>

EnumDropDown(Func<T, string>, ICollection<T>)

Initializes a new instance of the EnumDropDown<T>