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#程序"; }
private void openClick(object sender, RoutedEventArgs e) { SourceFile source = new SourceFile(); ColorSyntaxVisitor visitor = new ColorSyntaxVisitor(codeText); source.Accept(visitor); }