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++; } } }
public override void readContent(string path) { List <string> listContentPage = new List <string>(); wordProc wordproc = new wordProc(); listContentPage = wordproc.readDocFile(pathWordFile); int page = 1; foreach (string contentPage in listContentPage) { content = content + contentPage; List <Segment> tmp = new List <Segment>(); tmp = wordproc.splitTxtContentToSegment(contentPage, delimiters, page); listSegments.AddRange(tmp); page++; } }
public void replaceContent(string path) { wordProc wordproc = new wordProc(); wordproc.replaceContent(listSegments, path); }