From d72ca686a3e262693f8a6e45e747e8e8da43335b Mon Sep 17 00:00:00 2001 From: JLChen <551775569@qq.com> Date: 星期二, 06 七月 2021 09:39:03 +0800 Subject: [PATCH] 2021-07-06 1.更新 --- HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/RoomEditFunctionPage.cs | 58 +++------------------------------------------------------- 1 files changed, 3 insertions(+), 55 deletions(-) diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/RoomEditFunctionPage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/RoomEditFunctionPage.cs index fe73c68..0200f20 100644 --- a/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/RoomEditFunctionPage.cs +++ b/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/RoomEditFunctionPage.cs @@ -248,61 +248,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) { -- Gitblit v1.8.0