private void btnOK_Click(object sender, EventArgs e) { if (this.chkUserEmpty()) { if ("1".Equals(Variable.sCheckAdc) && this.txtValidateCode.Visible) { if (string.IsNullOrEmpty(this.txtValidateCode.Text)) { MessageBox.Show(string.Format("验证码不能为空!", new object[0])); this.txtValidateCode.Focus(); return; } if ((!Variable.sAdcNo.Equals(this.txtAdc.Text) || !Variable.sUserId.Equals(this.txtUser.Text)) || !this.sValidateCode.Equals(this.txtValidateCode.Text)) { MessageBox.Show(string.Format("验证码校验失败!", new object[0])); this.txtValidateCode.Focus(); return; } } else { Variable.sPhone = this.txtUser.Text; } this.pbPicWait.Visible = true; this.lblWaitText.Visible = true; this.btnOK.Enabled = false; this.btnSetParam.Enabled = false; this.btnChangePwd.Enabled = false; this.txtPassword.Enabled = false; this.txtUser.Enabled = false; this.txtAdc.Enabled = false; this.txtValidateCode.Enabled = false; this.btnSendValidateCode.Enabled = false; Variable.sUserId = this.txtUser.Text; Variable.sAdcNo = this.txtAdc.Text; Variable.sPassword = this.txtPassword.Text; WaitForm.ShowImageForm("正在加载画面,请稍候..."); if (this.workerLoadData == null) { this.workerLoadData = new BackgroundWorker(); this.workerLoadData.DoWork += new DoWorkEventHandler(this.execDataLoading); this.workerLoadData.RunWorkerCompleted += new RunWorkerCompletedEventHandler(this.exedDataLoaded); this.workerLoadData.ProgressChanged += new ProgressChangedEventHandler(this.setText); this.workerLoadData.WorkerReportsProgress = true; this.workerLoadData.WorkerSupportsCancellation = true; this.workerLoadData.RunWorkerAsync(); } } }