| | |
| | | Action<string> action; |
| | | int titleId; |
| | | |
| | | /// <summary> |
| | | /// 操作目标类型 1:邮箱,2:手机 |
| | | /// </summary> |
| | | int optionType; |
| | | |
| | | public VerificationCodePage() |
| | | { |
| | | bodyView = this; |
| | | } |
| | | |
| | | public void LoadPage(Action<string> act,int tId) |
| | | public void LoadPage(Action<string> act,int tId,int ot) |
| | | { |
| | | action = act; |
| | | titleId = tId; |
| | | bodyView.BackgroundColor = CSS_Color.BackgroundColor; |
| | | optionType = ot; |
| | | new TopViewDiv(bodyView, Language.StringByID(tId)).LoadTopView(); |
| | | |
| | | Button btnTip = new Button() |
| | |
| | | X = Application.GetRealWidth(24), |
| | | Y = btnNum1.Bottom, |
| | | Width = Application.GetRealWidth(48), |
| | | Height = Application.GetRealHeight(1), |
| | | Height = Application.GetRealHeight(2), |
| | | BackgroundColor = CSS_Color.PromptingColor2, |
| | | SelectedBackgroundColor = CSS_Color.MainColor, |
| | | IsSelected = true |
| | | }; |
| | | bodyView.AddChidren(btnNum1Line); |
| | | |
| | |
| | | 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 = ""; |
| | | 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 = ""; |
| | | 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 = ""; |
| | | 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 = ""; |
| | | 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 = ""; |
| | | break; |
| | | case 5: |
| | | btnNum6Line.IsSelected = true; |
| | |
| | | btnNum4Line.Height = Application.GetRealHeight(1); |
| | | btnNum5Line.Height = Application.GetRealHeight(1); |
| | | btnNum6Line.Height = Application.GetRealHeight(2); |
| | | btnNum6Line.Text = ""; |
| | | break; |
| | | case 6: |
| | | btnNum6.Text = etCode.Substring(5, 1); |
| | |
| | | for (int i = 0; i < 2; i++) |
| | | { |
| | | MainPage.BasePageView.GetChildren(MainPage.BasePageView.ChildrenCount - 1).RemoveFromParent(); |
| | | //MainPage.BasePageView.RemoveAt(MainPage.BasePageView.ChildrenCount - 1); |
| | | } |
| | | action(account); |
| | | }); |
| | |
| | | }) |
| | | { IsBackground = true }.Start(); |
| | | } |
| | | else if (titleId == StringId.UnbindPhone) |
| | | { |
| | | var account = ""; |
| | | new Thread(() => |
| | | { |
| | | var result2 = new DAL.Server.HttpServerRequest().BindAccount(account); |
| | | if (result2 == "SUCCESS") |
| | | { |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | MainPage.LoginUser.userEmailInfo = account; |
| | | var page = new OperationResultDisPalyPage(); |
| | | page.Show(); |
| | | page.LoadPage(true, Language.StringByID(StringId.UnbindPhone), Language.StringByID(StringId.UnbindPhoneSuccess), ""); |
| | | |
| | | for (int i = 0; i < 2; i++) |
| | | { |
| | | MainPage.BasePageView.GetChildren(MainPage.BasePageView.ChildrenCount - 1).RemoveFromParent(); |
| | | } |
| | | action(account); |
| | | }); |
| | | } |
| | | else |
| | | { |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | new Tip() |
| | | { |
| | | CloseTime = 3, |
| | | Direction = AMPopTipDirection.None, |
| | | Text = Language.StringByID(StringId.OperationFailed), |
| | | }.Show(bodyView); |
| | | }); |
| | | } |
| | | }) |
| | | { IsBackground = true }.Start(); |
| | | |
| | | } |
| | | }); |
| | | } |
| | | }) |
| | |
| | | { |
| | | btnResend.IsSelected = false; |
| | | int time = 60; |
| | | new Thread(() => |
| | | { |
| | | 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) |
| | |
| | | }; |
| | | } |
| | | /// <summary> |
| | | /// 跳转绑定账号邮箱事件 |
| | | /// 跳转绑定账号信息事件 |
| | | /// </summary> |
| | | void LoadEvent_SkipBindAccountInfoPage(int skipTid) |
| | | { |