| | |
| | | |
| | | namespace HDL_ON.UI |
| | | { |
| | | /// <summary> |
| | | /// 已绑定手机或者邮箱的页面 |
| | | /// </summary> |
| | | public partial class AccountBindInfoPage : FrameLayout |
| | | { |
| | | FrameLayout bodyView; |
| | |
| | | /// </summary> |
| | | /// <param name="act">刷新绑定信息方法</param> |
| | | /// <param name="option">修复信息的类型:1:邮箱,2:手机</param> |
| | | public void LoadPage(Action<string> act,int ot,int tId) |
| | | public void LoadPage(Action<string> act, int ot, int tId) |
| | | { |
| | | action = act; |
| | | optionType = ot; |
| | |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextSize = CSS_FontSize.SubheadingFontSize, |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextID = optionType == 1 ? StringId.CurrentEmail : StringId.CurPhone, |
| | | TextID = optionType == 1 ? StringId.CurrentEmail : StringId.CurPhone, |
| | | }; |
| | | rowView.AddChidren(btnTitle); |
| | | |
| | |
| | | TextColor = CSS_Color.PromptingColor1, |
| | | TextSize = CSS_FontSize.TextFontSize, |
| | | TextAlignment = TextAlignment.CenterRight, |
| | | Text = optionType == 1 ? MainPage.LoginUser.userEmailInfo : MainPage.LoginUser.userMobileInfo, |
| | | Text = optionType == 1 ? UserInfo.Current.userEmailInfo : UserInfo.Current.userMobileInfo, |
| | | }; |
| | | rowView.AddChidren(btnContent); |
| | | |
| | |
| | | }; |
| | | bodyView.AddChidren(btnChangeBind); |
| | | |
| | | if( (!string.IsNullOrEmpty(MainPage.LoginUser.userMobileInfo) && optionType == 1) || (!string.IsNullOrEmpty(MainPage.LoginUser.userMobileInfo) && optionType == 2)) |
| | | //同时绑定邮箱或者手机才显示"更换验证方式" |
| | | if (!string.IsNullOrEmpty( UserInfo.Current.userMobileInfo) && !string.IsNullOrEmpty( UserInfo.Current.userEmailInfo)) |
| | | { |
| | | Button btnUnbind = new Button() |
| | | { |
| | |
| | | /// </summary> |
| | | void LoadEvent_SkipChangeBandAccountInfo(Button button) |
| | | { |
| | | EventHandler<MouseEventArgs> eventHandler = (sender, e) => { |
| | | EventHandler<MouseEventArgs> eventHandler = (sender, e) => |
| | | { |
| | | var cbe = new ChangeBindAccountPage(); |
| | | cbe.isUnbind = false; |
| | | MainPage.BasePageView.AddChidren(cbe); |
| | | if (optionType == 1) |
| | | { |
| | | cbe.LoadPage(action, optionType, StringId.ModifyBindingEmail, StringId.CurrentEmail); |
| | | cbe.LoadPage(action, optionType, StringId.ModifyBindingEmail); |
| | | } |
| | | else if(optionType == 2) |
| | | else if (optionType == 2) |
| | | { |
| | | cbe.LoadPage(action, optionType, StringId.ModifyBindingPhone, StringId.CurPhone); |
| | | cbe.LoadPage(action, optionType, StringId.ModifyBindingPhone); |
| | | } |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | }; |
| | |
| | | /// </summary> |
| | | void LoadEvent_SkipDelBandAccountInfo(Button button) |
| | | { |
| | | EventHandler<MouseEventArgs> eventHandler = (sender, e) => { |
| | | EventHandler<MouseEventArgs> eventHandler = (sender, e) => |
| | | { |
| | | var cbe = new ChangeBindAccountPage(); |
| | | cbe.isUnbind = true;//是否为解绑标记 |
| | | MainPage.BasePageView.AddChidren(cbe); |
| | | if (optionType == 1) |
| | | { |
| | | cbe.LoadPage(action, optionType, StringId.UnbindEmail, StringId.CurrentEmail); |
| | | cbe.LoadPage(action, optionType, StringId.UnbindEmail); |
| | | } |
| | | else if(optionType == 2) |
| | | else if (optionType == 2) |
| | | { |
| | | cbe.LoadPage(action, optionType, StringId.UnbindPhone, StringId.CurPhone); |
| | | cbe.LoadPage(action, optionType, StringId.UnbindPhone); |
| | | } |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | }; |