| | |
| | | }; |
| | | bodyView.AddChidren(contentView); |
| | | |
| | | |
| | | |
| | | #region 用户名称 |
| | | var userNameView = new FrameLayout() |
| | | { |
| | |
| | | { |
| | | try |
| | | { |
| | | var resultObj = ApiUtlis.Ins.HttpRequest.EditDoorlockUserName(device.deviceId, doorlockUser.extUserId, str); |
| | | if (resultObj.Code == StateCode.SUCCESS) |
| | | var pack = ApiUtlis.Ins.HttpRequest.EditDoorlockUserName(device.deviceId, doorlockUser.extUserId, str); |
| | | if (pack.Code == StateCode.SUCCESS) |
| | | { |
| | | Application.RunOnMainThread(() => |
| | | { |
| | |
| | | else |
| | | { |
| | | //失败提示 |
| | | IMessageCommon.Current.ShowErrorInfoAlter(resultObj.Code); |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | if (!string.IsNullOrEmpty(pack.message)) |
| | | { |
| | | var tip = new Tip() |
| | | { |
| | | MaxWidth = Application.GetRealWidth(300), |
| | | Text = $"{pack.message}({pack.Code})", |
| | | CloseTime = 3, |
| | | Direction = AMPopTipDirection.None |
| | | }; |
| | | tip.Show(MainPage.BaseView); |
| | | } |
| | | }); |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | |
| | | { IsBackground = true }.Start(); |
| | | }; |
| | | var pa = new PublicAssmebly(); |
| | | pa.entryMaxLength = 20; |
| | | pa.LoadDialog_EditParater(StringId.ChangeName, doorlockUser.lockUserName, callBack, StringId.UesrNameCannotBeEmpty, 0, new List<string>()); |
| | | pa.entryMaxLength = 30; |
| | | pa.LoadDialog_EditParater(StringId.ChangeName, "", callBack, StringId.UesrNameCannotBeEmpty, 0, new List<string>()); |
| | | }; |
| | | btnUserName.MouseUpEventHandler = eventHandler; |
| | | btnEditUserNameIcon.MouseUpEventHandler = eventHandler; |
| | |
| | | void initOptionView(bool isEdit) |
| | | { |
| | | if(doorlockUser.faceCount == 0&& |
| | | doorlockUser.faceCount == 0 && |
| | | doorlockUser.fingerCount == 0 && |
| | | doorlockUser.pwdCount == 0 && |
| | | doorlockUser.cardCount == 0) |
| | | { |
| | |
| | | |
| | | |
| | | int childrenViewHeight = Application.GetRealWidth(116); |
| | | int permissionsViewHeight = Application.GetRealHeight(291 + 92); |
| | | int permissionsViewHeight = Application.GetRealHeight(291 + 92 + 100); |
| | | if (userPermissionsView!= null) |
| | | { |
| | | userPermissionsView.RemoveAll(); |
| | | |
| | | if (isEdit) |
| | | { |
| | | permissionsViewHeight = Application.GetRealHeight(391 + 50); |
| | | permissionsViewHeight = Application.GetRealHeight(391 + 50 + 100); |
| | | childrenViewHeight = Application.GetRealWidth(156); |
| | | } |
| | | userPermissionsView.Height = permissionsViewHeight; |
| | | userPermissionsView.Height = permissionsViewHeight ; |
| | | } |
| | | else |
| | | { |
| | |
| | | var delUserView = new FrameLayout() |
| | | { |
| | | Y = unlockOptionView.Bottom, |
| | | Height = Application.GetRealHeight(110), |
| | | Height = Application.GetRealHeight(310), |
| | | BackgroundColor = CSS_Color.BackgroundColor, |
| | | }; |
| | | userPermissionsView.AddChidren(delUserView); |