ultraGrid打印预览对话框汉化

 转载自:http://blog.csdn.net/greystar/archive/2005/12/12/550184.aspx

在使用ultraGrid时,其本身已内置了打印等功能,只是在预览时,其对话框是英文界面。使用起来很不友好。其实对于这套组件来说,本身已提供了强大的自定义资源功能。

下面是我对其打印预览对话框的汉化。

Infragistics.Shared.ResourceCustomizer rc= Infragistics.Win.Printing.Resources.Customizer;//Resources.Customizer;
   rc.SetCustomizedString("PrintPreview_DialogCaption","打印预览");
   rc.SetCustomizedString("PrintPreview_Tool_Print","打印(&P)");
   rc.SetCustomizedString("PrintPreview_Tool_ClosePreview","关闭(&C)");
   rc.SetCustomizedString("PrintPreview_Tool_ContextMenuPreviewZoom","显示比例");
   rc.SetCustomizedString("PrintPreview_Tool_Current_Page","当前页");
   rc.SetCustomizedString("PrintPreview_Tool_Exit","退出(&X)");
   rc.SetCustomizedString("PrintPreview_Tool_First_Page","第一页");
   rc.SetCustomizedString("PrintPreview_Tool_Go_To","跳至");
   rc.SetCustomizedString("PrintPreview_Tool_Last_Page","最后一页");
   rc.SetCustomizedString("PrintPreview_Tool_Next_Page","下一页");
   rc.SetCustomizedString("PrintPreview_Tool_Previous_Page","前一页");
   rc.SetCustomizedString("PrintPreview_Tool_Next_View","下一视图(&N)");
   rc.SetCustomizedString("PrintPreview_Tool_Previous_View","前一视图(&P)");
   rc.SetCustomizedString("PrintPreview_Tool_Hand_Tool","手型工具(&H)");
   rc.SetCustomizedString("PrintPreview_Tool_Page_Setup","页面设置(&U)");
   rc.SetCustomizedString("PrintPreview_Tool_Snapshot_Tool","快照工具(&S)");
   rc.SetCustomizedString("PrintPreview_Tool_View","视图(&V)");
   rc.SetCustomizedString("PrintPreview_Tool_Whole_Page","合适页");
   rc.SetCustomizedString("PrintPreview_Tool_Zoom","缩放(&Z)");
   rc.SetCustomizedString("PrintPreview_Tool_Zoom_In","放大");
  
   rc.SetCustomizedString("PrintPreview_Tool_Zoom_Out","缩小");

   rc.SetCustomizedString("PrintPreview_ToolCategory_Context_Menus","上下文菜单");
   rc.SetCustomizedString("PrintPreview_ToolCategory_File","文件");
   rc.SetCustomizedString("PrintPreview_ToolCategory_Menus","菜单");
   rc.SetCustomizedString("PrintPreview_ToolCategory_Tools","工具栏");
   rc.SetCustomizedString("PrintPreview_ToolCategory_View","视图");
   rc.SetCustomizedString("PrintPreview_ToolCategory_Zoom_Mode","缩放模式");

   rc.SetCustomizedString("PrintPreview_ToolTip_ClosePreview","关闭");
   rc.SetCustomizedString("PrintPreview_ToolTip_Zoom","缩放");
   rc.SetCustomizedString("StatusBar_Page_X_OF_X","页:{0}/{1}");

   rc.SetCustomizedString("CustomizeImg_ToolBar_MenuBar","菜单");
   rc.SetCustomizedString("CustomizeImg_ToolBar_Standard","标准");
   rc.SetCustomizedString("CustomizeImg_ToolBar_View","视图");
   rc.SetCustomizedString("PrintPreview_Tool_File","文件(&F)");
   rc.SetCustomizedString("PrintPreview_Tool_Tools","工具(&T)");
   rc.SetCustomizedString("PrintPreview_Tool_Dynamic_Zoom_Tool","动态缩放工具(&D)");
   rc.SetCustomizedString("PrintPreview_Tool_Zoom_Out_Tool","缩小工具");
   rc.SetCustomizedString("PrintPreview_Tool_Zoom_In_Tool","放大工具");
  // rc.SetCustomizedString("PrintPreview_Tool_Page_Layout","菜单");
   rc.SetCustomizedString("PreviewRowColSelection_Cancel","取消");
   rc.SetCustomizedString("PreviewRowColSelection_SelectedPages","{0} x {1} 页");

   rc.SetCustomizedString("PreviewRowColSelection_Cancel","取消");
   rc.SetCustomizedString("PrintPreview_Tool_Page_Width","页宽");
   rc.SetCustomizedString("PrintPreview_ZoomListItem_MarginWidth","文字宽度");
   rc.SetCustomizedString("PrintPreview_ZoomListItem_PageWidth","页宽");
   rc.SetCustomizedString("PrintPreview_ZoomListItem_WholePage","合适页");
   rc.SetCustomizedString("PrintPreview_Tool_Page_Layout","页面布局");
   rc.SetCustomizedString("PrintPreview_Tool_Margin_Width","文字宽度");
   rc.SetCustomizedString("ContextMenuPreviewHand","缩放视图");


   rc.SetCustomizedString("PrintPreview_Tool_Reduce_Page_Thumbnails","缩小");
   rc.SetCustomizedString("PrintPreview_Tool_Show_Page_Numbers","显示页号");
   rc.SetCustomizedString("PrintPreview_Tool_ContextMenuThumbnail","缩略图");
   rc.SetCustomizedString("PrintPreview_Tool_Enlarge_Page_Thumbnails","放大");
   rc.SetCustomizedString("PrintPreview_Tool_Thumbnails","缩略图");
   rc.SetCustomizedString("PrintPreview_Tool_Continuous","连续排序");
   //说明
   rc.SetCustomizedString("StatusBar_DynamicZoom_Instructions","单击并拖动进行缩放操作");
   rc.SetCustomizedString("StatusBar_Page_X_OF_X","当前页: {0} / {1}");
   rc.SetCustomizedString("StatusBar_SnapShot_Instructions","单击并拖动,系统将选定矩型区域复制到剪帖板");
   rc.SetCustomizedString("StatusBar_ZoomIn_Instructions","单击并拖动,系统将放大选定矩型区域");
   rc.SetCustomizedString("StatusBar_ZoomOut_Instructions","单击并拖动,系统将缩小选定矩型区域");
   rc.SetCustomizedString("StatusBar_Hand_Instructions","单击并拖动以便显示更多内容");
   

对于其他控件的汉化操作也大致如何。都是调用SetCustomizedString来实现,不过里面的KEY和VALUE您需要自已去查帮助才可以获取

阅读更多

ultraGrid打印预览设置

03-14

我看到网上有人帖了以下进行ultraGrid打印预览设置,但不知这段代码要放在哪里执行,请高手指教!!!rnrnDim rc As Infragistics.Shared.ResourceCustomizer = Infragistics.Win.UltraWinGrid.Resources.Customizerrnrn rc.SetCustomizedString("PrintPreview_DialogCaption", "打印预览")rn rc.SetCustomizedString("PrintPreview_Tool_Print", "打印(&P)")rn rc.SetCustomizedString("PrintPreview_Tool_ClosePreview", "关闭(&C)")rn rc.SetCustomizedString("PrintPreview_Tool_ContextMenuPreviewZoom", "显示比例")rn rc.SetCustomizedString("PrintPreview_Tool_Current_Page", "当前页")rn rc.SetCustomizedString("PrintPreview_Tool_Exit", "退出(&X)")rn rc.SetCustomizedString("PrintPreview_Tool_First_Page", "第一页")rn rc.SetCustomizedString("PrintPreview_Tool_Go_To", "跳至")rn rc.SetCustomizedString("PrintPreview_Tool_Last_Page", "最后一页")rn rc.SetCustomizedString("PrintPreview_Tool_Next_Page", "下一页")rn rc.SetCustomizedString("PrintPreview_Tool_Previous_Page", "前一页")rn rc.SetCustomizedString("PrintPreview_Tool_Next_View", "下一视图(&N)")rn rc.SetCustomizedString("PrintPreview_Tool_Previous_View", "前一视图(&P)")rn rc.SetCustomizedString("PrintPreview_Tool_Hand_Tool", "手型工具(&H)")rn rc.SetCustomizedString("PrintPreview_Tool_Page_Setup", "页面设置(&U)")rn rc.SetCustomizedString("PrintPreview_Tool_Snapshot_Tool", "快照工具(&S)")rn rc.SetCustomizedString("PrintPreview_Tool_View", "视图(&V)")rn rc.SetCustomizedString("PrintPreview_Tool_Whole_Page", "合适页")rn rc.SetCustomizedString("PrintPreview_Tool_Zoom", "缩放(&Z)")rn rc.SetCustomizedString("PrintPreview_Tool_Zoom_In", "放大")rnrn rc.SetCustomizedString("PrintPreview_Tool_Zoom_Out", "缩小")rnrn rc.SetCustomizedString("PrintPreview_ToolCategory_Context_Menus", "上下文菜单")rn rc.SetCustomizedString("PrintPreview_ToolCategory_File", "文件")rn rc.SetCustomizedString("PrintPreview_ToolCategory_Menus", "菜单")rn rc.SetCustomizedString("PrintPreview_ToolCategory_Tools", "工具栏")rn rc.SetCustomizedString("PrintPreview_ToolCategory_View", "视图")rn rc.SetCustomizedString("PrintPreview_ToolCategory_Zoom_Mode", "缩放模式")rnrn rc.SetCustomizedString("PrintPreview_ToolTip_ClosePreview", "关闭")rn rc.SetCustomizedString("PrintPreview_ToolTip_Zoom", "缩放")rn rc.SetCustomizedString("StatusBar_Page_X_OF_X", "页:0/1")rnrn rc.SetCustomizedString("CustomizeImg_ToolBar_MenuBar", "菜单")rn rc.SetCustomizedString("CustomizeImg_ToolBar_Standard", "标准")rn rc.SetCustomizedString("CustomizeImg_ToolBar_View", "视图")rn rc.SetCustomizedString("PrintPreview_Tool_File", "文件(&F)")rn rc.SetCustomizedString("PrintPreview_Tool_Tools", "工具(&T)")rn rc.SetCustomizedString("PrintPreview_Tool_Dynamic_Zoom_Tool", "动态缩放工具(&D)")rn rc.SetCustomizedString("PrintPreview_Tool_Zoom_Out_Tool", "缩小工具")rn rc.SetCustomizedString("PrintPreview_Tool_Zoom_In_Tool", "放大工具")rn ' rc.SetCustomizedString("PrintPreview_Tool_Page_Layout","菜单")rn rc.SetCustomizedString("PreviewRowColSelection_Cancel", "取消")rn rc.SetCustomizedString("PreviewRowColSelection_SelectedPages", "0 x 1 页")rn rc.SetCustomizedString("PreviewRowColSelection_Cancel", "取消")rn rc.SetCustomizedString("PrintPreview_Tool_Page_Width", "页宽")rn rc.SetCustomizedString("PrintPreview_ZoomListItem_MarginWidth", "文字宽度")rn rc.SetCustomizedString("PrintPreview_ZoomListItem_PageWidth", "页宽")rn rc.SetCustomizedString("PrintPreview_ZoomListItem_WholePage", "合适页")rn rc.SetCustomizedString("PrintPreview_Tool_Page_Layout", "页面布局")rn rc.SetCustomizedString("PrintPreview_Tool_Margin_Width", "文字宽度")rn rc.SetCustomizedString("ContextMenuPreviewHand", "缩放视图")rnrnrn rc.SetCustomizedString("PrintPreview_Tool_Reduce_Page_Thumbnails", "缩小")rn rc.SetCustomizedString("PrintPreview_Tool_Show_Page_Numbers", "显示页号")rn rc.SetCustomizedString("PrintPreview_Tool_ContextMenuThumbnail", "缩略图")rn rc.SetCustomizedString("PrintPreview_Tool_Enlarge_Page_Thumbnails", "放大")rn rc.SetCustomizedString("PrintPreview_Tool_Thumbnails", "缩略图")rn rc.SetCustomizedString("PrintPreview_Tool_Continuous", "连续排序")rn '说明rn rc.SetCustomizedString("StatusBar_DynamicZoom_Instructions", "单击并拖动进行缩放操作")rn rc.SetCustomizedString("StatusBar_Page_X_OF_X", "当前页: 0 / 1")rn rc.SetCustomizedString("StatusBar_SnapShot_Instructions", "单击并拖动,系统将选定矩型区域复制到剪帖板")rn rc.SetCustomizedString("StatusBar_ZoomIn_Instructions", "单击并拖动,系统将放大选定矩型区域")rn rc.SetCustomizedString("StatusBar_ZoomOut_Instructions", "单击并拖动,系统将缩小选定矩型区域")rn rc.SetCustomizedString("StatusBar_Hand_Instructions", "单击并拖动以便显示更多内容")rn

有谁汉化UltraGrid打印预览控件?急用!!!!!!!!1

11-15

下面是汉化代码,这段代码应该放在什么地方?rnrnInfragistics.Shared.ResourceCustomizer rc = Infragistics.Win.Printing.Resources.Customizer;//Resources.Customizer;rn rc.SetCustomizedString("PrintPreview_DialogCaption", "打印预览");rn rc.SetCustomizedString("PrintPreview_Tool_Print", "打印(&P)");rn rc.SetCustomizedString("PrintPreview_Tool_ClosePreview", "关闭(&C)");rn rc.SetCustomizedString("PrintPreview_Tool_ContextMenuPreviewZoom", "显示比例");rn rc.SetCustomizedString("PrintPreview_Tool_Current_Page", "当前页");rn rc.SetCustomizedString("PrintPreview_Tool_Exit", "退出(&X)");rn rc.SetCustomizedString("PrintPreview_Tool_First_Page", "第一页");rn rc.SetCustomizedString("PrintPreview_Tool_Go_To", "跳至");rn rc.SetCustomizedString("PrintPreview_Tool_Last_Page", "最后一页");rn rc.SetCustomizedString("PrintPreview_Tool_Next_Page", "下一页");rn rc.SetCustomizedString("PrintPreview_Tool_Previous_Page", "前一页");rn rc.SetCustomizedString("PrintPreview_Tool_Next_View", "下一视图(&N)");rn rc.SetCustomizedString("PrintPreview_Tool_Previous_View", "前一视图(&P)");rn rc.SetCustomizedString("PrintPreview_Tool_Hand_Tool", "手型工具(&H)");rn rc.SetCustomizedString("PrintPreview_Tool_Page_Setup", "页面设置(&U)");rn rc.SetCustomizedString("PrintPreview_Tool_Snapshot_Tool", "快照工具(&S)");rn rc.SetCustomizedString("PrintPreview_Tool_View", "视图(&V)");rn rc.SetCustomizedString("PrintPreview_Tool_Whole_Page", "合适页");rn rc.SetCustomizedString("PrintPreview_Tool_Zoom", "缩放(&Z)");rn rc.SetCustomizedString("PrintPreview_Tool_Zoom_In", "放大");rnrn rc.SetCustomizedString("PrintPreview_Tool_Zoom_Out", "缩小");rnrn rc.SetCustomizedString("PrintPreview_ToolCategory_Context_Menus", "上下文菜单");rn rc.SetCustomizedString("PrintPreview_ToolCategory_File", "文件");rn rc.SetCustomizedString("PrintPreview_ToolCategory_Menus", "菜单");rn rc.SetCustomizedString("PrintPreview_ToolCategory_Tools", "工具栏");rn rc.SetCustomizedString("PrintPreview_ToolCategory_View", "视图");rn rc.SetCustomizedString("PrintPreview_ToolCategory_Zoom_Mode", "缩放模式");rnrn rc.SetCustomizedString("PrintPreview_ToolTip_ClosePreview", "关闭");rn rc.SetCustomizedString("PrintPreview_ToolTip_Zoom", "缩放");rn rc.SetCustomizedString("StatusBar_Page_X_OF_X", "页:0/1");rnrn rc.SetCustomizedString("CustomizeImg_ToolBar_MenuBar", "菜单");rn rc.SetCustomizedString("CustomizeImg_ToolBar_Standard", "标准");rn rc.SetCustomizedString("CustomizeImg_ToolBar_View", "视图");rn rc.SetCustomizedString("PrintPreview_Tool_File", "文件(&F)");rn rc.SetCustomizedString("PrintPreview_Tool_Tools", "工具(&T)");rn rc.SetCustomizedString("PrintPreview_Tool_Dynamic_Zoom_Tool", "动态缩放工具(&D)");rn rc.SetCustomizedString("PrintPreview_Tool_Zoom_Out_Tool", "缩小工具");rn rc.SetCustomizedString("PrintPreview_Tool_Zoom_In_Tool", "放大工具");rn // rc.SetCustomizedString("PrintPreview_Tool_Page_Layout","菜单");rn rc.SetCustomizedString("PreviewRowColSelection_Cancel", "取消");rn rc.SetCustomizedString("PreviewRowColSelection_SelectedPages", "0 x 1 页");rnrn rc.SetCustomizedString("PreviewRowColSelection_Cancel", "取消");rn rc.SetCustomizedString("PrintPreview_Tool_Page_Width", "页宽");rn rc.SetCustomizedString("PrintPreview_ZoomListItem_MarginWidth", "文字宽度");rn rc.SetCustomizedString("PrintPreview_ZoomListItem_PageWidth", "页宽");rn rc.SetCustomizedString("PrintPreview_ZoomListItem_WholePage", "合适页");rn rc.SetCustomizedString("PrintPreview_Tool_Page_Layout", "页面布局");rn rc.SetCustomizedString("PrintPreview_Tool_Margin_Width", "文字宽度");rn rc.SetCustomizedString("ContextMenuPreviewHand", "缩放视图");rnrnrn rc.SetCustomizedString("PrintPreview_Tool_Reduce_Page_Thumbnails", "缩小");rn rc.SetCustomizedString("PrintPreview_Tool_Show_Page_Numbers", "显示页号");rn rc.SetCustomizedString("PrintPreview_Tool_ContextMenuThumbnail", "缩略图");rn rc.SetCustomizedString("PrintPreview_Tool_Enlarge_Page_Thumbnails", "放大");rn rc.SetCustomizedString("PrintPreview_Tool_Thumbnails", "缩略图");rn rc.SetCustomizedString("PrintPreview_Tool_Continuous", "连续排序");rn //说明rn rc.SetCustomizedString("StatusBar_DynamicZoom_Instructions", "单击并拖动进行缩放操作");rn rc.SetCustomizedString("StatusBar_Page_X_OF_X", "当前页: 0 / 1");rn rc.SetCustomizedString("StatusBar_SnapShot_Instructions", "单击并拖动,系统将选定矩型区域复制到剪帖板");rn rc.SetCustomizedString("StatusBar_ZoomIn_Instructions", "单击并拖动,系统将放大选定矩型区域");rn rc.SetCustomizedString("StatusBar_ZoomOut_Instructions", "单击并拖动,系统将缩小选定矩型区域");rn rc.SetCustomizedString("StatusBar_Hand_Instructions", "单击并拖动以便显示更多内容");

没有更多推荐了,返回首页