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); } }
public static void AddIcons(this ImageList imageList, int size, Color color, params IconChar[] icons) { foreach (var icon in icons) { imageList.AddIcon(icon, size, color); } }
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); }
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); }