| | |
| | | using System; |
| | | using HDL_ON.Entity; |
| | | using Shared; |
| | | |
| | | namespace HDL_ON.UI |
| | |
| | | LoadEvent_Logout(); |
| | | LoadEvent_EditUserName(); |
| | | LoadEvent_SkipInterpretationSettings(); |
| | | LoadEvent_ChangeBindEmail(); |
| | | LoadEvent_ChangeBindPhone(); |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | /// </summary> |
| | | void LoadEvent_ChangeHeadImageView() |
| | | { |
| | | userHeadImageView.MouseUpEventHandler = (sender, e) => { |
| | | userHeadImageView.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | LoadPictureOptionView(); |
| | | }; |
| | | } |
| | |
| | | /// </summary> |
| | | void LoadEvent_Logout() |
| | | { |
| | | btnLogout.MouseUpEventHandler += (sender, e) => { |
| | | btnLogout.MouseUpEventHandler += (sender, e) => |
| | | { |
| | | MainPage.LoginUser.lastTime = DateTime.MinValue; |
| | | MainPage.LoginUser.SaveUserInfo(); |
| | | MainPage.GoLoginPage(MainPage.LoginUser.accountString); |
| | | FileUtils.DeleteAllFile(); |
| | | DB_ResidenceData.residenceData.EixtAccount(); |
| | | }; |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 加载背景图选择区域事件列表 |
| | |
| | | |
| | | btnTakePicture.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | btnTakePicture.IsSelected = true; |
| | | }; |
| | | btnTakePicture.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | btnTakePicture.IsSelected = false; |
| | | var pid = Guid.NewGuid(); |
| | | CropImage.TakePicture((Action<string>)((imagePath) => |
| | | { |
| | |
| | | |
| | | btnAlbum.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | btnAlbum.IsSelected = true; |
| | | }; |
| | | |
| | | btnAlbum.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | btnAlbum.IsSelected = false; |
| | | var pid = Guid.NewGuid(); |
| | | CropImage.SelectPicture((imagePath) => |
| | | { |
| | |
| | | }.Show(bodyView); |
| | | return; |
| | | } |
| | | if(str == MainPage.LoginUser.userName) |
| | | { |
| | | return; |
| | | } |
| | | var waitPage = new Loading(); |
| | | waitPage.Start(Language.StringByID(StringId.PleaseWait)); |
| | | new System.Threading.Thread(() => |
| | |
| | | } |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | //提示原因 |
| | | var tip = new Tip() |
| | | //提示原因 |
| | | var tip = new Tip() |
| | | { |
| | | Text = tipStr, |
| | | CloseTime = 3, |
| | |
| | | tip.Show(bodyView); |
| | | }); |
| | | } |
| | | }catch (Exception ex) |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | MainPage.Log($"update user name error : {ex.Message}"); |
| | | } |
| | | finally |
| | | { |
| | | Application.RunOnMainThread(() => { |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | waitPage.Hide(); |
| | | }); |
| | | } |
| | | }) |
| | | { IsBackground = true }.Start(); |
| | | }; |
| | | new PublicAssmebly().LoadDialog_EditParater(StringId.UesrName, MainPage.LoginUser.userName, callBack,StringId.UesrNameCannotBeEmpty,0,new System.Collections.Generic.List<string>()); |
| | | new PublicAssmebly().LoadDialog_EditParater(StringId.UesrName, MainPage.LoginUser.userName, callBack, StringId.UesrNameCannotBeEmpty, 0, new System.Collections.Generic.List<string>()); |
| | | }; |
| | | btnUserName.MouseUpEventHandler = eventHandler; |
| | | btnEditUserNameIcon.MouseUpEventHandler = eventHandler; |
| | | } |
| | | |
| | | #region 修改绑定邮箱 |
| | | /// <summary> |
| | | /// 修改绑定邮箱 |
| | | /// </summary> |
| | | void LoadEvent_ChangeBindEmail() |
| | | { |
| | | EventHandler<MouseEventArgs> eventHandler = (sender, e) => { |
| | | Action<string> action = (email) => |
| | | { |
| | | btnUserEmailInfo.Text = email; |
| | | }; |
| | | |
| | | var aep = new AccountBindInfoPage(); |
| | | MainPage.BasePageView.AddChidren(aep); |
| | | aep.LoadPage(action,1,StringId.EmailAddress); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | }; |
| | | btnUserEmailInfo.MouseUpEventHandler = eventHandler; |
| | | btnUserEmailRight.MouseUpEventHandler = eventHandler; |
| | | userEmailInfoView.MouseUpEventHandler = eventHandler; |
| | | } |
| | | /// <summary> |
| | | /// 修改绑定手机 |
| | | /// </summary> |
| | | void LoadEvent_ChangeBindPhone() |
| | | { |
| | | EventHandler<MouseEventArgs> eventHandler = (sender, e) => { |
| | | Action<string> action = (phone) => |
| | | { |
| | | btnUserPhoneInfo.Text = phone; |
| | | }; |
| | | |
| | | var aep = new AccountBindInfoPage(); |
| | | MainPage.BasePageView.AddChidren(aep); |
| | | aep.LoadPage(action, 2, StringId.PhoneInfo); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | }; |
| | | btnUserPhoneInfo.MouseUpEventHandler = eventHandler; |
| | | btnUserPhoneRight.MouseUpEventHandler = eventHandler; |
| | | userPhoneInfoView.MouseUpEventHandler = eventHandler; |
| | | } |
| | | #endregion |
| | | |
| | | #region 解锁设置区域 |
| | | void LoadEvent_SkipInterpretationSettings() |
| | |
| | | #endregion |
| | | |
| | | } |
| | | } |
| | | } |