| | |
| | | /// <summary> |
| | | /// 修改昵称窗口 |
| | | /// </summary> |
| | | void LoadView_EidtNickname(Button btn1, Button btn2, ResidenceMemberInfo mInfo) |
| | | void LoadView_EidtNickname(Button btn1, Button btn2, ResidenceMemberInfo mInfo,Button btnMemberName) |
| | | { |
| | | EventHandler<MouseEventArgs> eventHandler = (sender, e) => |
| | | { |
| | |
| | | { |
| | | try |
| | | { |
| | | var responsePack = new HttpServerRequest().EditSubAccountNickName(str, mInfo.childAccountId); |
| | | var responsePack = new HttpServerRequest().EditSubAccountNickName(str, mInfo.id); |
| | | if (responsePack.Code.ToUpper() == StateCode.SUCCESS) |
| | | { |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | btn1.Text = str; |
| | | if (btnMemberName != null) |
| | | { |
| | | btnMemberName.Text = str; |
| | | } |
| | | }); |
| | | mInfo.nickName = str; |
| | | } |
| | |
| | | btn2.MouseUpEventHandler = eventHandler; |
| | | } |
| | | |
| | | void LoadView_BindAccount(ResidenceMemberInfo mInfo,Button btnShowText,Button btnClick,ImageView ivClick) |
| | | { |
| | | EventHandler<MouseEventArgs> eventHandler = (sender, e) => |
| | | { |
| | | if (!string.IsNullOrEmpty(btnShowText.Text)) |
| | | { |
| | | return; |
| | | } |
| | | |
| | | Action<string> callBack = (str) => |
| | | { |
| | | if (string.IsNullOrEmpty(str)) |
| | | { |
| | | new Tip() |
| | | { |
| | | CloseTime = 1, |
| | | Text = Language.StringByID(StringId.PleaseEnterContent), |
| | | Direction = AMPopTipDirection.None, |
| | | }.Show(bodyView); |
| | | return; |
| | | } |
| | | |
| | | var waitPage = new Loading(); |
| | | bodyView.AddChidren(waitPage); |
| | | waitPage.Start(Language.StringByID(StringId.PleaseWait)); |
| | | new Thread(() => |
| | | { |
| | | try |
| | | { |
| | | var responsePack = new HttpServerRequest().SubChildBindAccount(mInfo.id, str); |
| | | if (responsePack.Code.ToUpper() == StateCode.SUCCESS) |
| | | { |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | btnShowText.Text = str; |
| | | }); |
| | | //mInfo.Account = str; |
| | | |
| | | } |
| | | else |
| | | { |
| | | IMessageCommon.Current.ShowErrorInfoAlter(responsePack.Code); |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | MainPage.Log($"update user name error : {ex.Message}"); |
| | | } |
| | | finally |
| | | { |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | if (waitPage != null) |
| | | { |
| | | waitPage.RemoveFromParent(); |
| | | waitPage = null; |
| | | } |
| | | }); |
| | | } |
| | | }) |
| | | { IsBackground = true }.Start(); |
| | | }; |
| | | new PublicAssmebly().LoadDialog_EditParater(StringId.BindSubAccount, "", callBack, StringId.NicknameCannotBeEmpty, 0, new List<string>()); |
| | | }; |
| | | btnShowText.MouseUpEventHandler = eventHandler; |
| | | btnClick.MouseUpEventHandler = eventHandler; |
| | | ivClick.MouseUpEventHandler = eventHandler; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 修改创建场景权限 |
| | | /// </summary> |