Пример #1
0
 public static void AddIcons(this ImageList imageList, Color color, int size = IconHelper.DefaultSize, params IconChar[] icons)
 {
     foreach (var icon in icons)
     {
         imageList.AddIcon(icon, color, size);
     }
 }
Пример #2
0
 public static void AddIcons(this ImageList imageList, int size, Color color, params IconChar[] icons)
 {
     foreach (var icon in icons)
     {
         imageList.AddIcon(icon, size, color);
     }
 }
Пример #3
0
        public void Add_Icons_to_image_list()
        {
            var imageList = new ImageList();

            imageList.AddIcon(IconChar.AccessibleIcon, 16, Color.Black);
            imageList.AddIcons(16, Color.Black, IconChar.AddressBook, IconChar.AirFreshener);
            imageList.Images.Should().HaveCount(3);
        }
Пример #4
0
        public void Add_Icons_to_image_list()
        {
            const int size      = 16;
            var       imageList = new ImageList();

            imageList.AddIcon(IconChar.AccessibleIcon, Color.Black, size);
            imageList.AddIcons(Color.Black, size, IconChar.AddressBook, IconChar.AirFreshener);
            imageList.Images.Should().HaveCount(3);
        }