From 46dee93ff58a4c50b23fd42ffa8db9bf612b497c Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期二, 05 七月 2022 10:39:53 +0800
Subject: [PATCH] 梦幻帘对接完成

---
 HDL_ON/DAL/DriverLayer/Control.cs |   14 ++++++++++----
 1 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/HDL_ON/DAL/DriverLayer/Control.cs b/HDL_ON/DAL/DriverLayer/Control.cs
index 8045608..5714db0 100644
--- a/HDL_ON/DAL/DriverLayer/Control.cs
+++ b/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);

--
Gitblit v1.8.0