| | |
| | | /// <summary> |
| | | /// 账号 |
| | | /// </summary> |
| | | private string account; |
| | | private string account = string.Empty; |
| | | /// <summary> |
| | | /// OpenID |
| | | /// </summary> |
| | |
| | | codeRow = new CodeForRegisterRowForm(); |
| | | codeRow.Init(accountCodeFrameLayout, 29, 530); |
| | | codeRow.VerificationCodeET.TextChangeEventHandler += Code_TextChange; |
| | | codeRow.SendCodeBtn.MouseUpEventHandler += SendCode_MouseUpEventAsync; |
| | | codeRow.SendCodeBtn.ButtonClickEvent += SendCode_MouseUpEventAsync; |
| | | } |
| | | #endregion |
| | | |
| | |
| | | errorBtn.Text = string.Empty; |
| | | if ((sender as EditText).Text.Trim().Length > 0) |
| | | { |
| | | codeRow.SendCodeBtn.Enable = codeRow.SendCodeBtn.IsSelected = true; |
| | | if (codeRow.SendCodeBtn.CanClick == false)
|
| | | {
|
| | | codeRow.SendCodeBtn.CanClick = true;
|
| | | codeRow.SendCodeBtn.BackgroundColor = 0xFFFC744B;
|
| | | } |
| | | } |
| | | else |
| | | { |
| | | codeRow.SendCodeBtn.Enable = codeRow.SendCodeBtn.IsSelected = false; |
| | | codeRow.SendCodeBtn.CanClick = false;
|
| | | codeRow.SendCodeBtn.BackgroundColor = 0xFFFEBCA9; |
| | | } |
| | | account = (sender as EditText).Text.Trim(); |
| | | } |
| | |
| | | } |
| | | |
| | | CommonPage.Loading.Start(); |
| | | (sender as Button).Enable = false; |
| | | (sender as UserCenter.NormalViewControl).CanClick = false; |
| | | try |
| | | { |
| | | int companyInt = 0; |
| | |
| | | var requestRevertObj = await CommonFormResouce.RegisterSendVerCode(reqDto); |
| | | if (requestRevertObj == null) |
| | | { |
| | | CommonPage.Instance.FailureToServer(); |
| | | CommonPage.Instance.FailureToServer();
|
| | | (sender as UserCenter.NormalViewControl).CanClick = true; |
| | | return; |
| | | } |
| | | var stateCodeStr = requestRevertObj.StateCode.ToUpper(); |
| | |
| | | codeRow.TimeBegin(); |
| | | var alert = new Alert(Language.StringByID(R.MyInternationalizationString.TIP), Language.StringByID(R.MyInternationalizationString.SendVerificationCodeSuccess), Language.StringByID(R.MyInternationalizationString.Confrim)); |
| | | alert.Show(); |
| | | return; |
| | | } |
| | | else if (stateCodeStr == "PARAMETEROREMPTY") |
| | | |
| | | if (stateCodeStr == "PARAMETEROREMPTY") |
| | | { |
| | | //提供的参数错误 |
| | | errorBtn.TextID = R.MyInternationalizationString.PARAMETEROREMPTY; |
| | | (sender as Button).Enable = true; |
| | | } |
| | | else if (stateCodeStr == "SENDFAIL") |
| | | { |
| | | //验证码发送失败 |
| | | errorBtn.TextID = R.MyInternationalizationString.SENDFAIL;
|
| | | (sender as Button).Enable = true; |
| | | errorBtn.TextID = R.MyInternationalizationString.SENDFAIL; |
| | | } |
| | | else if (stateCodeStr == "EXIST") |
| | | { |
| | | //账号存在 |
| | | errorBtn.TextID = R.MyInternationalizationString.AccountHasBeenRegistered;
|
| | | (sender as Button).Enable = true; |
| | | errorBtn.TextID = R.MyInternationalizationString.AccountHasBeenRegistered; |
| | | } |
| | | else |
| | | { |
| | | errorBtn.TextID = R.MyInternationalizationString.RequestServerFailed;
|
| | | (sender as Button).Enable = true; |
| | | errorBtn.TextID = R.MyInternationalizationString.RequestServerFailed; |
| | | } |
| | | } |
| | | catch |
| | | { |
| | | errorBtn.TextID = R.MyInternationalizationString.RequestServerFailed; |
| | | (sender as Button).Enable = true; |
| | | } |
| | | finally |
| | | { |