wxr
2022-07-22 d9feb1d52963982a89a6e6d741a9b841042ce0b6
HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs
@@ -400,13 +400,52 @@
                                    if (function.GetAttribute(FunctionAttributeKey.Percent) != null)
                                    {
                                        state = function.GetAttrState(FunctionAttributeKey.Percent) != "0";
                                    }else
                                    }
                                    else
                                    {
                                        if (function.GetAttrState(FunctionAttributeKey.OnOff) == "stop")
                                            return;
                                        state = function.trait_on_off.curValue.ToString() == "on";
                                    }
                                }
                                else if (function.spk == SPK.SenesorMegahealth)
                                {
                                    var tempStatus = function.attributes.Find((sta) => sta.key == FunctionAttributeKey.TargetStatus);
                                    if (tempStatus != null)
                                    {
                                        switch (tempStatus.state)
                                        {//0空,1走,2跑,3坐,4跌倒,5站
                                            case "0":
                                                state = false;
                                                break;
                                            case "1":
                                                state = true;
                                                break;
                                            case "2":
                                                if (function.extSet.labModel)
                                                {
                                                    state = true;
                                                }
                                                break;
                                            case "3":
                                                if (function.extSet.labModel)
                                                {
                                                    state = true;
                                                }
                                                break;
                                            case "4":
                                                state = true;
                                                break;
                                            case "5":
                                                if (function.extSet.labModel)
                                                {
                                                    state = true;
                                                }
                                                break;
                                        }
                                    }
                                }
                                else
                                {
                                    state = function.trait_on_off.curValue.ToString() == "on";