Exemple #1
0
 public static void AddIcon(this ImageList imageList, IconChar icon, int size, Color color)
 {
     imageList.Images.Add(icon.ToString(), icon.ToBitmap(size, color));
 }
Exemple #2
0
 /// <summary>
 /// Shortcut helper method to quickly add a rendered icon to the specified image list
 /// </summary>
 /// <param name="imageList">The image list to add to</param>
 /// <param name="icon">The icon to render and add</param>
 /// <param name="color">The icon color</param>
 /// <param name="size">The icon size in pixels</param>
 public static void AddIcon(this ImageList imageList, IconChar icon,
                            Color?color = null, int size = IconHelper.DefaultSize)
 {
     imageList.Images.Add(icon.ToString(), icon.ToBitmap(color, size));
 }