Inheritance: IconDirectory
Esempio n. 1
0
        public IcoContainer(IcoContainer container)
            : base(container)
        {
            if (container.Directory == null)
                throw new InvalidOperationException("Container Directory is null");

            Directory = new IcoDirectory(container.Directory);
        }
Esempio n. 2
0
        public IcoContainer(IcoContainer container) :
            base(container)
        {
            if (container.Directory == null)
            {
                throw new InvalidOperationException("Container Directory is null");
            }

            Directory = new IcoDirectory(container.Directory);
        }
Esempio n. 3
0
        private void Parse(Stream icoStream)
        {
            Directory = new IcoDirectory(icoStream);

            Images = new IconImage[Directory.Entries.Length];

            for (var i = 0; i < Directory.Entries.Length; i++)
            {
                Images[i] = new IconImage(icoStream,
                                          (int)Directory.Entries[i].ImageOffset, SeekOrigin.Begin,
                                          (int)Directory.Entries[i].BytesInRes);
            }
        }
Esempio n. 4
0
        public static PeDirectory ToPe(this IcoDirectory directory)
        {
            if (directory == null)
            {
                throw new ArgumentNullException("directory");
            }

            if (directory.Entries == null || directory.Entries.Any(e => e == null))
            {
                throw new InvalidOperationException("Directory Entries are null");
            }

            return(new PeDirectory(directory)
            {
                Entries = directory.Entries.Select(e => e.ToPe()).ToArray()
            });
        }
Esempio n. 5
0
 public IcoDirectory(IcoDirectory directory) :
     base(directory)
 {
     Entries = directory.Entries.Select(e => new IcoDirectoryEntry(e)).ToArray();
 }
Esempio n. 6
0
 public IcoDirectory(IcoDirectory directory)
     : base(directory)
 {
     Entries = directory.Entries.Select(e => new IcoDirectoryEntry(e)).ToArray();
 }
Esempio n. 7
0
 public IcoContainer()
 {
     Directory = new IcoDirectory();
 }
Esempio n. 8
0
        private void Parse(Stream icoStream)
        {
            Directory = new IcoDirectory(icoStream);

            Images = new IconImage[Directory.Entries.Length];

            for (var i = 0; i < Directory.Entries.Length; i++)
                Images[i] = new IconImage(icoStream,
                    (int)Directory.Entries[i].ImageOffset, SeekOrigin.Begin,
                    (int)Directory.Entries[i].BytesInRes);
        }
Esempio n. 9
0
 public IcoContainer()
 {
     Directory = new IcoDirectory();
 }