コード例 #1
0
        private LineViewModel ParseLine(string line)
        {
            var lineViewModel = new LineViewModel(this);
            var matchList     = Regex.Matches(line, CSHARP_TOKENS + @"|.|\s+", RegexOptions.None);

            foreach (Match match in matchList)
            {
                var token = new TokenViewModel(lineViewModel, match.Value, Color.gray);
                GetColor(token);
                lineViewModel.Tokens.AddLast(token);
            }
            return(lineViewModel);
        }
コード例 #2
0
 public TokenViewModel(LineViewModel lineViewModel, string text, Color color)
 {
     _lineViewModel = lineViewModel;
     Text           = text;
     Color          = color;
 }
コード例 #3
0
 public TokenViewModel(LineViewModel lineViewModel)
 {
     LineViewModel = lineViewModel;
 }