多语言展示
当前在线:497今日阅读:2今日分享:38

在VS中添加DevExpress Document Server:[4]

如何在Visual Studio中添加无界面的.Net文档处理库DevExpress Document Server在中的单位转换库。
工具/原料
1

Visual Studio

2

DevExpress Document Server

方法/步骤
1

打开Visual Studio,然后通过选择FILE-New-Project…,创建一个新的Windows Forms Application项目。

2

添加引用,只添加DevExpress.Docs.v13.1.dll。

3

拖拽一个按钮控件到窗体中。

4

双击这个按钮,在按钮点击的处理程序中,插入以下代码:using DevExpress.UnitConversion;//...// The height is 5'4'.QuantityValue height = (5.0).Feet() + (4.0).Inches();string s = String.Format('The height is {0} ells or {1} meters.',    height.ToElls().Value.ToString('g3'), height.ToMeters().Value.ToString('g3'));MessageBox.Show(s);

5

运行项目,出现以下消息框。

推荐信息