使用 SetCustomizedString汉化UltraWinGrid的筛选
網(wǎng)上有?漢化UltraWinGrid篩選的代碼不過沒說明怎樣使用(大概是覺得簡單)
Private Function GridFilter_Customizer()
??????? Dim rc As Infragistics.Shared.ResourceCustomizer = Infragistics.Win.UltraWinGrid.Resources.Customizer
??????? '如果不寫“ = Infragistics.Win.UltraWinGrid.Resources.Customizer”則會抱錯(cuò):未處理的“System.NullReferenceException”類型的異常出現(xiàn)在?#### 中。其他信息: 未將對象引用設(shè)置到對象的實(shí)例。
??????? rc.SetCustomizedString("RowFilterDropDownAllItem", "所有")
??????? rc.SetCustomizedString("RowFilterDropDownBlanksItem", "空")
??????? rc.SetCustomizedString("RowFilterDropDownCustomItem", "自定義")
??????? rc.SetCustomizedString("RowFilterDropDownNonBlanksItem", "非空")
??????? rc.SetCustomizedString("RowFilterDropDownAllItem", "所有")
??????? rc.SetCustomizedString("RowFilterDialogTitlePrefix", "輸入過濾準(zhǔn)則為")
??????? rc.SetCustomizedString("FilterDialogAndRadioText", "并且")
??????? rc.SetCustomizedString("FilterDialogOrRadioText", "或者")
??????? rc.SetCustomizedString("FilterDialogAddConditionButtonText", "增加一個(gè)條件(&N)")
??????? rc.SetCustomizedString("FilterDialogDeleteButtonText", "刪除一個(gè)條件")
??????? rc.SetCustomizedString("FilterDialogOkButtonText", "確定(&O)")
??????? rc.SetCustomizedString("FilterDialogCancelButtonText", "取消(&C)")
??????? rc.SetCustomizedString("FilterDialogOkButtonNoFiltersText", "不過濾")
??????? rc.SetCustomizedString("RowFilterDialogOperatorHeaderCaption", "比較運(yùn)算符")
??????? rc.SetCustomizedString("RowFilterDialogOperandHeaderCaption", "準(zhǔn)則")
??????? rc.SetCustomizedString("RowFilterDropDownEquals", "等于")
??????? rc.SetCustomizedString("RowFilterDropDownNotEquals", "不等于")
??????? rc.SetCustomizedString("RowFilterDropDownLessThan", "小于")
??????? rc.SetCustomizedString("RowFilterDropDownLessThanOrEqualTo", "小于等于")
??????? rc.SetCustomizedString("RowFilterDropDownGreaterThan", "大于")
??????? rc.SetCustomizedString("RowFilterDropDownGreaterThanOrEqualTo", "大于等于")
??????? rc.SetCustomizedString("RowFilterDropDownMatch", "自定義規(guī)則表達(dá)式")
??????? rc.SetCustomizedString("RowFilterDropDownLike", "模糊查找")
??????? rc.SetCustomizedString("RowFilterDialogBlanksItem", "空白")
??????? rc.SetCustomizedString("RowFilterDialogDBNullItem", "無值")
??????? rc.SetCustomizedString("RowFilterDialogEmptyTextItem", "空字符")
??????? 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", "自定義規(guī)則表達(dá)式")
??????? rc.SetCustomizedString("RowFilterDropDown_Operator_Like", "模糊查找")
??????? rc.SetCustomizedString("RowFilterPatternCaption", "無效查找模式")
??????? rc.SetCustomizedString("RowFilterPatternError", "錯(cuò)誤的解析模式{0}. 請輸入一個(gè)有效的表達(dá)式")
??????? rc.SetCustomizedString("RowFilterPatternException", "無效查找模式{0}")
??????? rc.SetCustomizedString("RowFilterRegexError", "無效的規(guī)則表達(dá)式{0}.請輸入一個(gè)有效的表達(dá)式")
??????? rc.SetCustomizedString("RowFilterRegexErrorCaption", "無效規(guī)則表達(dá)式")
??????? rc.SetCustomizedString("RowFilterRegexException", "無效規(guī)則表達(dá)式{0}")
??? End Function
然后在初始化時(shí)調(diào)用GridFilter_Customizer()即可。
總結(jié):
整個(gè)過程就是:利用Customizer成員的SetCustomizedString方法自定義顯示。利用此方法亦可漢化Infragistics其它控件的顯示:
有關(guān)key和value參考:
?http://help.infragistics.com/NetAdvantage/2005.3/HelpFiles/20053/WinGrid_Message_Strings_Customization.html
轉(zhuǎn)載于:https://www.cnblogs.com/zhangjidong/archive/2006/05/29/412059.html
總結(jié)
以上是生活随笔為你收集整理的使用 SetCustomizedString汉化UltraWinGrid的筛选的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: [导入]浅谈VB.NET中的接口
- 下一篇: loadrunner脚本练习