| | |
| | | #region 场景底部切换显示区域 |
| | | FrameLayout topView; |
| | | /// <summary> |
| | | /// 场景区域,顶部区域 |
| | | /// </summary> |
| | | FrameLayout sceneTopView; |
| | | /// <summary> |
| | | /// 楼层选择下拉图标 |
| | | /// </summary> |
| | | Button btnFloorDownIcon; |
| | |
| | | |
| | | public void LoadPage() |
| | | { |
| | | MainPage.CurPageIndex = 2; |
| | | bodyView.BackgroundColor = CSS_Color.MainBackgroundColor; |
| | | #region top |
| | | topView = new FrameLayout() |
| | |
| | | bodyView.AddChidren(topView); |
| | | |
| | | //不是A网关或者是成员 只允许添加场景隐藏自动化 |
| | | var HideAutoPage = DB_ResidenceData.Instance.GatewayType != 1 || DB_ResidenceData.Instance.CurrentRegion.IsOthreShare; |
| | | var HideAutoPage = DB_ResidenceData.Instance.CurrentRegion.isOtherShare; |
| | | //判断是否需要隐藏自动化 |
| | | if (HideAutoPage) |
| | | { |
| | |
| | | Height = Application.GetMinRealAverage(28), |
| | | UnSelectedImagePath = "Public/AddIcon.png", |
| | | }; |
| | | if (!DB_ResidenceData.Instance.CurrentRegion.IsOthreShare) |
| | | //if (!DB_ResidenceData.Instance.CurrentRegion.isOtherShare) |
| | | { |
| | | topView.AddChidren(btnAddIconBg); |
| | | } |
| | |
| | | Width = Application.GetMinRealAverage(28+30), |
| | | Height = Application.GetMinRealAverage(28+29), |
| | | }; |
| | | if (!DB_ResidenceData.Instance.CurrentRegion.IsOthreShare) |
| | | //if (!DB_ResidenceData.Instance.CurrentRegion.isOtherShare) |
| | | { |
| | | topView.AddChidren(btnAddIcon); |
| | | } |
| | |
| | | /// </summary> |
| | | floorChangeView = new FrameLayout() |
| | | { |
| | | Height = Application.GetRealHeight(52), |
| | | Height = Application.GetRealHeight(53), |
| | | }; |
| | | scenePageView.AddChidren(floorChangeView); |
| | | #region 场景底部切换显示区域 |
| | | /// <summary> |
| | | /// 场景区域,顶部区域 |
| | | /// </summary> |
| | | sceneTopView = new FrameLayout() |
| | | { |
| | | Height = Application.GetRealHeight(53), |
| | | }; |
| | | floorChangeView.AddChidren(sceneTopView); |
| | | /// <summary> |
| | | /// 楼层选择下拉图标 |
| | | /// </summary> |
| | |
| | | Width = Application.GetMinRealAverage(16), |
| | | Height = Application.GetMinRealAverage(16), |
| | | X = Application.GetRealWidth(16), |
| | | Y = Application.GetRealHeight(18), |
| | | Gravity = Gravity.CenterVertical, |
| | | UnSelectedImagePath = "Public/DownIcon.png", |
| | | }; |
| | | floorChangeView.AddChidren(btnFloorDownIcon); |
| | |
| | | btnFloor = new Button() |
| | | { |
| | | X = btnFloorDownIcon.Right, |
| | | Y = Application.GetRealHeight(18), |
| | | Gravity = Gravity.CenterVertical, |
| | | Width = Application.GetRealWidth(200), |
| | | Height = Application.GetMinRealAverage(16), |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | |
| | |
|
| | | sceneFunctionView = new VerticalScrolViewLayout() |
| | | { |
| | | Y = floorChangeView.Bottom, |
| | | Y = Application.GetRealHeight(53), |
| | | Height = Application.GetRealHeight(667 - 64 - 49 - 52 + 30), |
| | | }; |
| | | scenePageView.AddChidren(sceneFunctionView); |
| | |
| | | //} |
| | | if (index % 2 == 0) |
| | | { |
| | | sceneFunctionView.AddChidren(new Button() { Height = Application.GetRealHeight(7) }); |
| | | rowView = new FrameLayout() |
| | | { |
| | | Height = Application.GetRealWidth(122), |
| | | }; |
| | | sceneFunctionView.AddChidren(rowView); |
| | | sceneFunctionView.AddChidren(new Button() { Height = Application.GetRealHeight(7) }); |
| | | sceneFunctionView.AddChidren(new Button() |
| | | { |
| | | Height = Application.GetRealHeight(7 + 7), |
| | | }); |
| | | } |
| | | var functionView_X = Application.GetRealWidth((16 + 164) * (index % 2) + 16); |
| | | |
| | |
| | | Width = Application.GetRealWidth(32), |
| | | UnSelectedImagePath = "Public/FuncInfoSetIcon_white.png", |
| | | }; |
| | | if (!DB_ResidenceData.Instance.CurrentRegion.IsOthreShare) |
| | | if (scene.userId == UserInfo.Current.ID) |
| | | { |
| | | view.AddChidren(btnSettingIcon); |
| | | } |
| | |
| | | SelectedImagePath = "Collection/CollectionIcon.png", |
| | | IsSelected = scene.collect, |
| | | }; |
| | | //view.AddChidren(btnCollection); |
| | | view.AddChidren(btnCollection); |
| | | //2020-12-16 如果是成员隐藏收藏功能 |
| | | if (!DB_ResidenceData.Instance.CurrentRegion.IsOthreShare) |
| | | { |
| | | view.AddChidren(btnCollection); |
| | | } |
| | | //if (!DB_ResidenceData.Instance.CurrentRegion.isOtherShare) |
| | | //{ |
| | | // view.AddChidren(btnCollection); |
| | | //} |
| | | btnCollection.MouseUpEventHandler = (sender, e) => { |
| | | scene.collect = btnCollection.IsSelected = !btnCollection.IsSelected; |
| | | scene.CollectScene(); |
| | |
| | | if (!btnAutomationTitle.IsSelected) |
| | | { |
| | | //如果是成员 |
| | | if (DB_ResidenceData.Instance.CurrentRegion.IsOthreShare) |
| | | if (DB_ResidenceData.Instance.CurrentRegion.isOtherShare) |
| | | { |
| | | //如果没有场景权限 |
| | | if (!DB_ResidenceData.Instance.CurrentRegion.isAllowCreateScene) |