From 64390bc739286477167e186f1f2b40a27a73a9a5 Mon Sep 17 00:00:00 2001 From: wei <kaede@kaededeMacBook-Air.local> Date: 星期二, 02 三月 2021 17:31:01 +0800 Subject: [PATCH] 20210302-1 --- HDL_ON/UI/UI2/2-Classification/ClassificaitionPublicBLL.cs | 32 ++++++++++++-------------------- 1 files changed, 12 insertions(+), 20 deletions(-) diff --git a/HDL_ON/UI/UI2/2-Classification/ClassificaitionPublicBLL.cs b/HDL_ON/UI/UI2/2-Classification/ClassificaitionPublicBLL.cs index 8c27dc8..279c70d 100644 --- a/HDL_ON/UI/UI2/2-Classification/ClassificaitionPublicBLL.cs +++ b/HDL_ON/UI/UI2/2-Classification/ClassificaitionPublicBLL.cs @@ -58,6 +58,7 @@ case FunctionCategory.Light: case FunctionCategory.AC: case FunctionCategory.FloorHeat: + case FunctionCategory.Electric: #region 鎸夐挳鐘舵�佹洿鏂� if (cTag == updataFunction.sid + "_Switch") { @@ -110,10 +111,14 @@ #endregion case FunctionCategory.Curtain: #region 绐楀笜鏇存柊 - var uCurtain = updataFunction as Curtain; - switch (uCurtain.trait_on_off.curValue.ToString()) + //var uCurtain = updataFunction as Curtain; + var percentString = updataFunction.GetAttrState(FunctionAttributeKey.Percent); + if (percentString != null) { - case "off": + int percent = 0; + int.TryParse(percentString, out percent); + if (percent == 0) + { if (cTag == updataFunction.sid + "_off") { try @@ -126,8 +131,9 @@ { (fcView.GetChildren(j) as Button).IsSelected = false; } - break; - case "on": + } + else + { if (cTag == updataFunction.sid + "_on") { try @@ -140,21 +146,7 @@ { (fcView.GetChildren(j) as Button).IsSelected = false; } - break; - case "stop": - if (cTag == updataFunction.sid + "_stop") - { - try - { - (fcView.GetChildren(j) as Button).IsSelected = true; - } - catch { } - } - else - { - (fcView.GetChildren(j) as Button).IsSelected = false; - } - break; + } } #endregion break; -- Gitblit v1.8.0