Exemplo n.º 1
0
        /// <summary>Associates all of the IconImages in this directory with the ResourceSource by creating IconCursorResourceData instances for each IconImage (with the specified Lang)</summary>
        public void BindToSource(ResourceSource source, UInt16 langId)
        {
            IconCursorImageResourceDataFactory factory = GetImageFactory();

            ResourceTypeIdentifier typeId = Type == IconType.Icon ? _iiTypeId : _ciTypeId;

            foreach (IconImage image in _images)
            {
                IconCursorImageResourceData rd = (IconCursorImageResourceData)factory.FromFileData(null, image.ImageData, Type == IconType.Icon);

                image.ResourceDataTyped = rd;

                source.Add(typeId, source.GetUnusedName(typeId), langId, rd);
            }
        }
Exemplo n.º 2
0
        private IconCursorImageResourceData GetRD(Byte[] data)
        {
            IconCursorImageResourceDataFactory factory = GetImageFactory();

            return(factory.FromFileData(null, data, Type == IconType.Icon));
        }