读书笔记 UltraGrid(6)

资源汉化
ResourceCustomizer rc = Infragistics.Win.UltraWinGrid.Resources.Customizer;
rc.SetCustomizedString("RowFilterDropDown_Operator_Contains", "包含");
如何知道资源名呢
使用Reflector.exe,在resources中查看Infragistics.Win.UltraWinGrid.strings.resources,包括grid的所有字符串资源;

常用的资源翻译如下:
            //过滤操作符

            rc.SetCustomizedString("RowFilterDropDown_Operator_Equals", "等于");
            rc.SetCustomizedString("RowFilterDropDown_Operator_NotEquals", "不等于");
            rc.SetCustomizedString("RowFilterDropDown_Operator_LessThan", "小于");
            rc.SetCustomizedString("RowFilterDropDown_Operator_LessThanOrEqualTo", "小等于");
            rc.SetCustomizedString("RowFilterDropDown_Operator_GreaterThan", "大于");
            rc.SetCustomizedString("RowFilterDropDown_Operator_GreaterThanOrEqualTo", "大等于");
            rc.SetCustomizedString("RowFilterDropDown_Operator_Match", "匹配");
            rc.SetCustomizedString("RowFilterDropDown_Operator_Like", "类似");
            rc.SetCustomizedString("RowFilterDropDown_Operator_StartsWith", "以...开始");
            rc.SetCustomizedString("RowFilterDropDown_Operator_Contains", "包含");
            rc.SetCustomizedString("RowFilterDropDown_Operator_EndsWith", "以...结束");
            rc.SetCustomizedString("RowFilterDropDown_Operator_DoesNotStartWith", "不以...开始");
            rc.SetCustomizedString("RowFilterDropDown_Operator_DoesNotContain", "不包含");
            rc.SetCustomizedString("RowFilterDropDown_Operator_DoesNotEndWith", "不以...结束");
            rc.SetCustomizedString("RowFilterDropDown_Operator_DoesNotMatch", "不匹配");
            rc.SetCustomizedString("RowFilterDropDown_Operator_NotLike", "不类似");

            //过滤值列表显示的特殊值
            rc.SetCustomizedString("RowFilterDropDownAllItem", "所有");
            rc.SetCustomizedString("RowFilterDropDownBlanksItem", "空");
            rc.SetCustomizedString("RowFilterDropDownCustomItem", "(自定义过滤)");
            rc.SetCustomizedString("RowFilterDropDownNonBlanksItem", "非空");
            rc.SetCustomizedString("RowFilterDropDownAllItem", "所有");
           
            //自定义过滤对话框
            rc.SetCustomizedString("RowFilterDialogTitlePrefix", "输入过滤准则为");
            rc.SetCustomizedString("FilterDialogAllComboItem", "所有");
            rc.SetCustomizedString("FilterDialogAnyComboItem", "任意");
            rc.SetCustomizedString("FilterDialogApplyLabelText", "过滤基于以下{0}的条件");
            rc.SetCustomizedString("FilterDialogConditionAddButtonText", "添加");
            rc.SetCustomizedString("FilterDialogConditionDeleteButtonText", "删除");
            rc.SetCustomizedString("FilterDialogDeleteButton_AccessibleDescription", "删除选择的条件");
            rc.SetCustomizedString("FilterDialogOkButtonText", "确定(&O)");
            rc.SetCustomizedString("FilterDialogCancelButtonText", "取消(&C)");
            rc.SetCustomizedString("FilterDialogOkButtonNoFiltersText", "不过滤");
            rc.SetCustomizedString("FilterDialogTitle", "自定义过滤");

            rc.SetCustomizedString("RowFilterDropDownEquals", "等于");
            rc.SetCustomizedString("RowFilterDropDownNotEquals", "不等于");
            rc.SetCustomizedString("RowFilterDropDownLessThan", "小于");
            rc.SetCustomizedString("RowFilterDropDownLessThanOrEqualTo", "小于等于");
            rc.SetCustomizedString("RowFilterDropDownGreaterThan", "大于");
            rc.SetCustomizedString("RowFilterDropDownGreaterThanOrEqualTo", "大于等于");
            rc.SetCustomizedString("RowFilterDropDownMatch", "自定义规则表达式");
            rc.SetCustomizedString("RowFilterDropDownLike", "模糊查找");

            rc.SetCustomizedString("RowFilterDialogBlanksItem", "空白");
            rc.SetCustomizedString("RowFilterDialogDBNullItem", "无值");
            rc.SetCustomizedString("RowFilterDialogEmptyTextItem", "空字符");
            //清除条件按钮提示
            rc.SetCustomizedString("FilterClearButtonToolTip_FilterCell", "单击这里清除'{0}'过滤条件");
            rc.SetCustomizedString("FilterClearButtonToolTip_RowSelector", "单击这里清除所有过滤条件");

            //过滤模板
            rc.SetCustomizedString("RowFilterPatternCaption", "无效查找模式");
            rc.SetCustomizedString("RowFilterPatternError", "错误的解析模式{0}. 请输入一个有效的表达式");
            rc.SetCustomizedString("RowFilterPatternException", "无效查找模式{0}");
            rc.SetCustomizedString("RowFilterRegexError", "无效的规则表达式{0}.请输入一个有效的表达式");
            rc.SetCustomizedString("RowFilterRegexErrorCaption", "无效规则表达式");
            rc.SetCustomizedString("RowFilterRegexException", "无效规则表达式{0}");

            //列选择
            rc.SetCustomizedString("ColumnChooserButtonToolTip", "点击这里显示列选择器");
            rc.SetCustomizedString("ColumnChooserDialogCaption", "列选择");

            //删除
            rc.SetCustomizedString("DeleteMultipleRowsPrompt", @"你选择删除{0}行!\n点击【是】则删除,否则点击【否】退出。");
            rc.SetCustomizedString("DeleteRowsMessageTitle", "删除多行");
            rc.SetCustomizedString("DeleteSingleRowMessageTitle", "删除多行");
            rc.SetCustomizedString("DeleteSingleRowPrompt", "你选择删除1行!\n点击【是】则删除,否则点击【否】退出。");

posted on 2012-02-10 14:58  木人(我现在不是老大)  阅读(382)  评论(0编辑  收藏  举报

导航