将下面一段C#代码转换.net代码
AsyncExecute.Show("登陆验证", "登陆中...", delegate (AsyncExecute exe) {exe.SetMessage("正在验证用门户名和密码...");
if (!Login.ValidUser(username, password, shopid))
{
throw new ControlException("用户名或密码不匹配!", AlarmIcon.Error);
}
}, delegate {
Field_00 = new frmMain();
AsyncExecute.ShowMessage = "验证 [成功]\n系统正在加载中...";
success = true;
this.txtPassword.Text = string.Empty;
ParamClass.ShopName = this.txtShop.Text;
ParamClass.UserName = Login.UserName;
Application.DoEvents();
ControlEx.Configure.Configure.Instance.GetParams<ConfigureParam>().RecentlyLoginedUserID = Login.UserID;
ControlEx.Configure.Configure.Instance.SaveConfig();
Login.IsOnline = this.chkboxOnline.Checked;
}, false, true);
--------------------编程问答-------------------- c#就是.net的~~~~~~~~ --------------------编程问答--------------------
AsyncExecute.Show("登陆验证", "登陆中...", Function(exe As AsyncExecute) Do
exe.SetMessage("正在验证用门户名和密码...")
If Not Login.ValidUser(username, password, shopid) Then
Throw New ControlException("用户名或密码不匹配!", AlarmIcon.[Error])
End If
End Function, Function() Do
Field_00 = New frmMain()
AsyncExecute.ShowMessage = "验证 [成功]" & vbLf & "系统正在加载中..."
success = True
Me.txtPassword.Text = String.Empty
ParamClass.ShopName = Me.txtShop.Text
ParamClass.UserName = Login.UserName
Application.DoEvents()
ControlEx.Configure.Configure.Instance.GetParams(Of ConfigureParam)().RecentlyLoginedUserID = Login.UserID
ControlEx.Configure.Configure.Instance.SaveConfig()
Login.IsOnline = Me.chkboxOnline.Checked
End Function, False, True)
补充:.NET技术 , VB.NET