From 0e1c6c25b1b0961d324811ff2132717a80f99efe Mon Sep 17 00:00:00 2001
From: JLChen <551775569@qq.com>
Date: 星期日, 26 四月 2020 14:15:05 +0800
Subject: [PATCH] 2020-04-26 1.添加住宅和修改住宅时,改为子线程操作。 2.远程连接模式时,禁用搜索网关和添加设备。3.修复切换住宅时,提示远程连接Loading不关闭问题。

---
 Crabtree/SmartHome/UI/SimpleControl/Phone/Light/UserDeviceToLight.cs |   24 ++++++++++++------------
 1 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/Crabtree/SmartHome/UI/SimpleControl/Phone/Light/UserDeviceToLight.cs b/Crabtree/SmartHome/UI/SimpleControl/Phone/Light/UserDeviceToLight.cs
index 2bc784b..c17cf22 100644
--- a/Crabtree/SmartHome/UI/SimpleControl/Phone/Light/UserDeviceToLight.cs
+++ b/Crabtree/SmartHome/UI/SimpleControl/Phone/Light/UserDeviceToLight.cs
@@ -92,7 +92,7 @@
                     if (light.Type == DeviceType.LightDimming || light.Type == DeviceType.LightMixDimming || light.Type == DeviceType.LightDALI) {
                         if ((light as LightDimming).CurrentBrightness > 0)
                             brighingCount++;
-                    } else if (light.Type == DeviceType.LightSwitch || light.Type == DeviceType.LightMixSwitch)
+                    } else if (light.Type == DeviceType.LightSwitch || light.Type == DeviceType.LightMixSwitch || light.Type == DeviceType.LightEnergySwitch)
                         if ((light as LightSwitch).CurrentBrightness == 100)
                             brighingCount++;
                     if (light.Type == DeviceType.LightRGB)
@@ -180,7 +180,7 @@
                     }
                 }
                 //if (!update) {
-                //    Console.WriteLine ("閫�鍑烘洿鏂扮伅鍏�");
+                //    Utlis.WriteLine ("閫�鍑烘洿鏂扮伅鍏�");
                 //    return;
                 //}
                 Application.RunOnMainThread (() => {
@@ -228,7 +228,7 @@
                     }
                 });
             });
-            Console.WriteLine ("U1");
+            //Utlis.WriteLine ("U1");
         }
         bool showTip = true;
         /// <summary>
@@ -352,12 +352,12 @@
 
 
                 } catch {
-                    Console.WriteLine ("controlAllLight catch");
+                    Utlis.WriteLine ("controlAllLight catch");
                 } finally {
                     Application.RunOnMainThread (() => {
                         MainPage.Loading.Hide ();
                     });
-                    //Console.WriteLine ("controlAllLight Loading.Hide");
+                    //Utlis.WriteLine ("controlAllLight Loading.Hide");
                 }
             });
         }
@@ -583,14 +583,14 @@
             var lightList = new List<Common> ();
             foreach (var room in Room.Lists) {
                 if (room == null) {
-                    Console.WriteLine ("Null is Room");
+                    Utlis.WriteLine ("Null is Room");
                     continue;
                 }
-                Console.WriteLine ("RoomCount" + Room.Lists.Count);
+                Utlis.WriteLine ("RoomCount" + Room.Lists.Count);
 
-                Console.WriteLine (room.Name);
+                Utlis.WriteLine (room.Name);
                 if (string.IsNullOrEmpty (room.Name)) {
-                    Console.WriteLine ("Null is Room Name");
+                    Utlis.WriteLine ("Null is Room Name");
                     continue;
                 }
                 foreach (var common in room.DeviceList) {
@@ -1050,7 +1050,7 @@
             }
             #endregion
 
-            Console.WriteLine ("L6");
+            Utlis.WriteLine ("L6");
         }
 
 
@@ -1065,12 +1065,12 @@
         {
             if (isCheckIsReadingAll) {
                 if (IsReadingAll && !isRead) {
-                    Console.WriteLine ("============>IsReadingAll Light璇诲彇涓�");
+                    Utlis.WriteLine ("============>IsReadingAll Light璇诲彇涓�");
                     return;
                 }
             }
 #if DEBUG
-            Console.WriteLine ("============>readAllStatus Light 寮�濮嬭鍙�");
+            Utlis.WriteLine ("============>readAllStatus Light 寮�濮嬭鍙�");
 #endif
             if (isRead) {
                 foreach (Room room in Room.Lists) {

--
Gitblit v1.8.0