DevExpress控件安装、汉化使用教程
前言
DevExpress是一个庞大的控件库,也很是好用(没用过,听说),但是要收费。
网上关于DevExpress的教程满天飞,我找了一下午也没找到正确的安装、简单实用教程,还是自己摸索吧。
自己动手,丰衣足食。
安装
DevExpress不像其他控件库一样,直接引用或是附加个dll就可以使用,DevExpress是需要安装的,当然支持广泛,winform、asp.net/mvc、wpf等等。
DevExpress的安装包有本地安装和在线安装,可以去官网下载,这边提供本地安装包地址:http://pan.baidu.com/s/1bn9tV91;
安装步骤1:开始安装
安装步骤2:选择需要安装的模块
安装步骤3:修改安装路径
安装步骤4:正在安装
安装步骤5:安装完成
上面等几分钟就安装成功了,在网上找了个注册破解补丁可以安装下试试,下载地址:http://pan.baidu.com/s/1c0HzxLm;
在网上还找了一个破解的教程,但是没试过,大家可以下载试下,里面有教程,下载地址:http://pan.baidu.com/s/1o66pDPo
vs工具箱附加
关于工具箱附加,网上有的人说:在控制台转到目录E:\Program Files (x86)\DevExpress 13.2\Components\Tools(安装目录)下,执行下面的命令:ToolboxCreator.exe /ini:toolboxcreator.ini。如果要删除:ToolboxCreator.exe /ini:toolboxcreator.ini /remove。但是不知怎的,我安装完之后,Tools目录下并没有ToolboxCreator程序,然后在目录E:\Program Files (x86)\DevExpress\DXperience 13.1\Tools下找到了ToolboxCreator程序,然后命令行执行了下:
打开vs2010,在工具箱中找到:
只有这两项,感觉不太对,也可以通过工具箱附加,把命名空间都是DevExpress开头的控件附加到工具箱中,控件比较多,得一个一个的打钩,也可以附加自己需要的控件。
附:DevExpress控件那么多,我们怎么学啊,当然通过示例学习,DevExpress提供了很多的示例程序,在开始程序里找到
也可以根据路径打开,示例路径:C:\Users\Public\Documents\DXperience 13.1 Demos,打开我们可以看到很多项目的示例:
通过这些示例,我们可以更好的学习DevExpress控件的使用。
汉化
关于DevExpress汉化有两种方式,一种是引用Dxper.LocalizationCHS.Win.v13.1.4.dll文件,然后添加下面代码在窗体加载事件里。
1 private void frmMain_Load(object sender, EventArgs e) 2 { 3 DevExpress.XtraGrid.Localization.GridResLocalizer.Active = new Dxper.LocalizationCHS.Win.XtraGridCHS(); 4 DevExpress.XtraEditors.Controls.Localizer.Active = new Dxper.LocalizationCHS.Win.XtraEditorsCHS(); 5 DevExpress.XtraCharts.Localization.ChartResLocalizer.Active = new Dxper.LocalizationCHS.Win.XtraChartsCHS(); 6 DevExpress.XtraBars.Localization.BarLocalizer.Active = new Dxper.LocalizationCHS.Win.XtraBars(); 7 DevExpress.XtraLayout.Localization.LayoutLocalizer.Active = new Dxper.LocalizationCHS.Win.XtraLayoutCHS(); 8 DevExpress.XtraPrinting.Localization.PreviewLocalizer.Active = new Dxper.LocalizationCHS.Win.XtraPrintingCHS(); 9 DevExpress.XtraTreeList.Localization.TreeListResLocalizer.Active = new Dxper.LocalizationCHS.Win.XtraTreeListCHS(); 10 DevExpress.Office.Localization.OfficeResLocalizer.Active = new Dxper.LocalizationCHS.Win.OfficeCHS(); 11 DevExpress.XtraSpreadsheet.Localization.XtraSpreadsheetLocalizer.Active = new Dxper.LocalizationCHS.Win.XtraSpreadsheetCHS(); 12 }
添加这些代码要添加DevExpress的dll引用,dll文件在E:\Program Files (x86)\DevExpress\DXperience 13.1\Bin\Framework目录下,添加完后这边有几个问题:XtraBars()在Dxper.LocalizationCHS.Win类下并不存在此方法,我觉得应该是XtraBarsCHS()方法,另外最后一段代码,DevExpress.XtraSpreadsheet命名空间下并不存在Localization此类型,编译不通。
还有一种汉化方式是DevExpress中文控件网提供的,网址:http://www.devexpresscn.com/news/DevExpress-news-94.html,上面有教程,没试过。
后记
附上一张DevExpress示例程序效果图:
2024-10-11 21:59:24【出处】:https://www.cnblogs.com/xishuai/p/3554594.html
=======================================================================================
DevExpress 批处理汉化 以及客户端的汉化
DXperience汉化方法介绍
运用慧都提供的DXperience汉化包,能将最新版本的DXperience WinForm和ASP.NET控件界面、弹出框、右键菜单等汉化成中文,且能根据自己的需求定制个性化的DXperience本地化。结合汉化文档说明,仅需一行代码就可实现DXperience汉化,至少能节约30%的开发时间!下面就跟大家讲一讲DXperience的汉化方法。
怎样汉化DXperience
DXperience汉化方法总结起来,主要有以下几种方式:
1、利用已经汉化好的资源包;
2、使用本地对象类,利用代码汉化;
3、资源包和代码结合。
个人比较喜欢第一种方式,因为这种方法最简单实用。
DXperience汉化包怎么用
首先要先下载DXperience汉化包(DXperience资源包汉化 如需最新版本请联系客服购买,只需少量花费便可节约大量开发成本)。将所需汉化的资源zh-CHS中国 (简体) 、zh-CN中国 (中国)、zh-TW 中国 (台湾)拷贝到执行目录下,利用CurrentThread.CurrentUICulture加载资源包。参照代码如下:
static void Main() {
System.Threading.Thread.CurrentThread.CurrentUICulture =
new
System.Globalization.CultureInfo(
"zh-Hans"
);
System.Threading.Thread.CurrentThread.CurrentCulture =
new
System.Globalization.CultureInfo(
"zh-Hans"
);
Application.Run(new Form1()); }
如何修改DXperience汉化包
汉化包有一个跟DXperience控件同样的强名密钥文件StrongKey.snk。如果想编译资源文件,只要你有控件完整的源代码,重新指定强名密钥文件,获得自己的StrongKey.snk。具体实现可查阅MSDN Library。
拷贝StrongKey.snk从安装的源代码的目录"Program Files"Developer Express .NET vX.Y"Sources"DevExpress.Key" 到当前资源包的DevExpress.Key目录。(vX.Y为当前安装版本号)
打开资源包Localization.sln工程,根据下面提及的使用本地化方法找出要汉化的属性,当然如果你购买了源代码也可以查看源代码Localization类里面的本地化方法列出的变量来实现你需要的汉化。
重新生成资源文件,这时对应的Dll将在DevExpress.DLL文件夹中。
DXperience WebForm(ASPxControls)汉化效果图
DXperience WinForm汉化效果图
汉化部分控件的方法
1、下载DevExpress_.NET_Localization_Resources_14.2汉化包
2、解压后将zh-CN或zh-CHS复制到安装目录如D:\Program Files (x86)\DevExpress 14.2\Components\Bin\Framework
3、在开始菜中找到Visual Studio 命令提示(2010),并以管理员身份运行(WIN7,8)
4、切换命令行当前目录到D:\Program Files (x86)\DevExpress 14.2\Components\Bin\Framework\zh-CN
5、运行dir /B *.dll >>temp.bat,在当前目录中得到所有dll列表
6、用记事本打开D:\Program Files (x86)\DevExpress 14.2\Components\Bin\Framework\zh-CN\temp.bat
7、通过替换功能将 DevExpress.Charts.Designer.v14.2.resources.dll 处理成 gacutil -i DevExpress.Charts.Designer.v14.2.resources.dll
8、保存temp.bat
9、在命令行窗口中输入temp.bat
10、汉化完成,删除临时文件temp.bat
PS: 如果不是通过 Visual Studio 命令提示(2010) 执行会提示 :'gacutil' 不是内部或外部命令,也不是可运行的程序或批处理文件。
处理好的文件列表
gacutil -i DevExpress.Charts.Designer.v14.2.resources.dll gacutil -i DevExpress.Dashboard.v14.2.Core.resources.dll gacutil -i DevExpress.Dashboard.v14.2.Web.resources.dll gacutil -i DevExpress.Dashboard.v14.2.Win.resources.dll gacutil -i DevExpress.Data.v14.2.resources.dll gacutil -i DevExpress.DataAccess.v14.2.resources.dll gacutil -i DevExpress.DataAccess.v14.2.UI.resources.dll gacutil -i DevExpress.ExpressApp.HtmlPropertyEditor.Win.v14.2.resources.dll gacutil -i DevExpress.ExpressApp.PivotChart.v14.2.resources.dll gacutil -i DevExpress.ExpressApp.Reports.v14.2.resources.dll gacutil -i DevExpress.ExpressApp.Scheduler.v14.2.resources.dll gacutil -i DevExpress.ExpressApp.Scheduler.Web.v14.2.resources.dll gacutil -i DevExpress.ExpressApp.Security.v14.2.resources.dll gacutil -i DevExpress.ExpressApp.v14.2.resources.dll gacutil -i DevExpress.ExpressApp.Validation.v14.2.resources.dll gacutil -i DevExpress.ExpressApp.Web.v14.2.resources.dll gacutil -i DevExpress.ExpressApp.Win.v14.2.resources.dll gacutil -i DevExpress.Map.v14.2.Core.resources.dll gacutil -i DevExpress.Office.v14.2.Core.resources.dll gacutil -i DevExpress.Pdf.v14.2.Core.resources.dll gacutil -i DevExpress.PivotGrid.v14.2.Core.resources.dll gacutil -i DevExpress.Printing.v14.2.Core.resources.dll gacutil -i DevExpress.RichEdit.v14.2.Core.resources.dll gacutil -i DevExpress.Snap.v14.2.Core.resources.dll gacutil -i DevExpress.Snap.v14.2.Extensions.resources.dll gacutil -i DevExpress.Snap.v14.2.resources.dll gacutil -i DevExpress.Sparkline.v14.2.Core.resources.dll gacutil -i DevExpress.Spreadsheet.v14.2.Core.resources.dll gacutil -i DevExpress.Utils.v14.2.resources.dll gacutil -i DevExpress.Utils.v14.2.UI.resources.dll gacutil -i DevExpress.Web.ASPxHtmlEditor.v14.2.resources.dll gacutil -i DevExpress.Web.ASPxRichEdit.v14.2.resources.dll gacutil -i DevExpress.Web.ASPxScheduler.v14.2.resources.dll gacutil -i DevExpress.Web.ASPxSpellChecker.v14.2.resources.dll gacutil -i DevExpress.Web.ASPxSpreadsheet.v14.2.resources.dll gacutil -i DevExpress.Web.ASPxTreeList.v14.2.resources.dll gacutil -i DevExpress.Web.v14.2.resources.dll gacutil -i DevExpress.Xpf.Charts.v14.2.resources.dll gacutil -i DevExpress.Xpf.Controls.v14.2.resources.dll gacutil -i DevExpress.Xpf.Core.v14.2.resources.dll gacutil -i DevExpress.Xpf.Docking.v14.2.resources.dll gacutil -i DevExpress.Xpf.Gauges.v14.2.resources.dll gacutil -i DevExpress.Xpf.Grid.v14.2.Core.resources.dll gacutil -i DevExpress.Xpf.LayoutControl.v14.2.resources.dll gacutil -i DevExpress.Xpf.NavBar.v14.2.resources.dll gacutil -i DevExpress.Xpf.PdfViewer.v14.2.resources.dll gacutil -i DevExpress.Xpf.Printing.v14.2.resources.dll gacutil -i DevExpress.Xpf.PropertyGrid.v14.2.resources.dll gacutil -i DevExpress.Xpf.ReportDesigner.v14.2.resources.dll gacutil -i DevExpress.Xpf.Ribbon.v14.2.resources.dll gacutil -i DevExpress.Xpf.RichEdit.v14.2.resources.dll gacutil -i DevExpress.Xpf.Scheduler.v14.2.resources.dll gacutil -i DevExpress.Xpf.SpellChecker.v14.2.resources.dll gacutil -i DevExpress.Xpo.v14.2.resources.dll gacutil -i DevExpress.XtraBars.v14.2.resources.dll gacutil -i DevExpress.XtraCharts.v14.2.resources.dll gacutil -i DevExpress.XtraCharts.v14.2.Wizard.resources.dll gacutil -i DevExpress.XtraEditors.v14.2.resources.dll gacutil -i DevExpress.XtraGauges.v14.2.Core.resources.dll gacutil -i DevExpress.XtraGauges.v14.2.Presets.resources.dll gacutil -i DevExpress.XtraGrid.v14.2.resources.dll gacutil -i DevExpress.XtraLayout.v14.2.resources.dll gacutil -i DevExpress.XtraNavBar.v14.2.resources.dll gacutil -i DevExpress.XtraPdfViewer.v14.2.resources.dll gacutil -i DevExpress.XtraPivotGrid.v14.2.resources.dll gacutil -i DevExpress.XtraPrinting.v14.2.resources.dll gacutil -i DevExpress.XtraReports.v14.2.Extensions.resources.dll gacutil -i DevExpress.XtraReports.v14.2.resources.dll gacutil -i DevExpress.XtraReports.v14.2.Web.resources.dll gacutil -i DevExpress.XtraRichEdit.v14.2.Extensions.resources.dll gacutil -i DevExpress.XtraRichEdit.v14.2.resources.dll gacutil -i DevExpress.XtraScheduler.v14.2.Core.resources.dll gacutil -i DevExpress.XtraScheduler.v14.2.Extensions.resources.dll gacutil -i DevExpress.XtraScheduler.v14.2.Reporting.resources.dll gacutil -i DevExpress.XtraScheduler.v14.2.resources.dll gacutil -i DevExpress.XtraSpellChecker.v14.2.resources.dll gacutil -i DevExpress.XtraSpreadsheet.v14.2.resources.dll gacutil -i DevExpress.XtraTreeList.v14.2.resources.dll gacutil -i DevExpress.XtraVerticalGrid.v14.2.resources.dll gacutil -i DevExpress.XtraWizard.v14.2.resources.dll
2024-10-12 09:47:04【出处】:https://www.cnblogs.com/wordgao/p/4483664.html
=======================================================================================
关注我】。(●'◡'●)
如果,您希望更容易地发现我的新博客,不妨点击一下绿色通道的【因为,我的写作热情也离不开您的肯定与支持,感谢您的阅读,我是【Jack_孟】!
本文来自博客园,作者:jack_Meng,转载请注明原文链接:https://www.cnblogs.com/mq0036/p/18459441
【免责声明】本文来自源于网络,如涉及版权或侵权问题,请及时联系我们,我们将第一时间删除或更改!