JLChen
2021-11-30 efad979b6fae76fb37a4de7e94e6bac0a85cb72c
HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/RoomEditFunctionPage.cs
@@ -107,6 +107,10 @@
                IsBold = true
            };
            showdFunctionTypeRow.AddChidren(btnUnallocated);
            if(Language.CurrentLanguage != "Chinese")
            {
                btnUnallocated.Width = Application.GetRealWidth(130);
            }
            btnAllocated = new Button()
            {
@@ -160,6 +164,10 @@
            foreach (var function in FunctionList.List.GetDeviceFunctionList())
            {
                function.roomIds.Remove(null);
                if(MainPage.RoomNotSupportFunctionList.Contains(function.spk))
                {
                    continue;
                }
                if (function.roomIds.Count > 0 )
                {
                    allocatedList.Add(function);
@@ -244,61 +252,9 @@
                    Height = Application.GetMinRealAverage(28),
                };
                functionRow.AddChidren(btnFunctionIcon);
                switch (function.Spk_Prefix)
                {
                    case FunctionCategory.AC:
                                btnFunctionIcon.UnSelectedImagePath = "FunctionIcon/AC/AcThinIcon1.png";
                        break;
                    case FunctionCategory.FloorHeat:
                        btnFunctionIcon.UnSelectedImagePath = "FunctionIcon/FloorHeating/FloorHeatingThinIcon.png";
                        break;
                    case FunctionCategory.Curtain:
                        btnFunctionIcon.UnSelectedImagePath = "FunctionIcon/Curtain/CurtainThinIcon.png";
                        break;
                    case FunctionCategory.Light:
                        btnFunctionIcon.UnSelectedImagePath = "FunctionIcon/Light/LightThinIcon.png";
                        break;
                    case FunctionCategory.Electric:
                        switch (function.spk)
                        {
                            case SPK.ElectricSocket:
                                btnFunctionIcon.UnSelectedImagePath = "FunctionIcon/Socket/SocketThinIcon.png";
                                break;
                            case SPK.ElectricFan:
                                btnFunctionIcon.UnSelectedImagePath = "FunctionIcon/Electrical/FanThinIcon.png";
                                break;
                            case SPK.ElectricTV:
                                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.spk)
                        {
                            case SPK.SensorPm25:
                                btnFunctionIcon.UnSelectedImagePath = "FunctionIcon/EnvironmentalScience/FunctionIconPm25.png";
                                break;
                            case SPK.SensorCO2:
                                btnFunctionIcon.UnSelectedImagePath = "FunctionIcon/EnvironmentalScience/FunctionIconCO2.png";
                                break;
                            case SPK.SensorTVOC:
                                btnFunctionIcon.UnSelectedImagePath = "FunctionIcon/EnvironmentalScience/FunctionIconTVOC.png";
                                break;
                            case SPK.SensorHumidity:
                                btnFunctionIcon.UnSelectedImagePath = "FunctionIcon/EnvironmentalScience/FunctionIconHumidity.png";
                                break;
                            case SPK.SensorTemperature:
                                btnFunctionIcon.UnSelectedImagePath = "FunctionIcon/EnvironmentalScience/FunctionIconTemp.png";
                                break;
                        }
                        break;
                }
                btnFunctionIcon.UnSelectedImagePath = $"FunctionIcon/Icon/{function.IconName}.png";
                if (!btnAllocated.IsSelected)
                {