JLChen
2021-03-10 4a83749337096aae6dd5ec4f44f16653fbc7268a
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")
                                            {
@@ -76,14 +77,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 +110,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 +130,9 @@
                                                    {
                                                        (fcView.GetChildren(j) as Button).IsSelected = false;
                                                    }
                                                    break;
                                                case "on":
                                                }
                                                else
                                                {
                                                    if (cTag == updataFunction.sid + "_on")
                                                    {
                                                        try
@@ -140,21 +145,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;