| | |
| | | { |
| | | bodyView = this; |
| | | residenceMemberInfos = new List<ResidenceMemberInfo>(); |
| | | #if DEBUG |
| | | //tr测试住宅----测试分享 |
| | | var light = new Light() |
| | | { |
| | | sid = "030101123456780202010005ABCP", |
| | | deviceId = "1333657366709645314", |
| | | name = "灯1", |
| | | }; |
| | | light.SaveFunctionData(); |
| | | |
| | | |
| | | var light2 = new Light() |
| | | { |
| | | sid = "030101123456780202010005ABCQ", |
| | | deviceId = "1333657366743199746", |
| | | name = "灯2" |
| | | }; |
| | | light2.SaveFunctionData(); |
| | | DB_ResidenceData.functionList.lights.Add(light); |
| | | DB_ResidenceData.functionList.lights.Add(light2); |
| | | #endif |
| | | } |
| | | |
| | | public void LoadPage() |
| | |
| | | { |
| | | LoadThread_GetResidenceMemberAccount().Start(); |
| | | }; |
| | | Action<string, string> refreshAction = (s1, s2) => |
| | | Action refreshAction = () => |
| | | { |
| | | var mmp = new AddMemberScanPage(backAction_AddMember); |
| | | MainPage.BasePageView.AddChidren(mmp); |
| | | mmp.LoadPage(); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | }; |
| | | new TopViewDiv(bodyView, Language.StringByID(StringId.MemberManagement)).LoadTopView_AddIcon_BackAction("Member", refreshAction, backAction); |
| | | new TopViewDiv(bodyView, Language.StringByID(StringId.MemberManagement)).LoadTopView_MemberTopView(refreshAction, backAction); |
| | | |
| | | contentView = new VerticalScrolViewLayout() |
| | | { |
| | |
| | | { |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Width = Application.GetRealWidth(343), |
| | | Height = Application.GetRealWidth(230), |
| | | //Height = Application.GetRealWidth(230), |
| | | Height = Application.GetRealWidth(180), |
| | | BackgroundColor = CSS_Color.MainBackgroundColor, |
| | | Radius = (uint)Application.GetRealWidth(12), |
| | | BorderColor = 0x00000000, |
| | | BorderWidth = 0, |
| | | ScrollEnabled = false, |
| | | VerticalScrollBarEnabled = false,//隐藏滚动条 |
| | | }; |
| | | contentView.AddChidren(sView); |
| | | #region 头像信息 |
| | |
| | | TextID = StringId.Member |
| | | }; |
| | | userTypeView.AddChidren(btnUserTypeName); |
| | | if(Language.CurrentLanguage == "English") |
| | | { |
| | | userTypeView.X = Application.GetRealWidth(260); |
| | | } |
| | | |
| | | var memberHeadImageView = new ImageView() |
| | | { |
| | |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextSize = CSS_FontSize.TextFontSize, |
| | | IsBold = true, |
| | | Text = memberInfo.nickName |
| | | //Text = memberInfo.UserName, |
| | | Text = HDLCommon.Current.GetUserName(memberInfo.memberName) |
| | | }; |
| | | view1.AddChidren(btnMemberName); |
| | | |
| | |
| | | }; |
| | | view3.AddChidren(btnPermissionRight); |
| | | |
| | | sView.AddChidren(new Button() |
| | | { |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Height = Application.GetRealWidth(1), |
| | | Width = Application.GetRealWidth(311), |
| | | BackgroundColor = CSS_Color.DividingLineColor, |
| | | }); |
| | | //sView.AddChidren(new Button() |
| | | //{ |
| | | // Gravity = Gravity.CenterHorizontal, |
| | | // Height = Application.GetRealWidth(1), |
| | | // Width = Application.GetRealWidth(311), |
| | | // BackgroundColor = CSS_Color.DividingLineColor, |
| | | //}); |
| | | |
| | | EventHandler<MouseEventArgs> eHandler = (sender, e) => |
| | | { |
| | |
| | | |
| | | #endregion |
| | | |
| | | #region 创建场景 |
| | | var view4 = new FrameLayout() |
| | | { |
| | | Height = Application.GetRealWidth(50), |
| | | }; |
| | | sView.AddChidren(view4); |
| | | //#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); |
| | | //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); |
| | | |
| | | 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 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); |
| | | |
| | | LoadView_ChangeCreateSceneState(btnCreateSceneRight, btnCreateSceneTitle, memberInfo); |
| | | #endregion |
| | | //LoadView_ChangeCreateSceneState(btnCreateSceneRight, btnCreateSceneTitle, memberInfo); |
| | | //#endregion |
| | | } |
| | | } |
| | | } |