• 00
  • :
  • 00
  • :
  • 00

DEV开发之汉化

public class Chinese
 {
     public Chinese()
     {
         Localizer.Active = new XtraEditors_CN();
         GridLocalizer.Active = new XtraGrid_CN();
         BarLocalizer.Active = new XtraBar_CN();
         BarLocalizer.Active.Customization = new XtraBarsCustomizationLocalization_CN();
         NavBarLocalizer.Active = new XtraNavBar_CN();
         PreviewLocalizer.Active = new XtraPrinting_CN();
         //ReportLocalizer.Active = new XtraReports_CN();
         TreeListLocalizer.Active = new XtraTreeList_CN();
         //VGridLocalizer.Active = new XtraVerticalGrid_CN();
          
     }
 }


 public class XtraEditors_CN : Localizer
 {
     public XtraEditors_CN()
     {
         //
         // TODO: 在此处添加构造函数逻辑
         //
     }
     public override string Language
     {
         get
         {
             return "简体中文";
         }
     }

     public override string GetLocalizedString(StringId id)
     {
         switch (id)
         {
             case StringId.TextEditMenuCopy: return "复制(&C)";
             case StringId.TextEditMenuCut: return "剪切(&T)";
             case StringId.TextEditMenuDelete: return "删除(&D)";
             case StringId.TextEditMenuPaste: return "粘贴(&P)";
             case StringId.TextEditMenuSelectAll: return "全选(&A)";
             case StringId.TextEditMenuUndo: return "撤消(&U)";
             case StringId.UnknownPictureFormat: return "未知图片格式";
             case StringId.DateEditToday: return "今天";
             case StringId.DateEditClear: return "清空";
             case StringId.DataEmpty: return "无图像";
             case StringId.ColorTabWeb: return "网页";
             case StringId.ColorTabSystem: return "系统";
             case StringId.ColorTabCustom: return "自定义";
             case StringId.CheckUnchecked: return "未选择";
             case StringId.CheckIndeterminate: return "不确定";
             case StringId.CheckChecked: return "已选择";
             case StringId.CaptionError: return "标题错误";
             case StringId.Cancel: return "取消";
             case StringId.CalcError: return "计算错误";
             case StringId.CalcButtonBack: return base.GetLocalizedString(id);
             case StringId.CalcButtonC: return base.GetLocalizedString(id);
             case StringId.CalcButtonCE: return base.GetLocalizedString(id); ;
             case StringId.CalcButtonMC: return base.GetLocalizedString(id);
             case StringId.CalcButtonMR: return base.GetLocalizedString(id);
             case StringId.CalcButtonMS: return base.GetLocalizedString(id);
             case StringId.CalcButtonMx: return base.GetLocalizedString(id);
             case StringId.CalcButtonSqrt: return base.GetLocalizedString(id);
             case StringId.OK: return "确定";
             case StringId.PictureEditMenuCopy: return "复制(&C)";
             case StringId.PictureEditMenuCut: return "剪切(&T)";
             case StringId.PictureEditMenuDelete: return "删除(&D)";
             case StringId.PictureEditMenuLoad: return "加载(&L)";
             case StringId.PictureEditMenuPaste: return "粘贴(&P)";
             case StringId.PictureEditMenuSave: return "保存(&S)";
             case StringId.PictureEditOpenFileError: return "错误图片格式";
             case StringId.PictureEditOpenFileErrorCaption: return "打开错误";
             case StringId.PictureEditOpenFileFilter: return "位图文件(*.bmp)|*.bmp|GIF动画 (*.gif)|*.gif|JPEG(*.jpg;*.jpeg)|*.jpg;*.jpeg|ICO(*.ico)|*.ico|所有图片文件|*.bmp;*.gif;*.jpeg;*.jpg;*.ico|所有文件(*.*)|*.*";
             case StringId.PictureEditOpenFileTitle: return "打开";
             case StringId.PictureEditSaveFileFilter: return "位图文件(*.bmp)|*.bmp|GIF动画(*.gif)|*.gif|JPEG(*.jpg)|*.jpg";
             case StringId.PictureEditSaveFileTitle: return "保存为";
             case StringId.TabHeaderButtonClose: return "关闭";
             case StringId.TabHeaderButtonNext: return "下一页";
             case StringId.TabHeaderButtonPrev: return "上一页";
             case StringId.XtraMessageBoxAbortButtonText: return "中断(&A)";
             case StringId.XtraMessageBoxCancelButtonText: return "取消(&C)";
             case StringId.XtraMessageBoxIgnoreButtonText: return "忽略(&I)";
             case StringId.XtraMessageBoxNoButtonText: return "否(&N)";
             case StringId.XtraMessageBoxOkButtonText: return "确定(&O)";
             case StringId.XtraMessageBoxRetryButtonText: return "重试(&R)";
             case StringId.XtraMessageBoxYesButtonText: return "是(&Y)";
             case StringId.ImagePopupEmpty: return "(空)";
             case StringId.ImagePopupPicture: return "(图片)";
             case StringId.InvalidValueText: return "无效的值";
             case StringId.LookUpEditValueIsNull: return "[无数据]";
             case StringId.LookUpInvalidEditValueType: return "无效的数据类型";
             case StringId.MaskBoxValidateError: return "输入数值不完整. 是否须要修改? 是 - 回到编辑模式以修改数值. 否 - 保持原来数值. 取消 - 回复原来数值. ";
             case StringId.NavigatorAppendButtonHint: return "添加";
             case StringId.NavigatorCancelEditButtonHint: return "取消编辑";
             case StringId.NavigatorEditButtonHint: return "编辑";
             case StringId.NavigatorEndEditButtonHint: return "结束编辑";
             case StringId.NavigatorFirstButtonHint: return "第一条";
             case StringId.NavigatorLastButtonHint: return "最后一条";
             case StringId.NavigatorNextButtonHint: return "下一条";
             case StringId.NavigatorNextPageButtonHint: return "下一页";
             case StringId.NavigatorPreviousButtonHint: return "上一条";
             case StringId.NavigatorPreviousPageButtonHint: return "上一页";
             case StringId.NavigatorRemoveButtonHint: return "删除";
             case StringId.NavigatorTextStringFormat: return "记录{0}/{1}";
             case StringId.None: return "";
             case StringId.NotValidArrayLength: return "无效的数组长度.";
         }
         return base.GetLocalizedString(id);
     }

 }


 public class XtraGrid_CN : GridLocalizer
 {
     public override string Language
     {
         get
         {
             return "简体中文";
         }
     }

     public override string GetLocalizedString(GridStringId id)
     {
         switch (id)
         {
             case GridStringId.CardViewNewCard: return "新卡片";
             case GridStringId.CardViewQuickCustomizationButton: return "自定义格式";
             case GridStringId.CardViewQuickCustomizationButtonFilter: return "筛选";
             case GridStringId.CardViewQuickCustomizationButtonSort: return "排序";
             case GridStringId.ColumnViewExceptionMessage: return "是否确定修改?";
             case GridStringId.CustomFilterDialog2FieldCheck: return "字段";
             case GridStringId.CustomFilterDialogCancelButton: return "取消";
             case GridStringId.CustomFilterDialogCaption: return "条件为:";
                  
             case GridStringId.CustomFilterDialogEmptyOperator: return "空值";
             case GridStringId.CustomFilterDialogFormCaption: return "清除筛选条件(&L)";
             case GridStringId.CustomFilterDialogOkButton: return "确定(&O)";
             case GridStringId.CustomFilterDialogRadioAnd: return "和(&A)";
             case GridStringId.CustomFilterDialogRadioOr: return "或者(&O)";
             case GridStringId.CustomizationBands: return "分区";
             case GridStringId.CustomizationCaption: return "自定义显示字段";
             case GridStringId.CustomizationColumns: return "";
             case GridStringId.FileIsNotFoundError: return "文件{0}没找到!";
             case GridStringId.GridGroupPanelText: return "拖曳一列页眉在此进行排序";
             case GridStringId.GridNewRowText: return "单击这里新增一行";
             case GridStringId.GridOutlookIntervals: return "一个月以上;上个月;三周前;两周前;上周;;;;;;;;昨天;今天;明天; ;;;;;;;下周;两周后;三周后;下个月;一个月之后;";
             case GridStringId.MenuColumnBestFit: return "自动调整字段宽度";
             case GridStringId.MenuColumnBestFitAllColumns: return "自动调整所有字段宽度";
             case GridStringId.MenuColumnClearFilter: return "清除筛选条件";
             case GridStringId.MenuColumnColumnCustomization: return "显示/隐藏字段";
             case GridStringId.MenuColumnFilter: return "筛选";
             case GridStringId.MenuColumnGroup: return "按此列分组";
             case GridStringId.MenuColumnGroupBox: return "分组区";
             case GridStringId.MenuColumnSortAscending: return "升序排序";
             case GridStringId.MenuColumnSortDescending: return "降序排序";
             case GridStringId.MenuColumnUnGroup: return "取消分组";
             case GridStringId.MenuFooterAverage: return "平均";
             case GridStringId.MenuFooterAverageFormat: return "平均={0:#.##}";
             case GridStringId.MenuFooterCount: return "计数";
             case GridStringId.MenuFooterCountFormat: return "{0}";
             case GridStringId.MenuFooterMax: return "最大值";
             case GridStringId.MenuFooterMaxFormat: return "最大值={0}";
             case GridStringId.MenuFooterMin: return "最小";
             case GridStringId.MenuFooterMinFormat: return "最小值={0}";
             case GridStringId.MenuFooterNone: return "没有";
             case GridStringId.MenuFooterSum: return "合计";
             case GridStringId.MenuFooterSumFormat: return "求和={0:#.##}";
             case GridStringId.MenuGroupPanelClearGrouping: return "取消所有分组";
             case GridStringId.MenuGroupPanelFullCollapse: return "收缩全部分组";
             case GridStringId.MenuGroupPanelFullExpand: return "展开全部分组";
             case GridStringId.PopupFilterAll: return "(所有)";
             case GridStringId.PopupFilterBlanks: return "(空值)";
             case GridStringId.PopupFilterCustom: return "(自定义)";
             case GridStringId.PopupFilterNonBlanks: return "(非空值)";
             case GridStringId.PrintDesignerBandedView: return "打印设置(区域模式)";
             case GridStringId.PrintDesignerBandHeader: return "区标题";
             case GridStringId.PrintDesignerCardView: return "打印设置(卡片模式)";
             case GridStringId.PrintDesignerDescription: return "为当前视图设置不同的打印选项.";
             case GridStringId.PrintDesignerGridView: return "打印设置(表格模式)";
             case GridStringId.WindowErrorCaption: return "错误";
         }
         return base.GetLocalizedString(id);
     }
 }


 public class XtraBar_CN : BarLocalizer
 {
     public override string Language
     {
         get
         {
             return "简体中文";
         }
     }

     public override string GetLocalizedString(BarString id)
     {
         switch (id)
         {
             case BarString.AddOrRemove: return "新增或删除按钮(&A)";
             case BarString.CustomizeButton: return "自定义(&C)";
             case BarString.CustomizeWindowCaption: return "自定义";
             case BarString.MenuAnimationFade: return "减弱";
             case BarString.MenuAnimationNone: return "";
             case BarString.MenuAnimationRandom: return "任意";
             case BarString.MenuAnimationSlide: return "滑动";
             case BarString.MenuAnimationSystem: return "(系统默认值)";
             case BarString.MenuAnimationUnfold: return "展开";
             case BarString.NewToolbarCaption: return "新建工具栏";
             case BarString.None: return "";
             case BarString.RenameToolbarCaption: return "重新命名";
             case BarString.ResetBar: return "是否确实要重置对 '{0}' 工具栏所作的修改?";
             case BarString.ResetBarCaption: return "自定义";
             case BarString.ResetButton: return "重设工具栏(&R)";
             case BarString.ToolBarMenu: return "重设(&R)$删除(&D)$!命名(&N)$!标准(&L)$总使用文字(&T)$在菜单中只用文字(&O)$图像与文本(&A)$!开始一组(&G)$常用的(&M)";
             case BarString.ToolbarNameCaption: return "工具栏名称(&T):";

         }
         return base.GetLocalizedString(id);
     }
 }

  
 public class XtraBarsCustomizationLocalization_CN : CustomizationControl
 {
     private System.ComponentModel.Container components = null;

     public XtraBarsCustomizationLocalization_CN()
     {
         // This call is required by the Windows.Forms Form Designer.
         InitializeComponent();

         // TODO: Add any initialization after the InitForm call

     }

     protected override void Dispose(bool disposing)
     {
         if (disposing)
         {
             if (components != null)
             {
                 components.Dispose();
             }
         }
         base.Dispose(disposing);
     }

     #region Component Designer generated code
     /// <summary> 
     /// Required method for Designer support - do not modify 
     /// the contents of this method with the code editor.
     /// </summary>
     private void InitializeComponent()
     {
         this.tpOptions.SuspendLayout();
         this.tpCommands.SuspendLayout();
         this.tpToolbars.SuspendLayout();
         ((System.ComponentModel.ISupportInitialize)(this.toolBarsList)).BeginInit();
         ((System.ComponentModel.ISupportInitialize)(this.lbCommands)).BeginInit();
         ((System.ComponentModel.ISupportInitialize)(this.lbCategories)).BeginInit();
         ((System.ComponentModel.ISupportInitialize)(this.cbOptionsShowFullMenus.Properties)).BeginInit();
         ((System.ComponentModel.ISupportInitialize)(this.cbOptions_showFullMenusAfterDelay.Properties)).BeginInit();
         ((System.ComponentModel.ISupportInitialize)(this.cbOptions_showTips.Properties)).BeginInit();
         ((System.ComponentModel.ISupportInitialize)(this.cbOptions_ShowShortcutInTips.Properties)).BeginInit();
         ((System.ComponentModel.ISupportInitialize)(this.tabControl)).BeginInit();
         this.tabControl.SuspendLayout();
         ((System.ComponentModel.ISupportInitialize)(this.tbNBDlgName.Properties)).BeginInit();
         this.pnlNBDlg.SuspendLayout();
         ((System.ComponentModel.ISupportInitialize)(this.cbOptions_largeIcons.Properties)).BeginInit();
         ((System.ComponentModel.ISupportInitialize)(this.cbOptions_MenuAnimation.Properties)).BeginInit();
         this.SuspendLayout();


         this.btClose.Text = "关闭";
         this.btResetBar.Text = "重新设置(&R)";
         this.btRenameBar.Text = "重命名(&E)";
         this.btNewBar.Text = "新建(&N)";
         this.btDeleteBar.Text = "删除(&D)";
         this.btOptions_Reset.Text = "重置惯用数据(&R)";
         this.btNBDlgCancel.Text = "取消";
         this.btNBDlgOk.Text = "确定";
         this.tpOptions.Size = new System.Drawing.Size(354, 246);
         this.tpOptions.Text = "选项(&O)";
         this.tpCommands.Text = "命令(&C)";
         this.tpToolbars.Text = "工具栏(&B)";
         this.cbOptionsShowFullMenus.Properties.Caption = "始终显示整个菜单(&N)";
         this.cbOptions_showFullMenusAfterDelay.Properties.Caption = "鼠标指针短暂停留后显示完整菜单(&U)";
         this.cbOptions_largeIcons.Properties.Caption = "大图标(&L)";
         this.cbOptions_showTips.Properties.Caption = "显示关于工具栏屏幕提示(&T)";
         this.cbOptions_ShowShortcutInTips.Properties.Caption = "在屏幕提示中显示快捷键(&H)";
         this.lbDescCaption.Text = "详细说明";
         this.lbOptions_Other.Text = "其它";
         this.lbOptions_PCaption.Text = "个性化菜单和工具栏";
         this.lbCategoriesCaption.Text = "类别:";
         this.lbCommandsCaption.Text = "命令:";
         this.lbToolbarCaption.Text = "工具栏:";
         this.lbOptions_MenuAnimation.Text = "菜单动画设置(&M):";
         this.lbNBDlgCaption.Text = "工具栏名称(&T)";
         this.lbCommands.Appearance.BackColor = System.Drawing.SystemColors.Window;
         this.lbCommands.Appearance.Options.UseBackColor = true;
         this.Name = "XtraBarsCustomizationLocalization_CN";
         this.tpOptions.ResumeLayout(false);
         this.tpCommands.ResumeLayout(false);
         this.tpToolbars.ResumeLayout(false);
         ((System.ComponentModel.ISupportInitialize)(this.toolBarsList)).EndInit();
         ((System.ComponentModel.ISupportInitialize)(this.lbCommands)).EndInit();
         ((System.ComponentModel.ISupportInitialize)(this.lbCategories)).EndInit();
         ((System.ComponentModel.ISupportInitialize)(this.cbOptionsShowFullMenus.Properties)).EndInit();
         ((System.ComponentModel.ISupportInitialize)(this.cbOptions_showFullMenusAfterDelay.Properties)).EndInit();
         ((System.ComponentModel.ISupportInitialize)(this.cbOptions_showTips.Properties)).EndInit();
         ((System.ComponentModel.ISupportInitialize)(this.cbOptions_ShowShortcutInTips.Properties)).EndInit();
         ((System.ComponentModel.ISupportInitialize)(this.tabControl)).EndInit();
         this.tabControl.ResumeLayout(false);
         ((System.ComponentModel.ISupportInitialize)(this.tbNBDlgName.Properties)).EndInit();
         this.pnlNBDlg.ResumeLayout(false);
         ((System.ComponentModel.ISupportInitialize)(this.cbOptions_largeIcons.Properties)).EndInit();
         ((System.ComponentModel.ISupportInitialize)(this.cbOptions_MenuAnimation.Properties)).EndInit();
         this.ResumeLayout(false);

     }
     #endregion
 }


 public class XtraNavBar_CN : NavBarLocalizer
 {
     public override string Language
     {
         get
         {
             return "简体中文";
         }
     }

     public override string GetLocalizedString(NavBarStringId id)
     {
         switch (id)
         {
             case NavBarStringId.NavPaneChevronHint: return "配置按钮";
             case NavBarStringId.NavPaneMenuAddRemoveButtons: return "添加或删除按钮(&A)";
             case NavBarStringId.NavPaneMenuShowFewerButtons: return "显示较少的按钮(&F)";
             case NavBarStringId.NavPaneMenuShowMoreButtons: return "显示更多的按钮(&M)";
         }
         return base.GetLocalizedString(id);
     }
 }


 public class XtraPrinting_CN : PreviewLocalizer
 {
     public override string Language
     {
         get
         {
             return "简体中文";
         }
     }

     public override string GetLocalizedString(PreviewStringId id)
     {
         switch (id)
         {
             case PreviewStringId.Button_Apply: return "应用";
             case PreviewStringId.Button_Cancel: return "取消";
             case PreviewStringId.Button_Help: return "帮助";
             case PreviewStringId.Button_Ok: return "确定";
             case PreviewStringId.EMail_From: return "From";
             case PreviewStringId.Margin_BottomMargin: return "下边界";
             case PreviewStringId.Margin_Inch: return "英寸";
             case PreviewStringId.Margin_LeftMargin: return "左边界";
             case PreviewStringId.Margin_Millimeter: return "毫米";
             case PreviewStringId.Margin_RightMargin: return "右边界";
             case PreviewStringId.Margin_TopMargin: return "上边界";
             case PreviewStringId.MenuItem_BackgrColor: return "颜色(&C)";
             case PreviewStringId.MenuItem_Background: return "背景(&B)";
             case PreviewStringId.MenuItem_CsvDocument: return "CSV文件";
             case PreviewStringId.MenuItem_Exit: return "退出(&X)";
             case PreviewStringId.MenuItem_Export: return "导出(&E)";
             case PreviewStringId.MenuItem_File: return "文件(&F)";
             case PreviewStringId.MenuItem_GraphicDocument: return "图片文件";
             case PreviewStringId.MenuItem_HtmDocument: return "HTML文件";
             case PreviewStringId.MenuItem_MhtDocument: return "MHT文件";
             case PreviewStringId.MenuItem_PageSetup: return "页面设置(&U)";
             case PreviewStringId.MenuItem_PdfDocument: return "PDF文件";
             case PreviewStringId.MenuItem_Print: return "打印(&P)";
             case PreviewStringId.MenuItem_PrintDirect: return "直接打印(&R)";
             case PreviewStringId.MenuItem_RtfDocument: return "RTF文件";
             case PreviewStringId.MenuItem_Send: return "发送(&D)";
             case PreviewStringId.MenuItem_TxtDocument: return "TXT文件";
             case PreviewStringId.MenuItem_View: return "视图(&V)";
             case PreviewStringId.MenuItem_ViewStatusbar: return "状态栏(&S)";
             case PreviewStringId.MenuItem_ViewToolbar: return "工具栏(&T)";
             case PreviewStringId.MenuItem_Watermark: return "水印(&W)";
             case PreviewStringId.MenuItem_XlsDocument: return "XLS文件";
             case PreviewStringId.MPForm_Lbl_Pages: return "";
             case PreviewStringId.Msg_CreatingDocument: return "正在生成文件";
             case PreviewStringId.Msg_CustomDrawWarning: return "警告!";
             case PreviewStringId.Msg_EmptyDocument: return "此文件没有页面.";
             case PreviewStringId.Msg_FontInvalidNumber: return "字体大小不能为0或负数";
             case PreviewStringId.Msg_IncorrectPageRange: return "设置的页边界不正确";
             case PreviewStringId.Msg_NeedPrinter: return "没有安装打印机.";
             case PreviewStringId.Msg_NotSupportedFont: return "这种字体不被支持";
             case PreviewStringId.Msg_PageMarginsWarning: return "一个或以上的边界超出了打印范围.是否继续?";
             case PreviewStringId.Msg_WrongPageSettings: return "打印机不支持所选的纸张大小. 是否继续打印?";
             case PreviewStringId.Msg_WrongPrinter: return "无效的打印机名称.请检查打印机的设置是否正确.";
             case PreviewStringId.PageInfo_PageDate: return "[Date Printed]";
             case PreviewStringId.PageInfo_PageNumber: return "[Page #]";
             case PreviewStringId.PageInfo_PageNumberOfTotal: return "[Page # of Pages #]";
             case PreviewStringId.PageInfo_PageTime: return "[Time Printed]";
             case PreviewStringId.PageInfo_PageUserName: return "[User Name]";
             case PreviewStringId.PreviewForm_Caption: return "预览";
             case PreviewStringId.SaveDlg_FilterBmp: return "BMP Bitmap Format";
             case PreviewStringId.SaveDlg_FilterCsv: return "CSV文件";
             case PreviewStringId.SaveDlg_FilterGif: return "GIF Graphics Interchange Format";
             case PreviewStringId.SaveDlg_FilterHtm: return "HTML文件";
             case PreviewStringId.SaveDlg_FilterJpeg: return "JPEG File Interchange Format";
             case PreviewStringId.SaveDlg_FilterMht: return "MHT文件";
             case PreviewStringId.SaveDlg_FilterPdf: return "PDF文件";
             case PreviewStringId.SaveDlg_FilterPng: return "PNG Portable Network Graphics Format";
             case PreviewStringId.SaveDlg_FilterRtf: return "RTF文件";
             case PreviewStringId.SaveDlg_FilterTiff: return "TIFF Tag Image File Format";
             case PreviewStringId.SaveDlg_FilterTxt: return "TXT文件";
             case PreviewStringId.SaveDlg_FilterWmf: return "WMF Windows Metafile";
             case PreviewStringId.SaveDlg_FilterXls: return "Excel文件";
             case PreviewStringId.SaveDlg_Title: return "另存为";
             case PreviewStringId.SB_CurrentPageNo: return "目前页码:";
             case PreviewStringId.SB_PageInfo: return "{0}/{1}";
             case PreviewStringId.SB_PageNone: return "";
             case PreviewStringId.SB_TotalPageNo: return "总页码:";
             case PreviewStringId.SB_ZoomFactor: return "缩放系数:";
             case PreviewStringId.ScrollingInfo_Page: return "";
             case PreviewStringId.TB_TTip_Backgr: return "背景色";
             case PreviewStringId.TB_TTip_Close: return "退出";
             case PreviewStringId.TB_TTip_Customize: return "自定义";
             case PreviewStringId.TB_TTip_EditPageHF: return "页眉页脚";
             case PreviewStringId.TB_TTip_Export: return "导出文件";
             case PreviewStringId.TB_TTip_FirstPage: return "首页";
             case PreviewStringId.TB_TTip_HandTool: return "手掌工具";
             case PreviewStringId.TB_TTip_LastPage: return "尾页";
             case PreviewStringId.TB_TTip_Magnifier: return "放大/缩小";
             case PreviewStringId.TB_TTip_Map: return "文档视图";
             case PreviewStringId.TB_TTip_MultiplePages: return "多页";
             case PreviewStringId.TB_TTip_NextPage: return "下一页";
             case PreviewStringId.TB_TTip_PageSetup: return "页面设置";
             case PreviewStringId.TB_TTip_PreviousPage: return "上一页";
             case PreviewStringId.TB_TTip_Print: return "打印";
             case PreviewStringId.TB_TTip_PrintDirect: return "直接打印";
             case PreviewStringId.TB_TTip_Search: return "搜索";
             case PreviewStringId.TB_TTip_Send: return "发送E-Mail";
             case PreviewStringId.TB_TTip_Watermark: return "水印";
             case PreviewStringId.TB_TTip_Zoom: return "缩放";
             case PreviewStringId.TB_TTip_ZoomIn: return "放大";
             case PreviewStringId.TB_TTip_ZoomOut: return "缩小";
             case PreviewStringId.WMForm_Direction_BackwardDiagonal: return "反向倾斜";
             case PreviewStringId.WMForm_Direction_ForwardDiagonal: return "正向倾斜";
             case PreviewStringId.WMForm_Direction_Horizontal: return "横向";
             case PreviewStringId.WMForm_Direction_Vertical: return "纵向";
             case PreviewStringId.WMForm_HorzAlign_Center: return "置中";
             case PreviewStringId.WMForm_HorzAlign_Left: return "靠左";
             case PreviewStringId.WMForm_HorzAlign_Right: return "靠右";
             case PreviewStringId.WMForm_ImageClip: return "剪辑";
             case PreviewStringId.WMForm_ImageStretch: return "伸展";
             case PreviewStringId.WMForm_ImageZoom: return "缩放";
             case PreviewStringId.WMForm_PageRangeRgrItem_All: return "全部";
             case PreviewStringId.WMForm_PageRangeRgrItem_Pages: return "页码";
             case PreviewStringId.WMForm_PictureDlg_Title: return "选择图片";
             case PreviewStringId.WMForm_VertAlign_Bottom: return "底端";
             case PreviewStringId.WMForm_VertAlign_Middle: return "中间";
             case PreviewStringId.WMForm_VertAlign_Top: return "顶端";
             case PreviewStringId.WMForm_Watermark_Asap: return "ASAP";
             case PreviewStringId.WMForm_Watermark_Confidential: return "CONFIDENTIAL";
             case PreviewStringId.WMForm_Watermark_Copy: return "COPY";
             case PreviewStringId.WMForm_Watermark_DoNotCopy: return "DO NOT COPY";
             case PreviewStringId.WMForm_Watermark_Draft: return "DRAFT";
             case PreviewStringId.WMForm_Watermark_Evaluation: return "EVALUATION";
             case PreviewStringId.WMForm_Watermark_Original: return "ORIGINAL";
             case PreviewStringId.WMForm_Watermark_Personal: return "PERSONAL";
             case PreviewStringId.WMForm_Watermark_Sample: return "SAMPLE";
             case PreviewStringId.WMForm_Watermark_TopSecret: return "TOP SECRET";
             case PreviewStringId.WMForm_Watermark_Urgent: return "URGENT";
             case PreviewStringId.WMForm_ZOrderRgrItem_Behind: return "在后面";
             case PreviewStringId.WMForm_ZOrderRgrItem_InFront: return "在前面";
         }
         return base.GetLocalizedString(id);
     }
 }

 public class XtraTreeList_CN : TreeListLocalizer
 {
     public override string Language
     {
         get
         {
             return "简体中文";
         }
     }

     public override string GetLocalizedString(TreeListStringId id)
     {
         switch (id)
         {
             case TreeListStringId.ColumnCustomizationText: return "自定显示字段";
             case TreeListStringId.ColumnNamePrefix: return "列名首标";
             case TreeListStringId.InvalidNodeExceptionText: return "是否确定要修改?";
             case TreeListStringId.MenuColumnBestFit: return "最佳匹配";
             case TreeListStringId.MenuColumnBestFitAllColumns: return "最佳匹配(所有列)";
             case TreeListStringId.MenuColumnColumnCustomization: return "列选择";
             case TreeListStringId.MenuColumnSortAscending: return "升序排序";
             case TreeListStringId.MenuColumnSortDescending: return "降序排序";
             case TreeListStringId.MenuFooterAllNodes: return "全部节点";
             case TreeListStringId.MenuFooterAverage: return "平均";
             case TreeListStringId.MenuFooterAverageFormat: return "平均值={0:#.##}";
             case TreeListStringId.MenuFooterCount: return "计数";
             case TreeListStringId.MenuFooterCountFormat: return "{0}";
             case TreeListStringId.MenuFooterMax: return "最大值";
             case TreeListStringId.MenuFooterMaxFormat: return "最大值={0}";
             case TreeListStringId.MenuFooterMin: return "最小值";
             case TreeListStringId.MenuFooterMinFormat: return "最小值={0}";
             case TreeListStringId.MenuFooterNone: return "";
             case TreeListStringId.MenuFooterSum: return "合计";
             case TreeListStringId.MenuFooterSumFormat: return "合计={0:#.##}";
             case TreeListStringId.MultiSelectMethodNotSupported: return "OptionsBehavior.MultiSelect未激活时,指定方法不能工作.";
             case TreeListStringId.PrintDesignerDescription: return "为当前的树状列表设置不同的打印选项.";
             case TreeListStringId.PrintDesignerHeader: return "打印设置";
         }
         return base.GetLocalizedString(id);
     }
 }
View Code

使用:

projram.cs里面添加如下代码:

new Chinese();

posted @ 2014-10-30 14:55  Garson_Zhang  阅读(378)  评论(0编辑  收藏  举报