コード例 #1
0
        public override ResourceData FromFileToAdd(Stream stream, String extension, UInt16 langId, ResourceSource currentSource)
        {
            if (!IsExtension(extension, "CUR"))
            {
                throw new ArgumentException("cur is the only supported extension");
            }

            IconGroup group = new IconGroup(stream);

            group.BindToSource(currentSource, langId);

            return(new CursorDirectoryResourceData(group, null));
        }
コード例 #2
0
        public override ResourceData FromFileToAdd(Stream stream,
                                                   string extension,
                                                   ushort langId,
                                                   ResourceSource currentSource)
        {
            if (!IsExtension(extension, "ICO"))
            {
                throw new ArgumentException("ico is the only supported extension");
            }

            var group = new IconGroup(stream);

            group.BindToSource(currentSource, langId);

            return(new IconDirectoryResourceData(group, null));
        }