[C#] 纯文本查看 复制代码 private void btnLogin_Click(object sender, EventArgs e)
{
this.lbTip.Text = "正在登录..";
System.Threading.Thread t = new System.Threading.Thread(LoginFunc);
t.IsBackground = true;
t.Start();
}
private void LoginFunc()
{
LoginParam lp = new LoginParam();
lp.LoginName = this.tbName.Text.Trim();
lp.PWD = this.tbPwd.Text;
LoginResult lr = BaseManager.SqlSvr.LoginSystem(lp.ToJson()).FromJson<LoginResult>();
if (null != lr && lr.ErrCode == "1")
{
BaseManager.BDUser = lr.UserModel;
this.BeginInvoke(delShowWinMainFunc);
}
else
{
this.BeginInvoke(new MethodInvoker(delegate()
{
if (null == lr)
{
this.lbTip.Text = "请检查用户名和密码!";
}
else
{
this.lbTip.Text = lr.ErrMsg;
}
}));
}
}
private void ShowWinMain()
{
WinMain wm = new WinMain();
this.Visible = false;
wm.ShowDialog();
this.Close();
}
点击登录之后,界面就会出现卡死的现象,有没有人遇到过?飞哥,能不能帮忙看看有什么问题。@苏飞
|