wxr
2020-09-01 7d005a7618e3d7a80d8ede3baf6ecc4bf8019cd5
HDL_ON/UI/UI2/4-PersonalCenter/ResidentialManage/RoomEditFunctionPage.cs
@@ -44,6 +44,9 @@
        #endregion
        #region 区域变量
        /// <summary>
        /// 需要显示的功能总数,影响到界面显示
        /// </summary>
        int showdFunctionCount = 0;
        Room room;
        string showedFunctionRoomId = "0";
@@ -133,11 +136,11 @@
            {
                Y = showdFunctionTypeRow.Bottom,
                Height = Application.GetRealHeight(518 - 40 - 62),
                BackgroundColor = CSS_Color.MainBackgroundColor,
                BackgroundColor = CSS_Color.BackgroundColor,
            };
            bodyView.AddChidren(functionListView);
            foreach (var function in DB_ResidenceData.residenceData.functionList.functions)
            foreach (var function in DB_ResidenceData.functionList.GetAllFunction())
            {
                function.roomIdList.Remove(null);
                if (function.roomIdList.Count > 0 )
@@ -213,7 +216,7 @@
                        switch (function.functionType)
                        {
                            case FunctionType.AC:
                                btnFunctionIcon.UnSelectedImagePath = "FunctionIcon/AC/AcThinIcon.png";
                                btnFunctionIcon.UnSelectedImagePath = "FunctionIcon/AC/AcThinIcon1.png";
                                break;
                            case FunctionType.FloorHeating:
                                btnFunctionIcon.UnSelectedImagePath = "FunctionIcon/FloorHeating/FloorHeatingThinIcon.png";
@@ -226,13 +229,58 @@
                    case FunctionCategory.Light:
                        btnFunctionIcon.UnSelectedImagePath = "FunctionIcon/Light/LightThinIcon.png";
                        break;
                    case FunctionCategory.SwitchDevice:
                        switch (function.functionType)
                        {
                            case FunctionType.Socket:
                                btnFunctionIcon.UnSelectedImagePath = "FunctionIcon/Socket/SocketThinIcon.png";
                                break;
                        }
                        break;
                    case FunctionCategory.Electrical:
                        switch (function.functionType)
                        {
                            case FunctionType.Fan:
                                btnFunctionIcon.UnSelectedImagePath = "FunctionIcon/Electrical/FanThinIcon.png";
                                break;
                            case FunctionType.TV:
                                btnFunctionIcon.UnSelectedImagePath = "FunctionIcon/Electrical/TVThinIcon.png";
                                break;
                        }
                        break;
                    case FunctionCategory.Scene:
                        btnFunctionIcon.UnSelectedImagePath = "FunctionIcon/Scene/SceneIcon.png";
                        break;
                    case FunctionCategory.Music:
                        btnFunctionIcon.UnSelectedImagePath = "FunctionIcon/Music/MusicThinIcon.png";
                        break;
                    case FunctionCategory.Sensor:
                        switch(function.functionType)
                        {
                            case FunctionType.PM25:
                                btnFunctionIcon.UnSelectedImagePath = "FunctionIcon/EnvironmentalScience/FunctionIconPm25.png";
                                break;
                            case FunctionType.CO2:
                                btnFunctionIcon.UnSelectedImagePath = "FunctionIcon/EnvironmentalScience/FunctionIconCO2.png";
                                break;
                            case FunctionType.TVOC:
                                btnFunctionIcon.UnSelectedImagePath = "FunctionIcon/EnvironmentalScience/FunctionIconTVOC.png";
                                break;
                            case FunctionType.Humidity:
                                btnFunctionIcon.UnSelectedImagePath = "FunctionIcon/EnvironmentalScience/FunctionIconHumidity.png";
                                break;
                            case FunctionType.Temp:
                                btnFunctionIcon.UnSelectedImagePath = "FunctionIcon/EnvironmentalScience/FunctionIconTemp.png";
                                break;
                        }
                        break;
                }
                if (!btnAllocated.IsSelected)
                {
                    var btnFunctionName = new Button()
                    {
                        X = btnFunctionIcon.Right + Application.GetRealWidth(3),
                        X = btnFunctionIcon.Right + Application.GetRealWidth(12),
                        Width = Application.GetRealWidth(200),
                        Text = function.name,
                        TextAlignment = TextAlignment.CenterLeft,
@@ -245,9 +293,9 @@
                {
                    var btnFunctionName = new Button()
                    {
                        X = btnFunctionIcon.Right + Application.GetRealWidth(3),
                        X = btnFunctionIcon.Right + Application.GetRealWidth(12),
                        Width = Application.GetRealWidth(200),
                        Height = Application.GetRealHeight(30),
                        Height = Application.GetRealHeight(40),
                        Text = function.name,
                        TextAlignment = TextAlignment.CenterLeft,
                        TextColor = CSS_Color.FirstLevelTitleColor,
@@ -257,8 +305,8 @@
                    var btnFunctionFloorName = new Button()
                    {
                        X = btnFunctionIcon.Right + Application.GetRealWidth(3),
                        Y = btnFunctionName.Bottom,
                        X = btnFunctionIcon.Right + Application.GetRealWidth(12),
                        Y = Application.GetRealHeight(50),
                        Width = Application.GetRealWidth(200),
                        Height = Application.GetRealHeight(20),
                        Text = function.GetRoomListName(),
@@ -351,7 +399,7 @@
                Height = Application.GetRealWidth(1),
                BackgroundColor = CSS_Color.DividingLineColor,
            });
            foreach (var tempRoom in DB_ResidenceData.residenceData.rooms)
            foreach (var tempRoom in DB_ResidenceData.rooms)
            {
                Button btnRoom = new Button()