From a70dac4349c9bb78d7be5052f371136d840b2665 Mon Sep 17 00:00:00 2001
From: lss <lsc@hdlchina.com.cn>
Date: 星期四, 22 四月 2021 15:42:42 +0800
Subject: [PATCH] 2021-04-22 临时备份
---
HDL_ON/UI/UI2/2-Classification/ClassificaitionPublicBLL.cs | 36 ++++++++++++++----------------------
1 files changed, 14 insertions(+), 22 deletions(-)
diff --git a/HDL_ON/UI/UI2/2-Classification/ClassificaitionPublicBLL.cs b/HDL_ON/UI/UI2/2-Classification/ClassificaitionPublicBLL.cs
index 8c27dc8..1506eb4 100644
--- a/HDL_ON/UI/UI2/2-Classification/ClassificaitionPublicBLL.cs
+++ b/HDL_ON/UI/UI2/2-Classification/ClassificaitionPublicBLL.cs
@@ -58,6 +58,8 @@
case FunctionCategory.Light:
case FunctionCategory.AC:
case FunctionCategory.FloorHeat:
+ case FunctionCategory.Electric:
+ case FunctionCategory.AirFresh:
#region 鎸夐挳鐘舵�佹洿鏂�
if (cTag == updataFunction.sid + "_Switch")
{
@@ -76,14 +78,13 @@
{
try
{
+ (fcView.GetChildren(j) as DiyImageSeekBar).Progress = Convert.ToInt32(updataFunction.GetAttrState(FunctionAttributeKey.Brightness));
if (updataFunction.trait_on_off.curValue.ToString() == "on")
{
- (fcView.GetChildren(j) as DiyImageSeekBar).Progress = (updataFunction as Light).brightness;
(fcView.GetChildren(j) as DiyImageSeekBar).ProgressBarColor = CSS.CSS_Color.AuxiliaryColor1;
}
else
{
- (fcView.GetChildren(j) as DiyImageSeekBar).Progress = (updataFunction as Light).brightness;
(fcView.GetChildren(j) as DiyImageSeekBar).ProgressBarColor = CSS.CSS_Color.PromptingColor2;
}
}
@@ -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