请C#大侠帮忙翻译这段代码为VB.Net的,谢谢了!

voidgridLookUpEdit1_Popup(objectsender,EventArgse){FilterLookup(sender);}privatevoidF... void gridLookUpEdit1_Popup(object sender, EventArgs e)
{
FilterLookup(sender);

}

private void FilterLookup(object sender) {
Text += " ! ";
GridLookUpEdit edit = sender as GridLookUpEdit;
GridView gridView = edit.Properties.View as GridView;
FieldInfo fi = gridView.GetType().GetField("extraFilter", BindingFlags.NonPublic | BindingFlags.Instance);
Text = edit.AutoSearchText;
BinaryOperator op1 = new BinaryOperator("Code", edit.AutoSearchText + "%", BinaryOperatorType.Like);
BinaryOperator op2 = new BinaryOperator("Name", edit.AutoSearchText + "%", BinaryOperatorType.Like);
string filterCondition = new GroupOperator(GroupOperatorType.Or, new CriteriaOperator[] { op1, op2 }).ToString();
fi.SetValue(gridView, filterCondition);

MethodInfo mi = gridView.GetType().GetMethod("ApplyColumnsFilterEx", BindingFlags.NonPublic | BindingFlags.Instance);
mi.Invoke(gridView, null);
}

private void gridLookUpEdit1_EditValueChanging(object sender, ChangingEventArgs e) {
this.BeginInvoke(new System.Windows.Forms.MethodInvoker(delegate{
FilterLookup(sender);
}));
}
--------------------------------------------------------------------------------------------------
请C#大侠帮小弟将上述代码翻译成VB.Net的,谢谢了!
最主要是下面(private void gridLookUpEdit1_EditValueChanging)那段。
不要用工具转换的,因为我也用过此类工具,错误太多!
非常感谢!
展开
 我来答
cs3619311
2011-08-23 · 超过30用户采纳过TA的回答
知道答主
回答量:89
采纳率:0%
帮助的人:85.5万
展开全部
Private Sub gridLookUpEdit1_Popup(ByVal sender As Object, ByVal e As EventArgs)
FilterLookup(sender)

End Sub

Private Sub FilterLookup(ByVal sender As Object)
Text += " ! "
Dim edit As GridLookUpEdit = TryCast(sender, GridLookUpEdit)
Dim gridView As GridView = TryCast(edit.Properties.View, GridView)
Dim fi As FieldInfo = gridView.[GetType]().GetField("extraFilter", BindingFlags.NonPublic Or BindingFlags.Instance)
Text = edit.AutoSearchText
Dim op1 As New BinaryOperator("Code", edit.AutoSearchText + "%", BinaryOperatorType.[Like])
Dim op2 As New BinaryOperator("Name", edit.AutoSearchText + "%", BinaryOperatorType.[Like])
Dim filterCondition As String = New GroupOperator(GroupOperatorType.[Or], New CriteriaOperator() {op1, op2}).ToString()
fi.SetValue(gridView, filterCondition)

Dim mi As MethodInfo = gridView.[GetType]().GetMethod("ApplyColumnsFilterEx", BindingFlags.NonPublic Or BindingFlags.Instance)
mi.Invoke(gridView, Nothing)
End Sub

Private Sub gridLookUpEdit1_EditValueChanging(ByVal sender As Object, ByVal e As ChangingEventArgs)
Me.BeginInvoke(New System.Windows.Forms.MethodInvoker(Function() Do FilterLookup(sender) End Function))
End Sub
手机用户25130
2011-08-25 · TA获得超过259个赞
知道小有建树答主
回答量:668
采纳率:0%
帮助的人:448万
展开全部
This is because our products can not be temporarily packaging (missing labels), the warehouse is also available in sets of 2525, can defer the delivery date follow-up »
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式