| | |
| | | public bool isUnbind; |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | Button btnTitle; |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | Button btnContent; |
| | | |
| | | /// <summary> |
| | | /// ChangeBindAccountPage |
| | | /// </summary> |
| | | public ChangeBindAccountPage() |
| | |
| | | /// <param name="optionType">操作目标类型 1:邮箱,2:手机</param> |
| | | /// <param name="titleId"></param> |
| | | /// <param name="contentTitleId"></param> |
| | | public void LoadPage(Action<string> act, int opt, int titleId, int contentTitleId) |
| | | public void LoadPage(Action<string> act, int opt, int titleId) |
| | | { |
| | | action = act; |
| | | optionType = opt; |
| | |
| | | }; |
| | | bodyView.AddChidren(rowView); |
| | | |
| | | Button btnTitle = new Button() |
| | | btnTitle = new Button() |
| | | { |
| | | X = Application.GetRealWidth(16), |
| | | Width = Application.GetRealWidth(180), |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextSize = CSS_FontSize.SubheadingFontSize, |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextID = contentTitleId, |
| | | //TextID = contentTitleId, |
| | | }; |
| | | rowView.AddChidren(btnTitle); |
| | | |
| | | Button btnContent = new Button() |
| | | btnContent = new Button() |
| | | { |
| | | Width = Application.GetRealWidth(359), |
| | | TextColor = CSS_Color.PromptingColor1, |
| | | TextSize = CSS_FontSize.TextFontSize, |
| | | TextAlignment = TextAlignment.CenterRight, |
| | | Text = optionType == 1 ? MainPage.LoginUser.userEmailInfo : MainPage.LoginUser.userMobileInfo, |
| | | //Text = optionType == 1 ? MainPage.LoginUser.userEmailInfo : MainPage.LoginUser.userMobileInfo, |
| | | }; |
| | | rowView.AddChidren(btnContent); |
| | | |
| | |
| | | }; |
| | | bodyView.AddChidren(btnChangeBind); |
| | | |
| | | |
| | | |
| | | //同时绑定邮箱或者手机才显示"更换验证方式" |
| | | if (!string.IsNullOrEmpty(MainPage.LoginUser.userMobileInfo) && !string.IsNullOrEmpty(MainPage.LoginUser.userEmailInfo)) |
| | | { |
| | |
| | | LoadEvent_ChangeVerificationMethod(btnChangeGetVer, btnTitle, btnContent); |
| | | } |
| | | |
| | | |
| | | SetContentTitleId(); |
| | | LoadEvent_GetVerification(btnChangeBind, titleId); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 设置按钮提示文字 |
| | | /// 修改绑定时提示:手机验证、邮箱验证 |
| | | /// 解绑时提示:当前手机手机号码、当前邮箱地址 |
| | | /// </summary> |
| | | void SetContentTitleId() |
| | | { |
| | | if (optionType == 2) |
| | | { |
| | | btnTitle.TextID = isUnbind ? StringId.CurPhone : StringId.PhoneNumberVerification; |
| | | btnContent.Text = MainPage.LoginUser.userMobileInfo; |
| | | } |
| | | else |
| | | { |
| | | btnTitle.TextID = isUnbind ? StringId.CurrentEmail : StringId.EmailVerification; |
| | | btnContent.Text = MainPage.LoginUser.userEmailInfo; |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | btn.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | optionType = optionType == 1 ? 2 : 1; |
| | | if (optionType == 2) |
| | | { |
| | | btnTitle.TextID = StringId.CurPhone; |
| | | btnContent.Text = MainPage.LoginUser.userMobileInfo; |
| | | } |
| | | else |
| | | { |
| | | btnTitle.TextID = StringId.CurrentEmail; |
| | | btnContent.Text = MainPage.LoginUser.userEmailInfo; |
| | | } |
| | | SetContentTitleId(); |
| | | }; |
| | | } |
| | | |
| | |
| | | }); |
| | | } |
| | | |
| | | }) { IsBackground = true }.Start(); |
| | | }) |
| | | { IsBackground = true }.Start(); |
| | | } |
| | | |
| | | |
| | | |
| | | }; |
| | | } |
| | | } |