DevExpress v10 汉化问题缺少程序集引用解决方案
DevExpress v10 汉化问题缺少程序集引用解决方案在项目中加入附件中的DevExpress.Localization.v10.1.dll引用
Winform: 在MDI MainForm 的FormLoad事件中加入以下代码: DevExpress.Utils.Localization.AccLocalizer.Active = new DevExpress.LocalizationCHS.DevExpressUtilsLocalizationCHS(); DevExpress.XtraBars.Localization.BarLocalizer.Active = new DevExpress.LocalizationCHS.DevExpressXtraBarsLocalizationCHS(); DevExpress.XtraCharts.Localization.ChartLocalizer.Active = new DevExpress.LocalizationCHS.DevExpressXtraChartsLocalizationCHS(); DevExpress.XtraEditors.Controls.Localizer.Active = new DevExpress.LocalizationCHS.DevExpressXtraEditorsLocalizationCHS(); DevExpress.XtraGrid.Localization.GridLocalizer.Active = new DevExpress.LocalizationCHS.DevExpressXtraGridLocalizationCHS(); DevExpress.XtraLayout.Localization.LayoutLocalizer.Active = new DevExpress.LocalizationCHS.DevExpressXtraLayoutLocalizationCHS(); DevExpress.XtraNavBar.NavBarLocalizer.Active = new DevExpress.LocalizationCHS.DevExpressXtraNavBarLocalizationCHS(); DevExpress.XtraPivotGrid.Localization.PivotGridLocalizer.Active = new DevExpress.LocalizationCHS.DevExpressXtraPivotGridLocalizationCHS(); DevExpress.XtraPrinting.Localization.PreviewLocalizer.Active = new DevExpress.LocalizationCHS.DevExpressXtraPrintingLocalizationCHS(); DevExpress.XtraReports.Localization.ReportLocalizer.Active = new DevExpress.LocalizationCHS.DevExpressXtraReportsLocalizationCHS(); DevExpress.XtraRichTextEdit.Localization.XtraRichTextEditLocalizer.Active = new DevExpress.LocalizationCHS.DevExpressXtraRichTextEditLocalizationCHS(); DevExpress.XtraRichEdit.Localization.XtraRichEditLocalizer.Active = new DevExpress.LocalizationCHS.DevExpressXtraRichEditLocalizationCHS(); DevExpress.XtraScheduler.Localization.SchedulerLocalizer.Active = new DevExpress.LocalizationCHS.DevExpressXtraSchedulerLocalizationCHS(); DevExpress.XtraScheduler.Localization.SchedulerExtensionsLocalizer.Active = new DevExpress.LocalizationCHS.DevExpressXtraSchedulerExtensionsLocalizationCHS(); DevExpress.XtraSpellChecker.Localization.SpellCheckerLocalizer.Active = new DevExpress.LocalizationCHS.DevExpressXtraSpellCheckerLocalizationCHS(); DevExpress.XtraTreeList.Localization.TreeListLocalizer.Active = new DevExpress.LocalizationCHS.DevExpressXtraTreeListLocalizationCHS(); DevExpress.XtraVerticalGrid.Localization.VGridLocalizer.Active = new DevExpress.LocalizationCHS.DevExpressXtraVerticalGridLocalizationCHS(); DevExpress.XtraWizard.Localization.WizardLocalizer.Active = new DevExpress.LocalizationCHS.DevExpressXtraWizardLocalizationCHS(); Webform: Default.aspx的Page_Load事件中加入以下代码: DevExpress.Web.ASPxClasses.Localization.ASPxperienceLocalizer.Active = new DevExpress.LocalizationCHS.DevExpressWebASPxClassesLocalizationCHS(); DevExpress.Web.ASPxEditors.Localization.ASPxEditorsLocalizer.Active = new DevExpress.LocalizationCHS.DevExpressWebASPxEditorsLocalizationCHS(); DevExpress.Web.ASPxGridView.Localization.ASPxGridViewLocalizer.Active = new DevExpress.LocalizationCHS.DevExpressWebASPxGridViewLocalizationCHS(); DevExpress.Web.ASPxHtmlEditor.Localization.ASPxHtmlEditorLocalizer.Active = new DevExpress.LocalizationCHS.DevExpressWebASPxHtmlEditorLocalizationCHS(); DevExpress.Web.ASPxScheduler.Localization.ASPxSchedulerLocalizer.Active = new DevExpress.LocalizationCHS.DevExpressWebASPxSchedulerLocalizationCHS(); DevExpress.Web.ASPxSpellChecker.Localization.ASPxSpellCheckerLocalizer.Active = new DevExpress.LocalizationCHS.DevExpressWebASPxSpellCheckerLocalizationCHS(); DevExpress.Web.ASPxTreeList.Localization.ASPxTreeListLocalizer.Active = new DevExpress.LocalizationCHS.DevExpressWebASPxTreeListLocalizationCHS(); WPF: DevExpress.Wpf.Editors.Localization.EditorLocalizer.Active = new DevExpress.LocalizationCHS.DevExpressWpfEditorsLocalizationCHS(); DevExpress.Wpf.Grid.Localization.GridControlLocalizer.Active = new DevExpress.LocalizationCHS.DevExpressWpfGridLocalizationCHS(); DevExpress.Wpf.NavBar.Localization.NavBarLocalizer.Active = new DevExpress.LocalizationCHS.DevExpressWpfNavBarLocalizationCHS(); 注:若在项目中没有用到相关控件,则不需要创建类的实例。例如:沒有使用到XtraScheduler控件就不需要。 DevExpress.XtraScheduler.Localization.SchedulerLocalizer.Active = new DevExpress.LocalizationCHS.DevExpressXtraSchedulerLocalizationCHS(); 以下sources为建立界面风格菜单,打开用户设置的界面风格,语言: DevExpress.FOSOYO.LookAndFeelSettings.Load("FOSOYO.ini"); DevExpress.FOSOYO.LanguageSettings.Load("FOSOYO.ini"); //DevMenu new DevExpress.FOSOYO.DevExpressLookAndFeelMenu(barManager1, barSubItem1, defaultLookAndFeel1); //DevRibbonMenu new DevExpress.FOSOYO.DevExpressRibbonMenu(ribbon, ribbonPageGroup1, defaultLookAndFeel1, true); //VS2002 2003Menu new DevExpress.FOSOYO.VS2003LookAndFeelMenu(this, defaultLookAndFeel1, "FOSOYO"); //VS2005 2008Menu new DevExpress.FOSOYO.VS20052008LookAndFeelMenu(this, PaintStyle); 在FormClosing事件中加入以下Source,保存用户设置的界面风格,语言: DevExpress.FOSOYO.LookAndFeelSettings.Save("FOSOYO.ini"); DevExpress.FOSOYO.LanguageSettings.Save("FOSOYO.ini"); 特别强调这里一定用很多人按照上面的步骤后报错,“xxx”中不存在类型或命名空间名称“Localization”(是缺少程序集引用吗?),运行出现了错误和警告。 一般的话一定是关注错误的,但是问题所在是警告如图 看到“目标框架”了吧,其实问题出在这里,一般用vs2010建立程序它都帮你选择了NET 4 Client Profile这个架构,正因为这个架构是相对NET Framework 4精简,所以导致汉化引用一些东西没有,没有细心看很难发觉这个错误。这个问题解决方法是项目右键属性进入里面. 目标架构改成NET Framework 4问题就解决了。 转自:http://www.cnblogs.com/CookBlack/archive/2010/11/20/1882339.html 本站责任编辑。 本文来源:
参考文档:
Assembly.Load, LoadFrom加载程序集无法释放资源的解决方案 DevExpress Grid导出PDF中文乱码解决方案 Winform+DevExpress框架之独立图片存储解决方案|C/S框架网 安装GIT msi 程序出现the error code is 2503解决方案 DevExpress表格某个列不显示数据解决方案(图) ASP.NET WebApi缺少System.Web.Http.Cors引用解决方案 VS2017打开vs解决方案提示自动升级DevExpress 17.x CSFramework开发框架V5基础架构 - VS解决方案DevExpress 15.x 升级 17.x vs编译ASP.NET提示失败1个,error CS0246: 未能找到类型或命名空间名“CSFrameworkV5”(是否缺少 using 指令或程序集引用? WCF开发框架-IIS启用net.tcp协议发现不会自动执行Global应用程序解决方案 升级程序MySQL测试报告:Packets larger than max_allowed_packet are not allowed 的解决方案 WCF开发环境客户端调试服务端跟踪代码不能命中断点解决方案 C#源代码安全缺陷与提高源代码质量解决方案 C# 调用Process.Start 请求的操作需要提升解决方案 WCF采用Message安全模式运行出错:安全包中没有可用的凭证解决方案
其它资料:
什么是C/S结构? | C/S框架核心组成部分 | C/S框架-WebService部署图 | C/S框架-权限管理 | C/S结构系统框架 - 5.1旗舰版介绍 | C/S结构系统框架 - 功能介绍 | C/S结构系统框架 - 产品列表 | C/S结构系统框架 - 应用展示(图) | 三层体系架构详解 | C/S架构轻量级快速开发框架 | C/S框架网客户案例 | WebApi快速开发框架 | C/S框架代码生成器 | 用户授权注册软件系统 | 版本自动升级软件 | 数据库底层应用框架 | CSFramework.CMS内容管理系统 | |