Пример #1
0
        //, string imagesPdbFilePath)
        // takes destination names for .pdb files. May throw file-related exceptions.
        public void save(string catalogName, string descrPdbFilePath)
        {
            int LINES_PER_CHUNK = 200;

            PalmPdbFormat ppf = new PalmPdbFormat();

            FileStream fsIn = new FileStream(m_descrFilePath, FileMode.Open, FileAccess.Read, FileShare.Read);
            TextReader textReader = new StreamReader(fsIn);

            /*
            // create a .pdb file from text, broken into chunks of reasonable size to fit into 32kb/record limitation:
            ppf.MakeTextPdb("descr", LINES_PER_CHUNK, textReader, descrPdbFilePath);

            fsIn.Close();

            // pack all .bmp files from the specified source folder into a .pdb file:
            ppf.PackImagesIntoPdb(catalogName, m_camtrackFolderPath, imagesPdbFilePath);
            */

            ppf.PackImagesAndDescrIntoPdb(catalogName, m_camtrackFolderPath, descrPdbFilePath, LINES_PER_CHUNK, textReader);

            fsIn.Close();
        }