protected virtual void FillItems() { foreach (var value in Utilities.GetEnumValues <EnumType>()) { Selector.AddItem(value, value.Description()); } }
protected virtual void FillItems(Func <EnumType, bool> selector) { Selector.StopLayout(); foreach (var value in EnumExtension.GetEnumValues <EnumType>()) { if (selector?.Invoke(value) != false) { Selector.AddItem(value, GetDescription(value)); } } Selector.StartLayout(); }
public void Init(string falseLabel, string trueLabel) { base.Init(); Selector.AddItem(true, trueLabel); Selector.AddItem(false, falseLabel); }