Exemple #1
0
        //--------------------------------------------------------------------
        // Purpose:
        //     Add a new bitmap file to the icon file
        //
        // Notes:
        //     None.
        //--------------------------------------------------------------------
        public void add(string fileName)
        {
            jimsIconEntry newEntry = new jimsIconEntry(fileName, mLocation);

            mLocation += newEntry.getLength();
            mEntries.Add(newEntry);
        }
Exemple #2
0
        //--------------------------------------------------------------------
        // Purpose:
        //     Load the ico file
        //
        // Notes:
        //     None.
        //--------------------------------------------------------------------
        public void load(string fileName)
        {
            BinaryReader theFile = new BinaryReader(File.Open(fileName, FileMode.Open));

            mHeader.load(theFile);

            for (int i = 0; i < mHeader.Count(); i++)
            {
                jimsIconEntry newEntry = new jimsIconEntry();
                newEntry.load(theFile);
                mEntries.Add(newEntry);
            }

            for (int i = 0; i < mHeader.Count(); i++)
            {
                mEntries[i].loadData(theFile);
            }

            theFile.Close();
        }