1. 登陆中。。 登陆成功
BackgroundWorker worker = new BackgroundWorker(); worker.DoWork += (o, ea) => { Login(sName, sPassword); }; worker.RunWorkerCompleted += (o, ea) => { if (ea.Error != null) { tbMsg.Text = ea.Error.Message; Password.Clear(); Password.Focus(); } else { loginStatus.Text = "登录成功!"; if ((bool)chkRemember.IsChecked) { setRememberMe(true, sName, sPassword); } } }; loginStatus.Text = "正在登录中..."; worker.RunWorkerAsync();
时间: 2024-10-09 21:06:08