From 2d414e3b007f750cdad4f9e4a7c04db696bca5e4 Mon Sep 17 00:00:00 2001
From: JLChen <551775569@qq.com>
Date: 星期四, 23 四月 2020 16:13:59 +0800
Subject: [PATCH] 2020-04-23 1.优化远程连接提示,改为Loading方案,防止连接过程用户点击重连图标。 2.点击网络检测图标会判断,是否正在远程连接,如果是,会弹窗提示用户”正在远程连接,是否仍要重新检测“。 3.Help 增加隐藏长按功能,长按后,可以开启远程过程异常弹窗提示。长按后关闭。

---
 Crabtree/SmartHome/HDL/Operation/Device/Room.cs |   32 +++++++++++---------------------
 1 files changed, 11 insertions(+), 21 deletions(-)

diff --git a/Crabtree/SmartHome/HDL/Operation/Device/Room.cs b/Crabtree/SmartHome/HDL/Operation/Device/Room.cs
index a713894..af791a6 100644
--- a/Crabtree/SmartHome/HDL/Operation/Device/Room.cs
+++ b/Crabtree/SmartHome/HDL/Operation/Device/Room.cs
@@ -151,7 +151,7 @@
                     common.CustomDelayTimeClose = 0;
                 }
                 room.DeviceList.Add (common);
-            }  else if (deviceType == DeviceType.LightRGB.ToString ()) {
+            } else if (deviceType == DeviceType.LightRGB.ToString ()) {
                 var common = Newtonsoft.Json.JsonConvert.DeserializeObject<LightLogic> (jsonInfo);
                 common.CurrentBrightness = 0;
                 string keyString = common.SubnetID.ToString () + "_" + common.DeviceID.ToString () + "_" + common.LoopID.ToString ();
@@ -164,19 +164,16 @@
                     common.CustomDelayTimeClose = 0;
                 }
                 room.DeviceList.Add (common);
-            } else if (deviceType == DeviceType.LightSwitch.ToString ()){
+            } else if (deviceType == DeviceType.LightSwitch.ToString ()) {
                 var common = Newtonsoft.Json.JsonConvert.DeserializeObject<LightSwitch> (jsonInfo);
                 room.DeviceList.Add (common);
-            }
-            else if (deviceType == DeviceType.LogicModule.ToString())
-            {
-                var common = Newtonsoft.Json.JsonConvert.DeserializeObject<LogicModule>(jsonInfo);
-                room.DeviceList.Add(common);
-            }
-            else if (deviceType == DeviceType.LightMixSwitch.ToString () ){
+            } else if (deviceType == DeviceType.LightMixSwitch.ToString ()) {
                 var common = Newtonsoft.Json.JsonConvert.DeserializeObject<LightMixSwitch> (jsonInfo);
                 room.DeviceList.Add (common);
-            } else if ( deviceType == DeviceType.LightEnergySwitch.ToString ()) {
+            } else if (deviceType == DeviceType.LightEnergySocket.ToString ()) {
+                var common = Newtonsoft.Json.JsonConvert.DeserializeObject<LightEnergySocket> (jsonInfo);
+                room.DeviceList.Add (common);
+            } else if (deviceType == DeviceType.LightEnergySwitch.ToString ()) {
                 var common = Newtonsoft.Json.JsonConvert.DeserializeObject<LightEnergySwitch> (jsonInfo);
                 room.DeviceList.Add (common);
             } else if (deviceType == DeviceType.CurtainModel.ToString ()) {
@@ -213,24 +210,17 @@
                 room.DeviceList.Add (Newtonsoft.Json.JsonConvert.DeserializeObject<SensorCO2> (jsonInfo));
             } else if (deviceType == DeviceType.SensorTVOC.ToString ()) {
                 room.DeviceList.Add (Newtonsoft.Json.JsonConvert.DeserializeObject<SensorTVOC> (jsonInfo));
-            } else if (deviceType == DeviceType.SensorPM25.ToString ()) { 
+            } else if (deviceType == DeviceType.SensorPM25.ToString ()) {
                 room.DeviceList.Add (Newtonsoft.Json.JsonConvert.DeserializeObject<SensorPM25> (jsonInfo));
-            } else if (deviceType == DeviceType.SensorTemperature.ToString ()) { 
+            } else if (deviceType == DeviceType.SensorTemperature.ToString ()) {
                 room.DeviceList.Add (Newtonsoft.Json.JsonConvert.DeserializeObject<SensorTemperature> (jsonInfo));
             } else if (deviceType == DeviceType.SensorHumidity.ToString ()) {
                 room.DeviceList.Add (Newtonsoft.Json.JsonConvert.DeserializeObject<SensorHumidity> (jsonInfo));
             } else if (deviceType == DeviceType.FreshAir.ToString ()) {
                 room.DeviceList.Add (Newtonsoft.Json.JsonConvert.DeserializeObject<FreshAir> (jsonInfo));
             }
-            //else if (deviceType == DeviceType.Thermostat.ToString ()) {
-            //    room.DeviceList.Add (Newtonsoft.Json.JsonConvert.DeserializeObject<Thermostat> (jsonInfo));
-            //}
-            //else if (deviceType == DeviceType.ACMerrill.ToString ()) {//2020-03-10 鏂板缇庢灄绌鸿皟绯荤粺鏀寔
-            //    room.DeviceList.Add (Newtonsoft.Json.JsonConvert.DeserializeObject<ACMerrill> (jsonInfo));
-            //}
-            //else if (deviceType == DeviceType.DoorLockRelay.ToString ()) { //灞忚斀缁х數鍣ㄩ棬閿�
-            //    room.DeviceList.Add (Newtonsoft.Json.JsonConvert.DeserializeObject<LightDoorLock> (jsonInfo));
-            //}
+
+
 
             for (int i = UserConfig.Instance.HideDeviceTypes.Count - 1; i >= 0; i--) {
                 var hideType = UserConfig.Instance.HideDeviceTypes [i];

--
Gitblit v1.8.0