DevExpress 第三方控件汉化代码和使用方法,Dev测试版本为9.3.4,可适用于多个版本。
使用方法:
1.先将该类生成的Dll导入工程中 ,也可以不生成dll,把该类放到项目中就行了。
2.在你的From_Load()或者program.cs中实例化该类即可
DevExpress.XtraEditors.Controls 此控件包中包含的控件最多,包括文本框,下拉列表,按钮,等等
DevExpress.XtraGrid 网格
DevExpress.XtraBars 菜单栏 和 工具栏
DevExpress.XtraNavBar 导航条
DevExpress.XtraPrinting 报表打印相关
DevExpress.XtraReports 报表
DevExpress.XtraTreeList 树
DevExpress.XtraVerticalGrid
using System;
using DevExpress.XtraEditors.Controls;
using DevExpress.XtraGrid.Localization;
using DevExpress.XtraBars.Customization;
using DevExpress.XtraBars.Localization;
using DevExpress.XtraNavBar;
using DevExpress.XtraPrinting.Localization;
using DevExpress.XtraReports.Localization;
using DevExpress.XtraTreeList.Localization;
using DevExpress.XtraVerticalGrid.Localization;
11:
12:
namespace ChineseLanguage
14: {
class Chinese
16: {
public Chinese()
18: {
new XtraEditors_CN();
new XtraGrid_CN();
new XtraBar_CN();
new XtraBarsCustomizationLocalization_CN();
new XtraNavBar_CN();
new XtraPrinting_CN();
new XtraReports_CN();
new XtraTreeList_CN();
new XtraVerticalGrid_CN();
28: }
29: }
30:
31:
class XtraEditors_CN :Localizer
33: {
public XtraEditors_CN()
35: {
//
// TODO: 在此处添加构造函数逻辑
//
39: }
string Language
41: {
42: get
43: {
;
45: }
46: }
47:
string GetLocalizedString(StringId id)
49: {
switch(id)
51: {
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
base.GetLocalizedString(id);
base.GetLocalizedString(id);
base.GetLocalizedString(id);;
base.GetLocalizedString(id);
base.GetLocalizedString(id);
base.GetLocalizedString(id);
base.GetLocalizedString(id);
base.GetLocalizedString(id);
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
122: }
base.GetLocalizedString(id);
124: }
125:
126: }
127:
128:
class XtraGrid_CN :GridLocalizer
130: {
string Language
132: {
133: get
134: {
;
136: }
137: }
138:
string GetLocalizedString(GridStringId id)
140: {
switch(id)
142: {
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
206: }
base.GetLocalizedString(id);
208: }
209: }
210:
211:
class XtraBar_CN :BarLocalizer
213: {
string Language
215: {
216: get
217: {
;
219: }
220: }
221:
string GetLocalizedString(BarString id)
223: {
switch(id)
225: {
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
243:
244: }
base.GetLocalizedString(id);
246: }
247: }
248:
249:
class XtraBarsCustomizationLocalization_CN : CustomizationControl
251: {
null;
253:
public XtraBarsCustomizationLocalization_CN()
255: {
// This call is required by the Windows.Forms Form Designer.
257: InitializeComponent();
258:
// TODO: Add any initialization after the InitForm call
260:
261: }
262:
bool disposing)
264: {
if (disposing)
266: {
null)
268: {
269: components.Dispose();
270: }
271: }
base.Dispose(disposing);
273: }
274:
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
void InitializeComponent()
281: {
this.tpOptions.SuspendLayout();
this.tpCommands.SuspendLayout();
this.tpToolbars.SuspendLayout();
this.toolBarsList)).BeginInit();
this.lbCommands)).BeginInit();
this.lbCategories)).BeginInit();
this.cbOptionsShowFullMenus.Properties)).BeginInit();
this.cbOptions_showFullMenusAfterDelay.Properties)).BeginInit();
this.cbOptions_showTips.Properties)).BeginInit();
this.cbOptions_ShowShortcutInTips.Properties)).BeginInit();
this.tabControl)).BeginInit();
this.tabControl.SuspendLayout();
this.tbNBDlgName.Properties)).BeginInit();
this.pnlNBDlg.SuspendLayout();
this.cbOptions_largeIcons.Properties)).BeginInit();
this.cbOptions_MenuAnimation.Properties)).BeginInit();
this.SuspendLayout();
299:
300:
;
;
;
;
;
;
;
;
new System.Drawing.Size(354, 246);
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
this.lbCommands.Appearance.BackColor = System.Drawing.SystemColors.Window;
true;
;
false);
false);
false);
this.toolBarsList)).EndInit();
this.lbCommands)).EndInit();
this.lbCategories)).EndInit();
this.cbOptionsShowFullMenus.Properties)).EndInit();
this.cbOptions_showFullMenusAfterDelay.Properties)).EndInit();
this.cbOptions_showTips.Properties)).EndInit();
this.cbOptions_ShowShortcutInTips.Properties)).EndInit();
this.tabControl)).EndInit();
false);
this.tbNBDlgName.Properties)).EndInit();
false);
this.cbOptions_largeIcons.Properties)).EndInit();
this.cbOptions_MenuAnimation.Properties)).EndInit();
false);
346:
347: }
#endregion
349: }
350:
351:
class XtraNavBar_CN :NavBarLocalizer
353: {
string Language
355: {
356: get
357: {
;
359: }
360: }
361:
string GetLocalizedString(NavBarStringId id)
363: {
switch(id)
365: {
;
;
;
;
370: }
base.GetLocalizedString(id);
372: }
373: }
374:
375:
class XtraPrinting_CN :PreviewLocalizer
377: {
string Language
379: {
380: get
381: {
;
383: }
384: }
385:
string GetLocalizedString(PreviewStringId id)
387: {
switch(id)
389: {
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
510: }
base.GetLocalizedString(id);
512: }
513: }
514:
515:
class XtraReports_CN :ReportLocalizer
517: {
string Language
519: {
520: get
521: {
;
523: }
524: }
525:
string GetLocalizedString(ReportStringId id)
527: {
switch(id)
529: {
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
668: }
base.GetLocalizedString(id);
670: }
671: }
672:
673:
class XtraTreeList_CN :TreeListLocalizer
675: {
string Language
677: {
678: get
679: {
;
681: }
682: }
683:
string GetLocalizedString(TreeListStringId id)
685: {
switch(id)
687: {
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
711: }
base.GetLocalizedString(id);
713: }
714: }
715:
716:
class XtraVerticalGrid_CN :VGridLocalizer
718: {
string Language
720: {
721: get
722: {
;
724: }
725: }
string GetLocalizedString(VGridStringId id)
727: {
switch(id)
729: {
;
;
;
;
;
;
;
;
;
739: }
base.GetLocalizedString(id);
741: }
742: }
743:
744: }