wxr
2022-07-05 46dee93ff58a4c50b23fd42ffa8db9bf612b497c
HDL_ON/DAL/DriverLayer/Control.cs
@@ -280,7 +280,8 @@
                        }
                        if (DB_ResidenceData.Instance.GatewayType == 0)
                        {
                            new Control_Udp().ControlBytesSend(Command.ReadGateway, 255, 255, new byte[] { (byte)new Random().Next(255), (byte)new Random().Next(255) });
                            new Control_Udp().ControlBytesSend(Command.ReadGateway, 255, 255,
                                new byte[] { (byte)new Random().Next(255), (byte)new Random().Next(255) });
                        }
                        else if (DB_ResidenceData.Instance.GatewayType == 1)
                        {
@@ -1050,9 +1051,6 @@
                            }
                        }
                        var localFunction = allLocalFuntion.Find((obj) => obj.sid == updateTemp.sid);
                        if (localFunction == null)
                        {
@@ -1129,6 +1127,14 @@
                                localFunction.lastState = localFunction.trait_on_off.curValue.ToString() == "on" ? Language.StringByID(StringId.Open) : Language.StringByID(StringId.Close);
                                CurtainModulePage.UpdataState(localFunction);
                                break;
                            case SPK.CurtainDream:
                                if(localFunction.GetAttrState(FunctionAttributeKey.Percent) == "0")
                                {
                                    localFunction.SetAttrState(FunctionAttributeKey.OnOff, "off");
                                }
                                localFunction.lastState = localFunction.trait_on_off.curValue.ToString() == "on" ? Language.StringByID(StringId.Open) : Language.StringByID(StringId.Close);
                                CurtainDreamPage.UpdataState(localFunction);
                                break;
                            case SPK.CurtainTrietex:
                                localFunction.lastState = Language.StringByID(StringId.Open) + localFunction.GetAttrState(FunctionAttributeKey.Percent) + "%";
                                MotorCurtainPage.UpdataState(localFunction);