Пример #1
0
 protected virtual void FillItems()
 {
     foreach (var value in Utilities.GetEnumValues <EnumType>())
     {
         Selector.AddItem(value, value.Description());
     }
 }
Пример #2
0
 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();
 }
Пример #3
0
 public void Init(string falseLabel, string trueLabel)
 {
     base.Init();
     Selector.AddItem(true, trueLabel);
     Selector.AddItem(false, falseLabel);
 }