Exemple #1
0
        private void ParseSegemnts(Row Row)
        {
            //skapa segment för raden och sätt start och endsegment för raden
            Row.Clear();
            string    k  = Row.Text;
            TextStyle st = new TextStyle();

            st.ForeColor = Color.Red;
            ParseTools.AddString(k, Row, st, null);
            return;
        }
Exemple #2
0
        private void ParseText(Row Row, Segment CurrentSegment, string Text)
        {
            int  CurrentPosition = 0;
            bool HasComplex      = true;

            while (true)
            {
                ScanResult_Word Word = GetNextWord(Text, CurrentSegment, CurrentPosition, ref HasComplex);

                if (!Word.HasContent)
                {
                    ParseTools.AddString(Text.Substring(CurrentPosition), Row, CurrentSegment.BlockType.Style, CurrentSegment);
                    break;
                }
                else
                {
                    ParseTools.AddString(Text.Substring(CurrentPosition, Word.Position - CurrentPosition), Row, CurrentSegment.BlockType.Style, CurrentSegment);
                    ParseTools.AddPatternString(Word.Token, Row, Word.Pattern, Word.ParentList.Style, CurrentSegment, false);
                    CurrentPosition = Word.Position + Word.Token.Length;
                }
            }
        }