| | |
| | | using HDL_ON.Entity; |
| | | using HDL_ON.UI.CSS; |
| | | using System.Collections.Generic; |
| | | using System.Threading; |
| | | using HDL_ON.DAL.Server; |
| | | |
| | | namespace HDL_ON.UI |
| | | { |
| | |
| | | |
| | | public void LoadPage() |
| | | { |
| | | #if DEBUG |
| | | Entity.DB_ResidenceData.Instance.SupportFacePass = true; |
| | | #endif |
| | | bodyView.BackgroundColor = CSS_Color.BackgroundColor; |
| | | //创建读取成员账号线程 |
| | | var thread = LoadThread_GetResidenceMemberAccount(); |
| | |
| | | { |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Width = Application.GetRealWidth(343), |
| | | //Height = Application.GetRealWidth(230), |
| | | Height = Application.GetRealWidth(180), |
| | | BackgroundColor = CSS_Color.MainBackgroundColor, |
| | | Radius = (uint)Application.GetRealWidth(12), |
| | |
| | | ScrollEnabled = false, |
| | | VerticalScrollBarEnabled = false,//隐藏滚动条 |
| | | }; |
| | | if (Entity.DB_ResidenceData.Instance.SupportFacePass) |
| | | { |
| | | sView.Height = Application.GetRealWidth(180 + 50); |
| | | } |
| | | contentView.AddChidren(sView); |
| | | #region 头像信息 |
| | | var view1 = new FrameLayout() |
| | |
| | | TextID = StringId.Member |
| | | }; |
| | | userTypeView.AddChidren(btnUserTypeName); |
| | | if(Language.CurrentLanguage == "English") |
| | | if (Language.CurrentLanguage == "English") |
| | | { |
| | | userTypeView.X = Application.GetRealWidth(260); |
| | | } |
| | |
| | | Text = HDLCommon.Current.GetUserName(memberInfo.memberName) |
| | | }; |
| | | view1.AddChidren(btnMemberName); |
| | | if (memberInfo.isVirtualAccount) |
| | | { |
| | | btnMemberName.Text = memberInfo.nickName; |
| | | |
| | | } |
| | | var btnMemberEmail = new Button() |
| | | { |
| | | X = Application.GetRealWidth(88), |
| | |
| | | Width = Application.GetRealWidth(311), |
| | | BackgroundColor = CSS_Color.DividingLineColor, |
| | | }); |
| | | LoadView_EidtNickname(btnNickname, btnNicknameRight, memberInfo); |
| | | LoadView_EidtNickname(btnNickname, btnNicknameRight, memberInfo, memberInfo.isVirtualAccount ? btnMemberName : null); |
| | | #endregion |
| | | |
| | | #region 使用权限 |
| | |
| | | }; |
| | | view3.AddChidren(btnPermissionRight); |
| | | |
| | | //sView.AddChidren(new Button() |
| | | //{ |
| | | // Gravity = Gravity.CenterHorizontal, |
| | | // Height = Application.GetRealWidth(1), |
| | | // Width = Application.GetRealWidth(311), |
| | | // BackgroundColor = CSS_Color.DividingLineColor, |
| | | //}); |
| | | |
| | | |
| | | EventHandler<MouseEventArgs> eHandler = (sender, e) => |
| | | { |
| | | action = () => { |
| | | action = () => |
| | | { |
| | | residenceMemberInfos.Remove(memberInfo); |
| | | LoadMemberRow(); |
| | | }; |
| | |
| | | mmp.LoadPage(); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | }; |
| | | sView.MouseUpEventHandler = eHandler; |
| | | view3.MouseUpEventHandler = eHandler; |
| | | btnPermissionTitle.MouseUpEventHandler = eHandler; |
| | | btnPermissionRight.MouseUpEventHandler = eHandler; |
| | | |
| | | #endregion |
| | | |
| | | //#region 创建场景 2020-12-23 隐藏创建场景按钮 |
| | | //var view4 = new FrameLayout() |
| | | //{ |
| | | // Height = Application.GetRealWidth(50), |
| | | //}; |
| | | //sView.AddChidren(view4); |
| | | |
| | | //var btnCreateSceneTitle = new Button() |
| | | //{ |
| | | // X = Application.GetRealWidth(16), |
| | | // Width = Application.GetRealWidth(200), |
| | | // TextAlignment = TextAlignment.CenterLeft, |
| | | // TextColor = CSS_Color.FirstLevelTitleColor, |
| | | // TextSize = CSS_FontSize.TextFontSize, |
| | | // TextID = StringId.CreateScene, |
| | | //}; |
| | | //view4.AddChidren(btnCreateSceneTitle); |
| | | #region 人脸管理 |
| | | if (Entity.DB_ResidenceData.Instance.SupportFacePass) |
| | | { |
| | | sView.AddChidren(new Button() |
| | | { |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Height = Application.GetRealWidth(1), |
| | | Width = Application.GetRealWidth(311), |
| | | BackgroundColor = CSS_Color.DividingLineColor, |
| | | }); |
| | | |
| | | //var btnCreateSceneRight = new Button() |
| | | //{ |
| | | // X = Application.GetRealWidth(287), |
| | | // Y = Application.GetRealHeight(4), |
| | | // Width = Application.GetMinRealAverage(38), |
| | | // Height = Application.GetMinRealAverage(38), |
| | | // UnSelectedImagePath = "Public/Switch_2.png", |
| | | // SelectedImagePath = "Public/SwitchOn_2.png", |
| | | // IsSelected = memberInfo.isAllowCreateScene |
| | | //}; |
| | | //view4.AddChidren(btnCreateSceneRight); |
| | | var view4 = new FrameLayout() |
| | | { |
| | | Height = Application.GetRealWidth(49), |
| | | }; |
| | | sView.AddChidren(view4); |
| | | |
| | | //LoadView_ChangeCreateSceneState(btnCreateSceneRight, btnCreateSceneTitle, memberInfo); |
| | | //#endregion |
| | | var btnFaceManagementTitle = new Button() |
| | | { |
| | | X = Application.GetRealWidth(16), |
| | | Width = Application.GetRealWidth(330), |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextSize = CSS_FontSize.TextFontSize, |
| | | TextID = StringId.FaceManagemant, |
| | | }; |
| | | view4.AddChidren(btnFaceManagementTitle); |
| | | |
| | | var btnFaceManagementRight = new Button() |
| | | { |
| | | X = Application.GetRealWidth(311), |
| | | Gravity = Gravity.CenterVertical, |
| | | Width = Application.GetMinRealAverage(16), |
| | | Height = Application.GetMinRealAverage(16), |
| | | UnSelectedImagePath = "Public/Right.png", |
| | | }; |
| | | view4.AddChidren(btnFaceManagementRight); |
| | | |
| | | |
| | | EventHandler<MouseEventArgs> eFaceHandler = (sender, e) => |
| | | { |
| | | var page = new MemberFaceManagementPage(memberInfo); |
| | | MainPage.BasePageView.AddChidren(page); |
| | | page.LoadPage(); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | }; |
| | | view4.MouseUpEventHandler = eFaceHandler; |
| | | btnFaceManagementRight.MouseUpEventHandler = eFaceHandler; |
| | | btnFaceManagementTitle.MouseUpEventHandler = eFaceHandler; |
| | | } |
| | | #endregion |
| | | |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |