Example #1
0
 public string GetText()
 {
     if (cbbBox != null)
     {
         return(EnumsListCreator.GetText(List[cbbBox.SelectedIndex]));
     }
     else
     {
         return(string.Empty);
     }
 }
Example #2
0
        private void FillArray(bool bAlsoNull)
        {
            List.Clear();

            if (bAlsoNull)
            {
                List.Add(new EnumsList <T>(default(T), ""));
            }

            foreach (T i in Enum.GetValues(typeof(T)))
            {
                var a = (object)Enum.Parse(typeof(T), i.ToString());

                if (Filter?.Invoke(i) ?? true)
                {
                    List.Add(EnumsListCreator.CreateItem(a, Tranlate(Enum.GetName(typeof(T), i))));
                }
            }
        }
Example #3
0
        //public int GetIntValue()
        //{
        //    if (cbbBox != null && cbbBox.SelectedValue != null)
        //        return (int)((EnumsList)List[cbbBox.SelectedIndex]).Archive;
        //    else
        //        return 0;
        //}

        public void ChangeText(int val, string Text)
        {
            EnumsListCreator.ChangeText(List[val], Text);
        }
Example #4
0
 public object GetValue(int pos)
 {
     return(EnumsListCreator.GetValue(List[pos]));
 }
Example #5
0
 public string GetText(int pos)
 {
     return(EnumsListCreator.GetText(List[pos]));
 }