Пример #1
0
        public override void readContent(string path)
        {
            List <string> listContentPage = new List <string>();
            wordProc      wordproc        = new wordProc();

            listContentPage = wordproc.readDocFile(path);

            if (listContentPage != null)
            {
                int page = 1;
                foreach (string contentPage in listContentPage)
                {
                    content = content + contentPage;
                    Console.WriteLine(contentPage.Length);
                    contentpage contentpage = new contentpage();
                    contentpage.content = contentPage;
                    contentpage.page    = page;
                    this.listcontentpage.Add(contentpage);
                    List <Segment> tmp = new List <Segment>();
                    tmp = wordproc.splitTxtContentToSegment(contentPage, delimiters, page, this.fileName);
                    listSegments.AddRange(tmp);
                    page++;
                }
            }
        }
Пример #2
0
        public override void readContent(string path)
        {
            txtProc txtProc = new txtProc();

            this.content = txtProc.readTxtFile(path);

            contentpage contentpage = new contentpage();

            contentpage.content = this.content;
            contentpage.page    = 1;
            listcontentpage.Add(contentpage);

            //this.listSegments = txtProc.splitTxtContentToSegment(this.content,delimiters,this.fileName);
            this.listSegments = txtProc.splitTxtContentToSegment2(this.content, delimiters, this.fileName);
        }