Пример #1
0
        public void EnumListTest()
        {
            var  items = EnumUtil.EnumList <DivisionLeagTypes>();
            Enum en    = items[1];

            Assert.AreEqual(DivisionLeagTypes.AE.GetType().Name, items[1].GetType().Name);
        }
Пример #2
0
        private void SetBorderCorners()
        {
            List <BorderCorners> items = EnumUtil.EnumList <BorderCorners>();

            for (int i = 0; i < items.Count; i++)
            {
                if (GetFlag(items[i]))
                {
                    Button b = GetButton(items[i]);
                    b.BackColor = IsSelected(b.BackColor) ? _normalState : _selectedState;
                }
            }
        }
Пример #3
0
        public string DisplaySelection()
        {
            StringBuilder        sb    = new StringBuilder();
            List <BorderCorners> items = EnumUtil.EnumList <BorderCorners>();

            for (int i = 0; i < items.Count; i++)
            {
                if (_borderCorners.HasFlag(items[i]))
                {
                    sb.Append(Enum.GetName(typeof(BorderCorners), items[i]).ToString() + " ");
                }
            }

            return(sb.ToString());
        }
Пример #4
0
        public void EnumListCountTest()
        {
            var items = EnumUtil.EnumList <DivisionLeagTypes>();

            Assert.AreEqual(8, items.Count);
        }