找回密码
 立即注册

QQ登录

只需一步,快速开始

kysea
社区贡献组   /  发表于:2015-4-3 13:27  /   查看:4159  /  回复:1
Expressions (or scripts – the two terms are used interchangeably here) can be used in various places throughout the document. Mark an expression by surrounding it by square brackets, as in the following code:

?        Visual Basic
Dim doc As New C1PrintDocument() doc.Body.Children.Add(New RenderText("2 + 2 = [2+2]"))

?        C#
C1PrintDocument doc = new C1PrintDocument(); doc.Body.Children.Add(new RenderText("2 + 2 = [2+2]"));

This code will produce the following text in the generated document:
2 + 2 = 4

In this case, the "[2+2]" is interpreted as an expression, and calculated to produce the resulting text.

详情请参见文档
24-Expressions.docx (127.51 KB, 下载次数: 416)

1 个回复

倒序浏览
kysea
社区贡献组   /  发表于:2015-4-13 09:32:00
沙发
恭喜GCDN用户考古程序猿已经完成翻译,获得 GCDN金币21798!

翻译文档如下:

24-表达式.docx (70.29 KB, 下载次数: 388)
回复 使用道具 举报
您需要登录后才可以回帖 登录 | 立即注册
返回顶部