Пример #1
0
        public override void readContent(string path)
        {
            txtProc txtProc = new txtProc();

            this.content      = txtProc.readTxtFile(path);
            this.listSegments = txtProc.splitTxtContentToSegment(this.content);
        }
Пример #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);
        }
Пример #3
0
        public override void createFileTranslateDocument()
        {
            txtProc txtProc = new txtProc();

            if (this.content.Length > 0)
            {
                foreach (Segment a in listSegments)
                {
                    tm tmp = a.getTM();
                    if (tmp.Target != null)
                    {
                        if (tmp.Target.Trim() != "")
                        {
                            this.content = txtProc.ReplaceFirst(this.content, tmp.Source, tmp.Target);
                        }
                    }
                }
            }
        }
Пример #4
0
        public string replaceContent()
        {
            txtProc txtProc        = new txtProc();
            string  contentReplace = this.content;

            if (this.content.Length > 0)
            {
                foreach (Segment a in listSegments)
                {
                    tm tmp = a.getTM();
                    if (tmp.Target != null)
                    {
                        if (tmp.Target.Trim() != "")
                        {
                            contentReplace = txtProc.ReplaceFirst(contentReplace, tmp.Source, tmp.Target);
                        }
                    }
                }
            }
            return(contentReplace);
        }