| | |
| | | /// 操作目标类型 1:邮箱,2:手机 |
| | | /// </summary> |
| | | int optionType; |
| | | |
| | | /// <summary> |
| | | /// 倒计时时间 |
| | | /// </summary> |
| | | int time = 0; |
| | | public VerificationCodePage() |
| | | { |
| | | bodyView = this; |
| | | } |
| | | |
| | | public void LoadPage(Action<string> act,int tId,int ot) |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | /// <param name="act">回掉函数</param> |
| | | /// <param name="tId">页面标题</param> |
| | | /// <param name="ot">操作类型1:邮箱;2:手机</param> |
| | | /// <param name="time">倒计时时间</param> |
| | | public void LoadPage(Action<string> act,int tId,int ot,int t) |
| | | { |
| | | action = act; |
| | | titleId = tId; |
| | | bodyView.BackgroundColor = CSS_Color.BackgroundColor; |
| | | optionType = ot; |
| | | new TopViewDiv(bodyView, Language.StringByID(tId)).LoadTopView(); |
| | | time = t; |
| | | Action backAction = () => { |
| | | Application.HideSoftInput(); |
| | | }; |
| | | new TopViewDiv(bodyView, Language.StringByID(tId)).LoadTopView(backAction); |
| | | |
| | | Button btnTip = new Button() |
| | | { |
| | |
| | | btnNum4Line.Height = Application.GetRealHeight(1); |
| | | btnNum5Line.Height = Application.GetRealHeight(1); |
| | | btnNum6Line.Height = Application.GetRealHeight(1); |
| | | btnNum1Line.Text = ""; |
| | | btnNum2Line.Text = ""; |
| | | btnNum3Line.Text = ""; |
| | | btnNum4Line.Text = ""; |
| | | btnNum5Line.Text = ""; |
| | | btnNum6Line.Text = ""; |
| | | btnNum1.Text = ""; |
| | | btnNum2.Text = ""; |
| | | btnNum3.Text = ""; |
| | | btnNum4.Text = ""; |
| | | btnNum5.Text = ""; |
| | | btnNum6.Text = ""; |
| | | break; |
| | | case 1: |
| | | btnNum2Line.IsSelected = true; |
| | |
| | | btnNum4Line.Height = Application.GetRealHeight(1); |
| | | btnNum5Line.Height = Application.GetRealHeight(1); |
| | | btnNum6Line.Height = Application.GetRealHeight(1); |
| | | btnNum2Line.Text = ""; |
| | | btnNum3Line.Text = ""; |
| | | btnNum4Line.Text = ""; |
| | | btnNum5Line.Text = ""; |
| | | btnNum6Line.Text = ""; |
| | | btnNum2.Text = ""; |
| | | btnNum3.Text = ""; |
| | | btnNum4.Text = ""; |
| | | btnNum5.Text = ""; |
| | | btnNum6.Text = ""; |
| | | break; |
| | | case 2: |
| | | btnNum3Line.IsSelected = true; |
| | |
| | | btnNum4Line.Height = Application.GetRealHeight(1); |
| | | btnNum5Line.Height = Application.GetRealHeight(1); |
| | | btnNum6Line.Height = Application.GetRealHeight(1); |
| | | btnNum3Line.Text = ""; |
| | | btnNum4Line.Text = ""; |
| | | btnNum5Line.Text = ""; |
| | | btnNum6Line.Text = ""; |
| | | btnNum3.Text = ""; |
| | | btnNum4.Text = ""; |
| | | btnNum5.Text = ""; |
| | | btnNum6.Text = ""; |
| | | break; |
| | | case 3: |
| | | btnNum4Line.IsSelected = true; |
| | |
| | | btnNum4Line.Height = Application.GetRealHeight(2); |
| | | btnNum5Line.Height = Application.GetRealHeight(1); |
| | | btnNum6Line.Height = Application.GetRealHeight(1); |
| | | btnNum4Line.Text = ""; |
| | | btnNum5Line.Text = ""; |
| | | btnNum6Line.Text = ""; |
| | | btnNum4.Text = ""; |
| | | btnNum5.Text = ""; |
| | | btnNum6.Text = ""; |
| | | break; |
| | | case 4: |
| | | btnNum5Line.IsSelected = true; |
| | |
| | | btnNum4Line.Height = Application.GetRealHeight(1); |
| | | btnNum5Line.Height = Application.GetRealHeight(2); |
| | | btnNum6Line.Height = Application.GetRealHeight(1); |
| | | btnNum5Line.Text = ""; |
| | | btnNum6Line.Text = ""; |
| | | btnNum5.Text = ""; |
| | | btnNum6.Text = ""; |
| | | break; |
| | | case 5: |
| | | btnNum6Line.IsSelected = true; |
| | |
| | | btnNum4Line.Height = Application.GetRealHeight(1); |
| | | btnNum5Line.Height = Application.GetRealHeight(1); |
| | | btnNum6Line.Height = Application.GetRealHeight(2); |
| | | btnNum6Line.Text = ""; |
| | | btnNum6.Text = ""; |
| | | break; |
| | | case 6: |
| | | btnNum6.Text = etCode.Substring(5, 1); |
| | |
| | | { |
| | | act = new PublicAssmebly().TipLoadingMsgDialog(Language.StringByID(StringId.SavingPleaseWait)); |
| | | }); |
| | | var response = new DAL.Server.HttpServerRequest().ValidatorCode(MainPage.LoginUser.userEmailInfo, etCode, MainPage.LoginUser.areaCode); |
| | | var verAccount = optionType == 1 ? MainPage.LoginUser.userEmailInfo : MainPage.LoginUser.userMobileInfo; |
| | | var response = new DAL.Server.HttpServerRequest().ValidatorCode(verAccount, etCode, MainPage.LoginUser.areaCode); |
| | | if (response.StateCode.ToUpper() == "SUCCESS") |
| | | { |
| | | result = true; |
| | |
| | | { |
| | | new Tip() |
| | | { |
| | | CloseTime = 3, |
| | | CloseTime = 1, |
| | | Direction = AMPopTipDirection.None, |
| | | Text = erorrInfo, |
| | | }.Show(bodyView); |
| | |
| | | }); |
| | | if (result) |
| | | { |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | new PublicAssmebly().TipMsgAutoClose(Language.StringByID(StringId.ValidationSuccessful), true); |
| | | }); |
| | | Thread.Sleep(1600); |
| | | //Application.RunOnMainThread(() => |
| | | //{ |
| | | // new PublicAssmebly().TipMsgAutoClose(Language.StringByID(StringId.ValidationSuccessful), true); |
| | | //}); |
| | | //Thread.Sleep(1600); |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | MainPage.BasePageView.GetChildren(MainPage.BasePageView.ChildrenCount - 1).RemoveFromParent(); |
| | |
| | | { |
| | | new Tip() |
| | | { |
| | | CloseTime = 3, |
| | | CloseTime = 1, |
| | | Direction = AMPopTipDirection.None, |
| | | Text = Language.StringByID(StringId.OperationFailed), |
| | | }.Show(bodyView); |
| | |
| | | { |
| | | new Tip() |
| | | { |
| | | CloseTime = 3, |
| | | CloseTime = 1, |
| | | Direction = AMPopTipDirection.None, |
| | | Text = Language.StringByID(StringId.OperationFailed), |
| | | }.Show(bodyView); |
| | |
| | | void LoadThread_SendVerCode() |
| | | { |
| | | btnResend.IsSelected = false; |
| | | int time = 60; |
| | | new Thread(() => |
| | | et.Foucs = true; |
| | | if (time == 0) |
| | | { |
| | | if (optionType == 1) |
| | | time = 60; |
| | | new Thread(() => |
| | | { |
| | | var result = new DAL.Server.HttpServerRequest().GetLoginVerCode(MainPage.LoginUser.userEmailInfo); |
| | | } |
| | | else if (optionType == 2) |
| | | { |
| | | var result = new DAL.Server.HttpServerRequest().GetLoginVerCode(MainPage.LoginUser.userMobileInfo); |
| | | } |
| | | }) |
| | | { IsBackground = true }.Start(); |
| | | if (optionType == 1) |
| | | { |
| | | var result = new DAL.Server.HttpServerRequest().GetLoginVerCode(MainPage.LoginUser.userEmailInfo); |
| | | } |
| | | else if (optionType == 2) |
| | | { |
| | | var result = new DAL.Server.HttpServerRequest().GetLoginVerCode(MainPage.LoginUser.userMobileInfo); |
| | | } |
| | | }) |
| | | { IsBackground = true }.Start(); |
| | | } |
| | | new Thread(() => |
| | | { |
| | | while (time > 0) |
| | |
| | | { |
| | | btnResend.IsSelected = true; |
| | | btnResend.TextID = StringId.GetVerificationCode; |
| | | time = 0; |
| | | }); |
| | | }) |
| | | { IsBackground = true }.Start(); |