示例#1
0
        private void openClick(object sender, RoutedEventArgs e)
        {
            SourceFile source = new SourceFile(codeText);
            ColorSyntaxVisitor visitor = new ColorSyntaxVisitor(codeText, flage);
            source.Accept(visitor);
            flage = !flage;

            if (flage == true)
                open.Content = "已经转换为C#程序";
        }
示例#2
0
 private void openClick(object sender, RoutedEventArgs e)
 {
     SourceFile source = new SourceFile();
     ColorSyntaxVisitor visitor = new ColorSyntaxVisitor(codeText);
     source.Accept(visitor);
 }