/// <summary>
 ///     A new collection of icons that can be embedded into an executable file.
 /// </summary>
 public IconDirectoryResource(IconFile iconFile) : base(ResourceTypes.RT_GROUP_ICON)
 {
     for (UInt16 id = 0; id < iconFile.Icons.Count; id++)
     {
         var iconResource = new IconResource(iconFile.Icons[id], new ResourceId(id), _language);
         Icons.Add(iconResource);
     }
 }
Example #2
0
 /// <summary>
 ///     A new collection of cursors that can be embedded into an executable file.
 /// </summary>
 public CursorDirectoryResource(IconFile iconFile) : base(ResourceTypes.RT_GROUP_CURSOR)
 {
     for (UInt16 id = 0; id < iconFile.Icons.Count; id++)
     {
         var cursorResource = new CursorResource(iconFile.Icons[id], new ResourceId(id), _language);
         // cursor structure abuses planes and bits per pixel for cursor data
         cursorResource.HotspotX = iconFile.Icons[id].Header.wPlanes;
         cursorResource.HotspotY = iconFile.Icons[id].Header.wBitsPerPixel;
         Icons.Add(cursorResource);
     }
 }