陈嘉乐
2020-12-16 f35f1397c980efdc2542dff7aaa23b1a7dbb65e7
HDL_ON/UI/UI2/1-HomePage/HomePage.cs
@@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.Text;
using HDL_ON.DAL;
using HDL_ON.DriverLayer;
using HDL_ON.Entity;
using HDL_ON.UI.CSS;
using Newtonsoft.Json;
@@ -101,7 +102,7 @@
                topView = new FrameLayout()
                {
                    Height = Application.GetRealHeight(216),
                    BackgroundImagePath = DB_ResidenceData.residenceData.residenceImage,
                    BackgroundImagePath = DB_ResidenceData.Instance.residenceImage,
                };
                bodyView.AddChidren(topView);
@@ -122,6 +123,21 @@
                    Radius = (uint)Application.GetRealWidth(3),
                };
                topView.AddChidren(btnLinkStateTip);
                if (Control.Ins.GatewayOnline)
                {
                    if (Control.Ins.IsRemote)
                    {
                        bodyView.btnLinkStateTip.BackgroundColor = CSS.CSS_Color.LinkTipRemote;
                    }
                    else
                    {
                        bodyView.btnLinkStateTip.BackgroundColor = CSS.CSS_Color.MainColor;
                    }
                }
                else
                {
                    bodyView.btnLinkStateTip.BackgroundColor = CSS.CSS_Color.LinkTipFail;
                }
                btnResidenceName = new Button()
                {
@@ -132,7 +148,7 @@
                    TextColor = CSS_Color.MainBackgroundColor,
                    TextSize = CSS_FontSize.EmphasisFontSize_FirstLevel,
                    TextAlignment = TextAlignment.CenterLeft,
                    Text = DB_ResidenceData.residenceData.residecenInfo.Name,
                    Text = DB_ResidenceData.Instance.CurrentRegion.Name,
                    IsBold = true
                };
                topView.AddChidren(btnResidenceName);
@@ -145,6 +161,7 @@
                        {
                            //DriverLayer.Control.Ins.SearchLoaclGateway();
                            MainPage.InitializationData();
                            //DriverLayer.Control.Ins.IsRemote = true;
                        });
                };
#endif
@@ -378,7 +395,7 @@
            try
            {
                int index = 0;
                foreach (var function in DB_ResidenceData.functionList.GetAllDeviceFunctionList())
                foreach (var function in FunctionList.List.GetDeviceFunctionList())
                {
                    //音乐模块有主从关系,需要特殊处理
                    if (function.functionCategory == FunctionCategory.Music)
@@ -493,15 +510,15 @@
            try
            {
                int index = 0;
                foreach (var scene in DB_ResidenceData.functionList.scenes)
                foreach (var scene in FunctionList.List.scenes)
                {
                    if (!scene.collect)
                        continue;
                    if (scene.roomIds.Count == 0)//如何在房间已经移除了这个功能,则收藏界面也不会再显示
                    {
                        scene.collect = false;
                        continue;
                    }
                    //if (scene.roomIds.Count == 0)//如何在房间已经移除了这个功能,则收藏界面也不会再显示
                    //{
                    //    scene.collect = false;
                    //    continue;
                    //}
                    if (index % 2 == 0)
                    {
                        sceneFunctionView.AddChidren(new Button() { Height = Application.GetRealHeight(7) });