Exemple #1
0
        /// <summary>
        /// Reads the object data from a dump store
        /// </summary>
        /// <param name="reader">reader to read the data</param>
        /// <param name="filesList">filelist from helpsystem</param>
        internal bool ReadDump(ref BinaryReader reader, IList <CHMFile> filesList)
        {
            int i = 0;

            _keyWord     = reader.ReadString();
            _isSeeAlso   = reader.ReadBoolean();
            _indent      = reader.ReadInt32();
            _chmFileName = reader.ReadString();

            foreach (CHMFile curFile in filesList)
            {
                if (curFile.ChmFilePath == _chmFileName)
                {
                    _chmFile = curFile;
                    break;
                }
            }

            if (_chmFile == null)
            {
                return(false);
            }

            int nCnt = reader.ReadInt32();

            for (i = 0; i < nCnt; i++)
            {
                string sIT = reader.ReadString();
                _infoTypeStrings.Add(sIT);
            }

            nCnt = reader.ReadInt32();

            _seeAlso = new string[nCnt];

            for (i = 0; i < nCnt; i++)
            {
                _seeAlso[i] = reader.ReadString();
            }

            nCnt = reader.ReadInt32();

            for (i = 0; i < nCnt; i++)
            {
                HtmlHelpIndexTopic topic = new HtmlHelpIndexTopic("", "", "", "");
                topic.SetChmInfo(_chmFile.CompileFile, _chmFile.ChmFilePath);
                topic.AssociatedFile = _chmFile;
                topic.ReadDump(ref reader);

                Topics.Add(topic);
            }

            return(true);
        }
Exemple #2
0
        /// <summary>
        /// Reads the object data from a dump store
        /// </summary>
        /// <param name="reader">reader to read the data</param>
        internal void ReadDump(ref BinaryReader reader)
        {
            int i = 0;

            _keyWord   = reader.ReadString();
            _isSeeAlso = reader.ReadBoolean();
            _indent    = reader.ReadInt32();

            int nCnt = reader.ReadInt32();

            for (i = 0; i < nCnt; i++)
            {
                string sIT = reader.ReadString();
                _infoTypeStrings.Add(sIT);
            }

            nCnt = reader.ReadInt32();

            _seeAlso = new string[nCnt];

            for (i = 0; i < nCnt; i++)
            {
                _seeAlso[i] = reader.ReadString();
            }

            nCnt = reader.ReadInt32();

            for (i = 0; i < nCnt; i++)
            {
                HtmlHelpIndexTopic topic = new HtmlHelpIndexTopic("", "", "", "");
                topic.AssociatedFile = _chmFile;
                topic.SetChmInfo(_chmFile.CompileFile, _chmFile.ChmFilePath);
                topic.ReadDump(ref reader);
                Topics.Add(topic);
            }
        }