From ae7c46bda98a987d170a9b8419fc014564790359 Mon Sep 17 00:00:00 2001
From: 黄学彪 <hxb@hdlchina.com.cn>
Date: 星期三, 06 五月 2020 14:20:12 +0800
Subject: [PATCH] 上传

---
 ZigbeeApp/GateWay.Droid/Assets/Language.ini                                                             |   28 
 ZigbeeApp/Shared/Phone/MainPage/Controls/DeviceCard/DeviceFreshAirCardControl.cs                        |  116 ++
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/SceneControls/SceneRoomControl.cs                 |    2 
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayReceiveLogic.cs                            |    4 
 ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/DeviceAirSwitchRowControl.cs                         |    8 
 ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/Base/DeviceRowCommon.cs                              |   11 
 ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/DeviceColorLightRowControl.cs                        |    8 
 ZigbeeApp/Shared/Phone/Device/Logic/SkipView.cs                                                         |   59 
 ZigbeeApp/Shared/Phone/Category/CategoryMainForm.cs                                                     |   40 
 ZigbeeApp/Shared/Phone/ZigBee/Device/ZbGateway.cs                                                       |  416 -------
 ZigbeeApp/Shared/Phone/MainPage/HomeMainPageForm.cs                                                     |   13 
 ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceSearchForm.cs                                            |   22 
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/DeviceControls/DeviceObjectControl.cs             |    6 
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/FrameLayoutControls/FrameLayoutStatuControl.cs    |    2 
 ZigbeeApp/Shared/Phone/Device/Logic/SoneLogicList.cs                                                    |  129 +
 ZigbeeApp/Shared/Phone/ZigBee/Device/DoorLock.cs                                                        |    5 
 ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/SensorCeilingGasDirectionForm.cs                     |   90 +
 ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/BindInfo.cs                                               |   20 
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/SceneControls/SceneSimpleSelectControl.cs         |    2 
 ZigbeeApp/Shared/Phone/UserCenter/UserMain/SecondAuthenticationForm.cs                                  |    4 
 ZigbeeApp/Shared/Phone/MainPage/ControlForm/DeviceFreshAirDetailCardForm.cs                             |    8 
 ZigbeeApp/Shared/Phone/ZigBee/Device/ZbGatewayData.cs                                                   |  987 ------------------
 ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/DeviceRelayRowControl.cs                             |    8 
 ZigbeeApp/Shared/Phone/MainPage/Controls/DeviceCard/Base/DeviceCardCommon.cs                            |    2 
 ZigbeeApp/Shared/Common/ZigbeeColor.cs                                                                  |    4 
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/SafetySensorStatuControl.cs      |    2 
 ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/DeviceAcRowControl.cs                                |    8 
 ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/DeviceSensorRowControl.cs                            |    8 
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/DeviceControls/DeviceSelectControl.cs             |    2 
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/DeviceControls/GatewayRowControl.cs               |    2 
 ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/DeviceDoorLockRowControl.cs                          |    3 
 ZigbeeApp/Shared/Phone/Device/Logic/LogicView/TipView.cs                                                |  415 +++++++
 ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceAddSuccessForm.cs                                        |   19 
 ZigbeeApp/Home.Ios/Resources/Language.ini                                                               |   28 
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/FrameLayoutControls/FrameCaptionViewControl.cs    |    2 
 ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/DeviceCurtainRowControl.cs                           |    8 
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlDevicePanelLogic.cs                               |   31 
 ZigbeeApp/Shared/R.cs                                                                                   |   26 
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/BelongAreaControl.cs             |    2 
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlExperienceAccountLogic.cs                         |   20 
 ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/DeviceTemperatureRowControl.cs                       |    8 
 ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/PanelFangyueFreshAirModulDirectionForm.cs            |    2 
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/DeviceControls/DeviceSimpleSelectControl.cs       |    2 
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/NormalSelectControl.cs           |    2 
 ZigbeeApp/Shared/Phone/ZigBee/Device/FreshAir.cs                                                        |    4 
 ZigbeeApp/Shared/Phone/MainPage/Controls/DeviceSelectUnallocatedControl.cs                              |    2 
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/FrameLayoutControls/FrameCaptionInputControl.cs   |    2 
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/RowLayoutControls/RowLayoutControl.cs             |    2 
 ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceListMainForm.cs                                          |    4 
 ZigbeeApp/Shared/Common/Device.cs                                                                       |   57 
 ZigbeeApp/Shared/Phone/UserCenter/DoorLock/ShowDoorLockMsgControl.cs                                    |   52 
 ZigbeeApp/Shared/Phone/UserCenter/DoorLock/MasterManagementPage.cs                                      |    4 
 ZigbeeApp/Shared/Phone/UserCenter/DoorLock/DoorLockCommonInfo.cs                                        |  194 +-
 ZigbeeApp/Shared/Phone/Device/Logic/AddLogicPage.cs                                                     |    1 
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/DeviceControls/DeviceRoomControl.cs               |    2 
 ZigbeeApp/Shared/Phone/UserCenter/Residence/LookRoomDeviceListForm.cs                                   |    2 
 ZigbeeApp/Shared/Phone/UserCenter/DoorLock/UserDoorLockPage.cs                                          |  163 --
 ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueFreshAirBackLightSettionForm.cs              |  109 -
 ZigbeeApp/Shared/Phone/ZigBee/Device/Panel.cs                                                           |    4 
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/FrameLayoutControls/FrameRowControl.cs            |    8 
 ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/AddDeviceTypeListForm.cs                             |    5 
 ZigbeeApp/Shared/Shared.projitems                                                                       |    3 
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/RowLayoutControls/DeviceFunctionTypeRowControl.cs |    4 
 ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/DeviceFreshAirRowControl.cs                          |    8 
 ZigbeeApp/Shared/Phone/UserCenter/Residence/LookRoomSettionForm.cs                                      |    8 
 ZigbeeApp/Shared/Phone/UserCenter/Safety/SafetyManagementMainForm.cs                                    |    3 
 66 files changed, 1,273 insertions(+), 1,952 deletions(-)

diff --git a/ZigbeeApp/GateWay.Droid/Assets/Language.ini b/ZigbeeApp/GateWay.Droid/Assets/Language.ini
index 926188e..e6078b0 100755
--- a/ZigbeeApp/GateWay.Droid/Assets/Language.ini
+++ b/ZigbeeApp/GateWay.Droid/Assets/Language.ini
@@ -314,6 +314,7 @@
 309=鏃舵晥鎬у父寮�鍒犻櫎澶辫触锛岀户缁�滃父寮�妯″紡鈥濊鍓嶅線闂ㄩ攣鐢ㄦ埛鐣岄潰璁剧疆;
 310=璇疯緭鍏ュ悎娉曠殑鏁板瓧
 311=鎵嬪姩
+312= 鑳屽厜鐏鑹�
 
 5097=鍙栨秷
 5098=纭畾
@@ -578,7 +579,15 @@
 5387=鍙�
 5388=甯稿紑鑷姩鍖�
 5389=鏃舵晥鎬у父寮�璁剧疆
-
+5390=澶辨晥璁剧疆
+5391=灏忔椂
+5392=闂ㄩ攣濮嬬粓鎵撳紑
+5393=璁剧疆甯稿紑妯″紡鍚庯紝鎮ㄧ殑闂ㄩ攣灏嗗缁坽0}澶勪簬鎵撳紑鐘舵�侊紝纭寮�鍚紵 
+5394=涓嶈兘灏忎簬1灏忔椂
+5395=澶т簬12灏忔椂
+5396=鎴�
+5397=鏃堕棿涓虹┖
+5398=鍙敮鎸佹暟瀛楄緭鍏�
 
 10000=HDL Home
 10001=甯哥敤
@@ -1911,7 +1920,9 @@
 ;鏂规偊鐜闈㈡澘鍏ョ綉鎿嶄綔鎸囩ず
 21021=鎸変綇闈㈡澘鍔熻兘(function)鎸夐敭锛屾墍鏈夋寜閿畕0}鎸囩ず鐏寒璧凤紝鍒欓厤缃戞垚鍔�
 ;绐楀笜闈㈡澘鐨勫叆缃戞搷浣滄寚绀�
-21022=闀挎寜闈㈡澘宸︿笂瑙掓寜閿紝鎵�鏈夋寜閿畕0}鎸囩ず鐏寒璧凤紝鍒欓厤缃戞垚鍔� 
+21022=闀挎寜闈㈡澘宸︿笂瑙掓寜閿紝鎵�鏈夋寜閿畕0}鎸囩ず鐏寒璧凤紝鍒欓厤缃戞垚鍔�
+;鍚搁《鐕冩皵浼犳劅鍣ㄧ殑鍏ョ綉鎿嶄綔鎸囩ず
+21023=闀挎寜鍥剧ず鎸夐敭5绉掍互涓婏紝缁胯壊蹇棯{0}杩涘叆閰嶇綉鐘舵�侊紝缁跨伅甯镐寒鍒欏叆缃戞垚鍔�
 
 ;鈽呪槄鈽呪槄涓嬮潰杩欎簺鏄ā鍧桰D鐨勫畼鏂瑰悕瀛�,浠�30000寮�濮嬧槄鈽呪槄鈽�
 30000=绱ф�ユ寜閽�
@@ -1931,14 +1942,14 @@
 30014=1浠igbee缃戝叧(楂樼骇缃戝叧妗岄潰妯″紡)
 30015=璋冭瘯璁惧
 30016=Zigbee鏅鸿兘绠$姸鐢垫満
-30017=zigbee涓户鍣�
+30017=Zigbee涓户鍣�
 30018=12鎸夐敭瑙︽懜闈㈡澘(1璺户鐢靛櫒搴曞骇)
 30019=4鎸夐敭瑙︽懜闈㈡澘(鍙甫鐢垫簮搴曞骇)
 30020=Zigbee浜轰綋绉诲姩浼犳劅鍣�(鐞冨舰)
 30021=1璺皟鍏夊櫒灏忔ā鍧�
-30022=zigbee杞珺uspro鍗忚杞崲鍣�
-30023=zigbee杞�485鍗忚杞崲鍣�
-30024=zigbee绌鸿皟缃戝叧妯″潡
+30022=Zigbee杞珺uspro鍗忚杞崲鍣�
+30023=Zigbee杞�485鍗忚杞崲鍣�
+30024=Zigbee绌鸿皟缃戝叧妯″潡
 30025=H06C
 30026=绠�绾�4鎸夐敭闈㈡澘
 30027=绠�绾�3鎸夐敭闈㈡澘
@@ -1953,6 +1964,7 @@
 30036=鏂规偊/2璺獥甯橀潰鏉�-Z
 30037=S-one
 30038=鏂规偊鏂伴灏忔ā鍧�
+30039=Zigbee鍚搁《鐕冩皵浼犳劅鍣�
 
 ;鈽呪槄鈽呪槄涓嬮潰杩欎簺鏄澶囨墍灞炵绫荤殑缈昏瘧鍚嶅瓧,浠�40000寮�濮嬧槄鈽呪槄鈽�
 40000=閬槼
@@ -2015,6 +2027,7 @@
 50036=Zigbee鏂规偊2璺獥甯橀潰鏉�
 50037=Zigbee鏅鸿兘闂ㄩ攣
 50038=鏂伴鎺у埗灏忔ā鍧�
+50039=Zigbee鍚搁《鐕冩皵浼犳劅鍣�
 
 ;鈽呪槄鈽呪槄涓嬮潰杩欎簺鏄ā鍧桰D鐨勮澶囩被鍨嬪悕瀛�,浠�60000寮�濮�.娉�:瀹冨苟涓嶉渶瑕佸啀R.cs鏂囦欢涓畾涔夆槄鈽呪槄鈽�
 60000=浼犳劅鍣�
@@ -2055,4 +2068,5 @@
 70021=闂ㄧ獥浼犳劅鍣�
 70022=娓╂箍搴︿紶鎰熷櫒
 70023=涓户鍣�
-70024=鏅鸿兘绌哄紑
\ No newline at end of file
+70024=鏅鸿兘绌哄紑
+70025=鍚搁《鐕冩皵浼犳劅鍣�
\ No newline at end of file
diff --git a/ZigbeeApp/Home.Ios/Resources/Language.ini b/ZigbeeApp/Home.Ios/Resources/Language.ini
index 926188e..e6078b0 100755
--- a/ZigbeeApp/Home.Ios/Resources/Language.ini
+++ b/ZigbeeApp/Home.Ios/Resources/Language.ini
@@ -314,6 +314,7 @@
 309=鏃舵晥鎬у父寮�鍒犻櫎澶辫触锛岀户缁�滃父寮�妯″紡鈥濊鍓嶅線闂ㄩ攣鐢ㄦ埛鐣岄潰璁剧疆;
 310=璇疯緭鍏ュ悎娉曠殑鏁板瓧
 311=鎵嬪姩
+312= 鑳屽厜鐏鑹�
 
 5097=鍙栨秷
 5098=纭畾
@@ -578,7 +579,15 @@
 5387=鍙�
 5388=甯稿紑鑷姩鍖�
 5389=鏃舵晥鎬у父寮�璁剧疆
-
+5390=澶辨晥璁剧疆
+5391=灏忔椂
+5392=闂ㄩ攣濮嬬粓鎵撳紑
+5393=璁剧疆甯稿紑妯″紡鍚庯紝鎮ㄧ殑闂ㄩ攣灏嗗缁坽0}澶勪簬鎵撳紑鐘舵�侊紝纭寮�鍚紵 
+5394=涓嶈兘灏忎簬1灏忔椂
+5395=澶т簬12灏忔椂
+5396=鎴�
+5397=鏃堕棿涓虹┖
+5398=鍙敮鎸佹暟瀛楄緭鍏�
 
 10000=HDL Home
 10001=甯哥敤
@@ -1911,7 +1920,9 @@
 ;鏂规偊鐜闈㈡澘鍏ョ綉鎿嶄綔鎸囩ず
 21021=鎸変綇闈㈡澘鍔熻兘(function)鎸夐敭锛屾墍鏈夋寜閿畕0}鎸囩ず鐏寒璧凤紝鍒欓厤缃戞垚鍔�
 ;绐楀笜闈㈡澘鐨勫叆缃戞搷浣滄寚绀�
-21022=闀挎寜闈㈡澘宸︿笂瑙掓寜閿紝鎵�鏈夋寜閿畕0}鎸囩ず鐏寒璧凤紝鍒欓厤缃戞垚鍔� 
+21022=闀挎寜闈㈡澘宸︿笂瑙掓寜閿紝鎵�鏈夋寜閿畕0}鎸囩ず鐏寒璧凤紝鍒欓厤缃戞垚鍔�
+;鍚搁《鐕冩皵浼犳劅鍣ㄧ殑鍏ョ綉鎿嶄綔鎸囩ず
+21023=闀挎寜鍥剧ず鎸夐敭5绉掍互涓婏紝缁胯壊蹇棯{0}杩涘叆閰嶇綉鐘舵�侊紝缁跨伅甯镐寒鍒欏叆缃戞垚鍔�
 
 ;鈽呪槄鈽呪槄涓嬮潰杩欎簺鏄ā鍧桰D鐨勫畼鏂瑰悕瀛�,浠�30000寮�濮嬧槄鈽呪槄鈽�
 30000=绱ф�ユ寜閽�
@@ -1931,14 +1942,14 @@
 30014=1浠igbee缃戝叧(楂樼骇缃戝叧妗岄潰妯″紡)
 30015=璋冭瘯璁惧
 30016=Zigbee鏅鸿兘绠$姸鐢垫満
-30017=zigbee涓户鍣�
+30017=Zigbee涓户鍣�
 30018=12鎸夐敭瑙︽懜闈㈡澘(1璺户鐢靛櫒搴曞骇)
 30019=4鎸夐敭瑙︽懜闈㈡澘(鍙甫鐢垫簮搴曞骇)
 30020=Zigbee浜轰綋绉诲姩浼犳劅鍣�(鐞冨舰)
 30021=1璺皟鍏夊櫒灏忔ā鍧�
-30022=zigbee杞珺uspro鍗忚杞崲鍣�
-30023=zigbee杞�485鍗忚杞崲鍣�
-30024=zigbee绌鸿皟缃戝叧妯″潡
+30022=Zigbee杞珺uspro鍗忚杞崲鍣�
+30023=Zigbee杞�485鍗忚杞崲鍣�
+30024=Zigbee绌鸿皟缃戝叧妯″潡
 30025=H06C
 30026=绠�绾�4鎸夐敭闈㈡澘
 30027=绠�绾�3鎸夐敭闈㈡澘
@@ -1953,6 +1964,7 @@
 30036=鏂规偊/2璺獥甯橀潰鏉�-Z
 30037=S-one
 30038=鏂规偊鏂伴灏忔ā鍧�
+30039=Zigbee鍚搁《鐕冩皵浼犳劅鍣�
 
 ;鈽呪槄鈽呪槄涓嬮潰杩欎簺鏄澶囨墍灞炵绫荤殑缈昏瘧鍚嶅瓧,浠�40000寮�濮嬧槄鈽呪槄鈽�
 40000=閬槼
@@ -2015,6 +2027,7 @@
 50036=Zigbee鏂规偊2璺獥甯橀潰鏉�
 50037=Zigbee鏅鸿兘闂ㄩ攣
 50038=鏂伴鎺у埗灏忔ā鍧�
+50039=Zigbee鍚搁《鐕冩皵浼犳劅鍣�
 
 ;鈽呪槄鈽呪槄涓嬮潰杩欎簺鏄ā鍧桰D鐨勮澶囩被鍨嬪悕瀛�,浠�60000寮�濮�.娉�:瀹冨苟涓嶉渶瑕佸啀R.cs鏂囦欢涓畾涔夆槄鈽呪槄鈽�
 60000=浼犳劅鍣�
@@ -2055,4 +2068,5 @@
 70021=闂ㄧ獥浼犳劅鍣�
 70022=娓╂箍搴︿紶鎰熷櫒
 70023=涓户鍣�
-70024=鏅鸿兘绌哄紑
\ No newline at end of file
+70024=鏅鸿兘绌哄紑
+70025=鍚搁《鐕冩皵浼犳劅鍣�
\ No newline at end of file
diff --git a/ZigbeeApp/Shared/Common/Device.cs b/ZigbeeApp/Shared/Common/Device.cs
index b8126c8..fa6b160 100755
--- a/ZigbeeApp/Shared/Common/Device.cs
+++ b/ZigbeeApp/Shared/Common/Device.cs
@@ -1987,9 +1987,19 @@
         /// <param name="listMac">璁惧Mac鍦板潃</param>
         public void DeleteRealDeviceFromRoom(List<string> listMac)
         {
+            bool save = false;
             foreach (var deviceMacAddr in listMac)
             {
-                this.dicDeviceRoomId.Remove(deviceMacAddr);
+                if (this.dicDeviceRoomId.ContainsKey(deviceMacAddr) == true)
+                {
+                    this.dicDeviceRoomId.Remove(deviceMacAddr);
+                    save = true;
+                }
+            }
+            if (save == false)
+            {
+                //娌℃湁鏀瑰彉,涓嶉渶瑕佷繚瀛�
+                return;
             }
             //淇濆瓨璁板綍
             string fullName = UserCenterLogic.CombinePath(DirNameResourse.DeviceRoomIdFile);
@@ -2077,6 +2087,17 @@
         #endregion
 
         #region 鈻� 涓�鑸柟娉昣__________________________
+
+        /// <summary>
+        /// 浠庣紦瀛樺彉閲忔娴嬭澶囨槸鍚﹀湪绾�
+        /// </summary>
+        /// <param name="i_device"></param>
+        /// <returns></returns>
+        public bool CheckDeviceIsOnline(CommonDevice i_device)
+        {
+            //0:绂荤嚎 1:鍦ㄧ嚎 2:姝e湪鍒锋柊鐘舵�� 
+            return i_device.IsOnline == 1 || i_device.IsOnline == 2;
+        }
 
         /// <summary>
         /// 鍒ゆ柇璇ヨ澶囨槸鍚﹀彲浠ユ樉绀哄湪涓婚〉
@@ -2637,19 +2658,20 @@
 
             //=========鈽呪槄瀹夐槻绫讳紶鎰熷櫒绫�(1300-2299)鈽呪槄=========
             //杩欓噷鏄害涔愬厠鐨�
-            this.dicDeviceModelIdEnum["MULTI-GASE--EA07"] = "1300-1300-60000";//鐕冩皵浼犳劅鍣�
-            this.dicDeviceModelIdEnum["MULTI-MECI--EA01"] = "1301-1300-60000";//闂ㄧ獥纾佷紶鎰熷櫒
-            this.dicDeviceModelIdEnum["MULTI-FIRE--EA05"] = "1302-1300-60000";//鐑熼浘浼犳劅鍣�
-            this.dicDeviceModelIdEnum["MULTI-MOTI--EA04"] = "1303-1300-60000";//绾㈠浼犳劅鍣�
-            this.dicDeviceModelIdEnum["MULTI-WATE--EA02"] = "1304-1300-60000";//姘存蹈浼犳劅鍣�
-            this.dicDeviceModelIdEnum["MULTI-BURO--EA06"] = "1305-1300-60000";//绱ф�ユ寜閿�
+            this.dicDeviceModelIdEnum["MULTI-GASE--EA07"] = "1300-1200-60000";//鐕冩皵浼犳劅鍣�
+            this.dicDeviceModelIdEnum["MULTI-MECI--EA01"] = "1301-1200-60000";//闂ㄧ獥纾佷紶鎰熷櫒
+            this.dicDeviceModelIdEnum["MULTI-FIRE--EA05"] = "1302-1200-60000";//鐑熼浘浼犳劅鍣�
+            this.dicDeviceModelIdEnum["MULTI-MOTI--EA04"] = "1303-1200-60000";//绾㈠浼犳劅鍣�
+            this.dicDeviceModelIdEnum["MULTI-WATE--EA02"] = "1304-1200-60000";//姘存蹈浼犳劅鍣�
+            this.dicDeviceModelIdEnum["MULTI-BURO--EA06"] = "1305-1200-60000";//绱ф�ユ寜閿�
             //杩欓噷鏄渤涓滅殑
-            this.dicDeviceModelIdEnum["MSG01/M-ZB.10"] = "1300-1300-60000";//鐕冩皵浼犳劅鍣�
-            this.dicDeviceModelIdEnum["MSDC01/M-ZB.10"] = "1301-1300-60000";//闂ㄧ獥纾佷紶鎰熷櫒
-            this.dicDeviceModelIdEnum["MSS01/M-ZB.10"] = "1302-1300-60000";//鐑熼浘浼犳劅鍣�
-            this.dicDeviceModelIdEnum["MSPIR01/M-ZB.10"] = "1303-1300-60000";//绾㈠浼犳劅鍣�
-            this.dicDeviceModelIdEnum["MSW01/M-ZB.10"] = "1304-1300-60000";//姘存蹈浼犳劅鍣�
-            this.dicDeviceModelIdEnum["MBU01/M-ZB.10"] = "1305-1300-60000";//绱ф�ユ寜閿�
+            this.dicDeviceModelIdEnum["MSG01/M-ZB.10"] = "1300-1200-60000";//鐕冩皵浼犳劅鍣�
+            this.dicDeviceModelIdEnum["MSDC01/M-ZB.10"] = "1301-1200-60000";//闂ㄧ獥纾佷紶鎰熷櫒
+            this.dicDeviceModelIdEnum["MSS01/M-ZB.10"] = "1302-1200-60000";//鐑熼浘浼犳劅鍣�
+            this.dicDeviceModelIdEnum["MSPIR01/M-ZB.10"] = "1303-1200-60000";//绾㈠浼犳劅鍣�
+            this.dicDeviceModelIdEnum["MSW01/M-ZB.10"] = "1304-1200-60000";//姘存蹈浼犳劅鍣�
+            this.dicDeviceModelIdEnum["MBU01/M-ZB.10"] = "1305-1200-60000";//绱ф�ユ寜閿�
+            this.dicDeviceModelIdEnum["MGCD01/ZB.10"] = "1306-1200-60000";//鍚搁《鐕冩皵浼犳劅鍣�
 
             //=========鈽呪槄缁х數鍣ㄧ被(2300-2499)鈽呪槄=========
             this.dicDeviceModelIdEnum["MPR0310-ZB.10"] = "2300-2300-60001";//3璺户鐢靛櫒灏忔ā鍧�
@@ -2696,9 +2718,8 @@
             this.dicPictrueShard["ButtonPanel_SimpleFour"] = "ButtonPanel_Four";//绠�绾�4鎸夐敭闈㈡澘 娌跨敤 4鎸夐敭鐨勫浘鏍�
             this.dicPictrueShard["ButtonPanel_SimpleThree"] = "ButtonPanel_Three";//绠�绾�3鎸夐敭闈㈡澘 娌跨敤 3鎸夐敭鐨勫浘鏍�
             this.dicPictrueShard["ButtonPanel_SimpleTwo"] = "ButtonPanel_Two";//绠�绾�2鎸夐敭闈㈡澘 娌跨敤 2鎸夐敭鐨勫浘鏍�
-            this.dicPictrueShard["IntelligentLocks_Sone"] = "IntelligentLocks_H06C";//S-one鐨勯棬閿佸浘鐗囨部鐢℉06C鐨勫浘鏍�
-            this.dicPictrueShard["Relay_FangyueFreshAirModul"] = "Relay_ThreeLoad";//鏂规偊鏂伴灏忔ā鍧楀浘鐗囨部鐢�3璺户鐢靛櫒鐨勫浘鏍�
-
+            this.dicPictrueShard["IntelligentLocks_Sone"] = "IntelligentLocks_H06C";//S-one鐨勯棬閿佸浘鐗� 娌跨敤 H06C鐨勫浘鏍�
+            this.dicPictrueShard["Relay_FangyueFreshAirModul"] = "Relay_ThreeLoad";//鏂规偊鏂伴灏忔ā鍧楀浘鐗� 娌跨敤 3璺户鐢靛櫒鐨勫浘鏍�
         }
 
         #endregion
@@ -2839,6 +2860,10 @@
         /// </summary>
         Sensor_EmergencyButton = 1305,
         /// <summary>
+        /// 鍚搁《鐕冩皵浼犳劅鍣�
+        /// </summary>
+        Sensor_CeilingGas = 1306,
+        /// <summary>
         /// 杩愬姩浼犳劅鍣�
         /// </summary>
         Sensor_Motion = -1306,
diff --git a/ZigbeeApp/Shared/Common/ZigbeeColor.cs b/ZigbeeApp/Shared/Common/ZigbeeColor.cs
index 409e662..7086938 100755
--- a/ZigbeeApp/Shared/Common/ZigbeeColor.cs
+++ b/ZigbeeApp/Shared/Common/ZigbeeColor.cs
@@ -365,7 +365,9 @@
         public uint LogicSecurity1Color = 0xFF35B87F;
         public uint LogicDelay1Color = 0xFFBF64FB;
         public uint LogicListWeekTextColor = 0xFF666666;
-
+        public uint LogicTipColor = 0xFF333443;
+        public uint LogicTipTextColor= 0xFFcccccc;
+        public uint LogicEditTextBackgroundColor=0xFFD1D1D3;
         #endregion
     }
 }
diff --git a/ZigbeeApp/Shared/Phone/Category/CategoryMainForm.cs b/ZigbeeApp/Shared/Phone/Category/CategoryMainForm.cs
index 79e9432..d4b37b1 100755
--- a/ZigbeeApp/Shared/Phone/Category/CategoryMainForm.cs
+++ b/ZigbeeApp/Shared/Phone/Category/CategoryMainForm.cs
@@ -248,7 +248,8 @@
                 //鑷姩鍖�
                 else if (UserCenterResourse.ResidenceOption.CategoryPageSwitchIndex == 2)
                 {
-                    this.ShowAutotion();
+                    //鑷姩鍖栧姛鑳戒唬鐮佸叆鍙�
+                    Device.Logic.SkipView.ShowAutotionView(functionSceneAutoBodyView);
                     //闅愯棌妤煎眰
                     floorVisible = false;
                     //鏄剧ず鍙充笂瑙掔殑鍔犲彿
@@ -506,56 +507,56 @@
                     //绐楀笜
                     if (device.Type == DeviceType.WindowCoveringDevice)
                     {
-                        cardContr = new Controls.DeviceCurtainRowControl(listView.rowSpace / 2);
+                        cardContr = new Controls.DeviceCurtainRowControl();
                     }
                     //缁х數鍣�
                     else if (device.Type == DeviceType.OnOffOutput)
                     {
-                        cardContr = new Controls.DeviceRelayRowControl(listView.rowSpace / 2);
+                        cardContr = new Controls.DeviceRelayRowControl();
                     }
                     //绌烘皵寮�鍏�
                     else if (device.Type == DeviceType.AirSwitch)
                     {
-                        cardContr = new Controls.DeviceAirSwitchRowControl(listView.rowSpace / 2);
+                        cardContr = new Controls.DeviceAirSwitchRowControl();
                     }
                     //绌鸿皟
                     else if (device.Type == DeviceType.Thermostat)
                     {
-                        cardContr = new Controls.DeviceAcRowControl(listView.rowSpace / 2);
+                        cardContr = new Controls.DeviceAcRowControl();
                     }
                     // 鏂伴
                     else if (device.Type == DeviceType.FreshAir)
                     {
-                        cardContr = new Controls.DeviceFreshAirRowControl(listView.rowSpace / 2);
+                        cardContr = new Controls.DeviceFreshAirRowControl();
                     }
                     //褰╃伅(璋冨厜鍣�)
                     else if (device.Type == DeviceType.DimmableLight)
                     {
-                        cardContr = new Controls.DeviceColorLightRowControl(listView.rowSpace / 2);
+                        cardContr = new Controls.DeviceColorLightRowControl();
                     }
                     //浼犳劅鍣�
                     else if (device.Type == DeviceType.IASZone)
                     {
-                        cardContr = new Controls.DeviceSensorRowControl(listView.rowSpace / 2);
+                        cardContr = new Controls.DeviceSensorRowControl();
                     }
                     //娓╂箍搴�
                     else if (device.Type == DeviceType.TemperatureSensor)
                     {
-                        cardContr = new Controls.DeviceTemperatureRowControl(listView.rowSpace / 2);
+                        cardContr = new Controls.DeviceTemperatureRowControl();
                     }
                     //闂ㄩ攣
                     else if (device.Type == DeviceType.DoorLock)
                     {
-                        cardContr = new Controls.DeviceDoorLockRowControl(listView.rowSpace / 2);
+                        cardContr = new Controls.DeviceDoorLockRowControl();
                     }
                     //鏃犳硶璇嗗埆
                     else
                     {
-                        cardContr = new Controls.DeviceRowCommon(listView.rowSpace / 2);
+                        cardContr = new Controls.DeviceRowCommon();
                         //娌℃湁鐘舵�佸姛鑳�
                         cardContr.hadStatuFunction = false;
                     }
-
+                    cardContr.chidrenYaxis = listView.rowSpace / 2;
                     //鍒濆鍖栧崱鐗�
                     listView.AddChidren(cardContr);
                     cardContr.InitControl(device);
@@ -832,7 +833,8 @@
                     if (this.dicDeviceRowControl.ContainsKey(mainKeys) == true)
                     {
                         //鍒锋柊鍗$墖鐘舵��
-                        this.dicDeviceRowControl[mainKeys].SetRowOnlineStatu(report.IsOnline == 1);
+                        bool bolOnline = LocalDevice.Current.CheckDeviceIsOnline(report);
+                        this.dicDeviceRowControl[mainKeys].SetRowOnlineStatu(bolOnline);
                         return;
                     }
 
@@ -1009,18 +1011,6 @@
             /// 璁惧鍥炶矾涓婚敭
             /// </summary>
             public List<string> listDeviceKeys = new List<string>();
-        }
-
-        #endregion
-
-        #region 鈼� 鑷姩鍖朹_________________________
-
-        /// <summary>
-        /// 鑷姩鍖栧姛鑳戒唬鐮佸叆鍙�
-        /// </summary>
-        private void ShowAutotion()
-        {
-            Shared.Phone.Device.Logic.SkipView.ShowAutotionView(functionSceneAutoBodyView);
         }
 
         #endregion
diff --git a/ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/Base/DeviceRowCommon.cs b/ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/Base/DeviceRowCommon.cs
index afff6e7..2789bd2 100755
--- a/ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/Base/DeviceRowCommon.cs
+++ b/ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/Base/DeviceRowCommon.cs
@@ -61,8 +61,7 @@
         /// <summary>
         /// 鏈垎閰嶇晫闈㈢殑璁惧閫夋嫨鎺т欢
         /// </summary>
-        /// <param name="i_ChidrenYaxis">瀛愭帶浠禮杞村亸绉婚噺(鐪熷疄鍊�,鏈変簺鐣岄潰闇�瑕佽繖绉嶇壒娈婃搷浣�)</param>
-        public DeviceRowCommon(int i_ChidrenYaxis = 0) : base(i_ChidrenYaxis)
+        public DeviceRowCommon()
         {
             this.SetCornerWithSameRadius(Application.GetRealHeight(58), HDLUtils.RectCornerTopLeft);
             this.Width = Application.GetRealWidth(1022);
@@ -100,7 +99,8 @@
             //璁惧鍚嶅瓧
             this.btnDeviceName = new NormalViewControl(600, 60, true);
             btnDeviceName.X = Application.GetRealWidth(181);
-            btnDeviceName.Y = Application.GetRealHeight(16) + this.chidrenYaxis;
+            //褰撴寚瀹氬疄闄呭潗鏍囨椂,杩欓噷闇�瑕佺殑鍋忕Щ閲忎负2鍊�
+            btnDeviceName.Y = Application.GetRealHeight(16) + this.chidrenYaxis * 2;
             btnDeviceName.Text = Common.LocalDevice.Current.GetDeviceEpointName(i_device);
             btnDeviceName.SelectedTextColor = Common.ZigbeeColor.Current.GXCTextSelectedColor;
             this.frameTable.AddChidren(btnDeviceName, ChidrenBindMode.BindEventOnly);
@@ -117,7 +117,8 @@
                 //鐘舵��
                 this.btnStatu = new NormalViewControl(600, 50, true);
                 btnStatu.X = Application.GetRealWidth(181);
-                btnStatu.Y = Application.GetRealHeight(70) + this.chidrenYaxis;
+                //褰撴寚瀹氬疄闄呭潗鏍囨椂,杩欓噷闇�瑕佺殑鍋忕Щ閲忎负2鍊�
+                btnStatu.Y = Application.GetRealHeight(70) + this.chidrenYaxis * 2;
                 btnStatu.TextSize = 10;
                 btnStatu.TextColor = UserCenterColor.Current.TextGrayColor1;
                 this.frameTable.AddChidren(btnStatu, ChidrenBindMode.BindEventOnly);
@@ -329,7 +330,7 @@
             //濡傛灉杩欎釜鍑芥暟琚噸鍐欑殑璇�,鍒欎唬琛ㄨ繖涓澶囨湁寮�鍏冲姛鑳�
             this.isHadOpenSwitch = false;
             //榛樿鐢ㄥ湪绾跨姸鎬佹潵鍒ゆ柇
-            return i_device.IsOnline == 1;
+            return Common.LocalDevice.Current.CheckDeviceIsOnline(i_device);
         }
 
 
diff --git a/ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/DeviceAcRowControl.cs b/ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/DeviceAcRowControl.cs
index 8de2889..8674a16 100755
--- a/ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/DeviceAcRowControl.cs
+++ b/ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/DeviceAcRowControl.cs
@@ -14,14 +14,6 @@
         #region 鈻� 鍒濆鍖朹____________________________
 
         /// <summary>
-        /// 鍒嗙被鐣岄潰鐨勭┖璋冭澶囪鎺т欢
-        /// </summary>
-        /// <param name="i_ChidrenYaxis">瀛愭帶浠禮杞村亸绉婚噺(鐪熷疄鍊�,鏈変簺鐣岄潰闇�瑕佽繖绉嶇壒娈婃搷浣�)</param>
-        public DeviceAcRowControl(int i_ChidrenYaxis = 0) : base(i_ChidrenYaxis)
-        {
-        }
-
-        /// <summary>
         /// 鍒濆鍖栨帶浠�
         /// </summary>
         /// <param name="i_device"></param>
diff --git a/ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/DeviceAirSwitchRowControl.cs b/ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/DeviceAirSwitchRowControl.cs
index 8bad345..d039131 100755
--- a/ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/DeviceAirSwitchRowControl.cs
+++ b/ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/DeviceAirSwitchRowControl.cs
@@ -14,14 +14,6 @@
         #region 鈻� 鍒濆鍖朹____________________________
 
         /// <summary>
-        /// 鍒嗙被鐣岄潰鐨勭┖姘斿紑鍏宠澶囪鎺т欢
-        /// </summary>
-        /// <param name="i_ChidrenYaxis">瀛愭帶浠禮杞村亸绉婚噺(鐪熷疄鍊�,鏈変簺鐣岄潰闇�瑕佽繖绉嶇壒娈婃搷浣�)</param>
-        public DeviceAirSwitchRowControl(int i_ChidrenYaxis = 0) : base(i_ChidrenYaxis)
-        {
-        }
-
-        /// <summary>
         /// 鍒濆鍖栨帶浠�
         /// </summary>
         /// <param name="i_device"></param>
diff --git a/ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/DeviceColorLightRowControl.cs b/ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/DeviceColorLightRowControl.cs
index 97018dd..247ce4f 100755
--- a/ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/DeviceColorLightRowControl.cs
+++ b/ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/DeviceColorLightRowControl.cs
@@ -14,14 +14,6 @@
         #region 鈻� 鍒濆鍖朹____________________________
 
         /// <summary>
-        /// 鍒嗙被鐣岄潰鐨勫僵鐏�(璋冨厜鍣�)璁惧琛屾帶浠�
-        /// </summary>
-        /// <param name="i_ChidrenYaxis">瀛愭帶浠禮杞村亸绉婚噺(鐪熷疄鍊�,鏈変簺鐣岄潰闇�瑕佽繖绉嶇壒娈婃搷浣�)</param>
-        public DeviceColorLightRowControl(int i_ChidrenYaxis = 0) : base(i_ChidrenYaxis)
-        {
-        }
-
-        /// <summary>
         /// 鍒濆鍖栨帶浠�
         /// </summary>
         /// <param name="i_device"></param>
diff --git a/ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/DeviceCurtainRowControl.cs b/ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/DeviceCurtainRowControl.cs
index 72e5900..0d6511b 100755
--- a/ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/DeviceCurtainRowControl.cs
+++ b/ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/DeviceCurtainRowControl.cs
@@ -35,14 +35,6 @@
         #region 鈻� 鍒濆鍖朹____________________________
 
         /// <summary>
-        /// 鍒嗙被鐣岄潰鐨勭獥甯樿澶囪鎺т欢
-        /// </summary>
-        /// <param name="i_ChidrenYaxis">瀛愭帶浠禮杞村亸绉婚噺(鐪熷疄鍊�,鏈変簺鐣岄潰闇�瑕佽繖绉嶇壒娈婃搷浣�)</param>
-        public DeviceCurtainRowControl(int i_ChidrenYaxis = 0) : base(i_ChidrenYaxis)
-        {
-        }
-
-        /// <summary>
         /// 鍒濆鍖栨帶浠�
         /// </summary>
         /// <param name="i_device"></param>
diff --git a/ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/DeviceDoorLockRowControl.cs b/ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/DeviceDoorLockRowControl.cs
index 69d12e9..cda4706 100755
--- a/ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/DeviceDoorLockRowControl.cs
+++ b/ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/DeviceDoorLockRowControl.cs
@@ -15,8 +15,7 @@
         /// <summary>
         /// 鍒嗙被鐣岄潰鐨勯棬閿佽澶囪鎺т欢
         /// </summary>
-        /// <param name="i_ChidrenYaxis">瀛愭帶浠禮杞村亸绉婚噺(鐪熷疄鍊�,鏈変簺鐣岄潰闇�瑕佽繖绉嶇壒娈婃搷浣�)</param>
-        public DeviceDoorLockRowControl(int i_ChidrenYaxis = 0) : base(i_ChidrenYaxis)
+        public DeviceDoorLockRowControl()
         {
             //闂ㄩ攣鏆傛椂娌℃湁鐘舵�佸姛鑳�
             this.hadStatuFunction = false;
diff --git a/ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/DeviceFreshAirRowControl.cs b/ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/DeviceFreshAirRowControl.cs
index 41fd742..3329e2f 100755
--- a/ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/DeviceFreshAirRowControl.cs
+++ b/ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/DeviceFreshAirRowControl.cs
@@ -10,14 +10,6 @@
     public class DeviceFreshAirRowControl : DeviceRowCommon
     {
         /// <summary>
-        /// 鍒嗙被鐣岄潰鐨勬柊椋庤澶囪鎺т欢
-        /// </summary>
-        /// <param name="i_ChidrenYaxis">瀛愭帶浠禮杞村亸绉婚噺(鐪熷疄鍊�,鏈変簺鐣岄潰闇�瑕佽繖绉嶇壒娈婃搷浣�)</param>
-        public DeviceFreshAirRowControl(int i_ChidrenYaxis = 0) : base(i_ChidrenYaxis)
-        {
-        }
-
-        /// <summary>
         /// 鍒濆鍖栨帶浠�
         /// </summary>
         /// <param name="i_device"></param>
diff --git a/ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/DeviceRelayRowControl.cs b/ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/DeviceRelayRowControl.cs
index 8da00ad..34e1d60 100755
--- a/ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/DeviceRelayRowControl.cs
+++ b/ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/DeviceRelayRowControl.cs
@@ -14,14 +14,6 @@
         #region 鈻� 鍒濆鍖朹____________________________
 
         /// <summary>
-        /// 鍒嗙被鐣岄潰鐨勭户鐢靛櫒璁惧琛屾帶浠�
-        /// </summary>
-        /// <param name="i_ChidrenYaxis">瀛愭帶浠禮杞村亸绉婚噺(鐪熷疄鍊�,鏈変簺鐣岄潰闇�瑕佽繖绉嶇壒娈婃搷浣�)</param>
-        public DeviceRelayRowControl(int i_ChidrenYaxis = 0) : base(i_ChidrenYaxis)
-        {
-        }
-
-        /// <summary>
         /// 鍒濆鍖栨帶浠�
         /// </summary>
         /// <param name="i_device"></param>
diff --git a/ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/DeviceSensorRowControl.cs b/ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/DeviceSensorRowControl.cs
index ef2d347..8415787 100755
--- a/ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/DeviceSensorRowControl.cs
+++ b/ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/DeviceSensorRowControl.cs
@@ -12,14 +12,6 @@
     {
         #region 鈻� 鍒濆鍖朹____________________________
 
-        /// <summary>
-        /// 鍒嗙被鐣岄潰鐨勪紶鎰熷櫒璁惧琛屾帶浠�
-        /// </summary>
-        /// <param name="i_ChidrenYaxis">瀛愭帶浠禮杞村亸绉婚噺(鐪熷疄鍊�,鏈変簺鐣岄潰闇�瑕佽繖绉嶇壒娈婃搷浣�)</param>
-        public DeviceSensorRowControl(int i_ChidrenYaxis = 0) : base(i_ChidrenYaxis)
-        {
-        }
-
         #endregion
     }
 }
diff --git a/ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/DeviceTemperatureRowControl.cs b/ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/DeviceTemperatureRowControl.cs
index 3fa9a7c..587d275 100755
--- a/ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/DeviceTemperatureRowControl.cs
+++ b/ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/DeviceTemperatureRowControl.cs
@@ -12,14 +12,6 @@
     {
         #region 鈻� 鍒濆鍖朹____________________________
 
-        /// <summary>
-        /// 鍒嗙被鐣岄潰鐨勬俯婀垮害浼犳劅鍣ㄨ澶囪鎺т欢
-        /// </summary>
-        /// <param name="i_ChidrenYaxis">瀛愭帶浠禮杞村亸绉婚噺(鐪熷疄鍊�,鏈変簺鐣岄潰闇�瑕佽繖绉嶇壒娈婃搷浣�)</param>
-        public DeviceTemperatureRowControl(int i_ChidrenYaxis = 0) : base(i_ChidrenYaxis)
-        {
-        }
-
         #endregion
 
         #region 鈻� 鍙戦�佽幏鍙栫姸鎬佸懡浠__________________
diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/AddLogicPage.cs b/ZigbeeApp/Shared/Phone/Device/Logic/AddLogicPage.cs
index dcc6be2..51f374d 100755
--- a/ZigbeeApp/Shared/Phone/Device/Logic/AddLogicPage.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Logic/AddLogicPage.cs
@@ -490,6 +490,7 @@
         /// </summary>
         void TimeView()
         {
+
             UserView.HomePage.Instance.ScrollEnabled = false;
             Dictionary<string, string> SecurityConditionsInfo = new Dictionary<string, string>();
             #region  ------鐣岄潰甯冨眬閮ㄥ垎   
diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/LogicView/TipView.cs b/ZigbeeApp/Shared/Phone/Device/Logic/LogicView/TipView.cs
new file mode 100755
index 0000000..0a63986
--- /dev/null
+++ b/ZigbeeApp/Shared/Phone/Device/Logic/LogicView/TipView.cs
@@ -0,0 +1,415 @@
+锘縰sing System;
+using Shared.Common;
+
+namespace Shared.Phone.Device.Logic.LogicView
+{
+    public class TipView
+    {
+        /// <summary>
+        /// 纭畾妗�
+        /// </summary>
+        /// <param name="action"></param>
+        public static void ShowConfrimTip(Action action)
+        {
+            ///涓绘帶浠�
+            Dialog dialog = new Dialog();
+            dialog.Show();
+            ///鑳屾櫙鐨勭埗鎺т欢
+            FrameLayout fLayout = new FrameLayout { BackgroundColor = ZigbeeColor.Current.LogicTranslucentColor };
+            dialog.AddChidren(fLayout);
+            fLayout.MouseUpEventHandler += (sender, e) =>
+            {
+                dialog.Close();
+            };
+            ///寮规鐖舵帶浠�
+            FrameLayout tipFLayout = new FrameLayout
+            {
+                X = Application.GetRealWidth(144),
+                Y = Application.GetRealHeight(706),
+                Width = Application.GetRealWidth(792),
+                Height = Application.GetRealHeight(351 + 127),
+                BackgroundColor = ZigbeeColor.Current.LogicBlankBackgroundColor,
+                Radius = (uint)Application.GetRealHeight(17)
+            };
+            fLayout.AddChidren(tipFLayout);
+            ///涓婇潰蹇殑鐖舵帶浠�
+            FrameLayout topFrame = new FrameLayout
+            {
+                Width = Application.GetRealWidth(792),
+                Height = Application.GetRealHeight(351),
+            };
+            tipFLayout.AddChidren(topFrame);
+            ///鎻愮ず鎺т欢
+            Button tipBtn = new Button
+            {
+                TextID = R.MyInternationalizationString.Tip,
+                TextAlignment = TextAlignment.Center,
+                TextColor = ZigbeeColor.Current.LogicTipColor,
+                TextSize = 16,
+                Y = Application.GetRealHeight(69),
+                X = Application.GetRealWidth(150),
+                Height = Application.GetRealHeight(63),
+                Width = Application.GetRealWidth(492),
+            };
+            topFrame.AddChidren(tipBtn);
+            ///鑷畾涔夋枃鏈帶浠�
+            Button tipTextBtn = new Button
+            {
+                Text = Language.StringByID(R.MyInternationalizationString.SetDoorLockNomallyOpen).Replace("{0}", "\r\n"),
+                TextAlignment = TextAlignment.Center,
+                TextColor = ZigbeeColor.Current.LogicTipTextColor,
+                TextSize = 14,
+                Y = tipBtn.Bottom + Application.GetRealHeight(35),
+                X = Application.GetRealWidth(60),
+                Height = Application.GetRealHeight(115),
+                Width = Application.GetRealWidth(674),
+                IsMoreLines = true,
+            };
+            topFrame.AddChidren(tipTextBtn);
+            ///涓嬮潰蹇殑鐖舵帶浠�
+            FrameLayout bottomFrame = new FrameLayout
+            {
+                Y = topFrame.Bottom,
+                Width = Application.GetRealWidth(792),
+                Height = Application.GetRealHeight(127),
+            };
+            tipFLayout.AddChidren(bottomFrame);
+
+            ///鍙栨秷鎺т欢
+            Button cancelBtn = new Button
+            {
+                TextAlignment = TextAlignment.Center,
+                TextColor = ZigbeeColor.Current.LogicBtnCancelColor,
+                TextSize = 14,
+                Height = Application.GetRealHeight(127),
+                Width = Application.GetRealWidth(397),
+                BackgroundColor = ZigbeeColor.Current.LogicMiddleBackgroundColor,
+                TextID = R.MyInternationalizationString.cancel,
+            };
+            bottomFrame.AddChidren(cancelBtn);
+            cancelBtn.SetCornerWithSameRadius(Application.GetRealHeight(17), HDLUtils.RectCornerBottomLeft);
+            ///纭鎺т欢
+            Button okBtn = new Button
+            {
+                TextAlignment = TextAlignment.Center,
+                TextColor = ZigbeeColor.Current.LogicBlankBackgroundColor,
+                TextSize = 14,
+                X = cancelBtn.Right,
+                Height = Application.GetRealHeight(127),
+                Width = bottomFrame.Width - cancelBtn.Width,
+                BackgroundColor = ZigbeeColor.Current.LogicBtnTypeColor,
+                TextID = R.MyInternationalizationString.confrim,
+            };
+            bottomFrame.AddChidren(okBtn);
+            okBtn.SetCornerWithSameRadius(Application.GetRealHeight(17), HDLUtils.RectCornerBottomRight);
+            ///鍙栨秷鐐瑰嚮浜嬩欢
+            cancelBtn.MouseUpEventHandler += (sender, e) =>
+            {
+                dialog.Close();
+            };
+            ///纭鐐瑰嚮浜嬩欢
+            okBtn.MouseUpEventHandler += (sender, e) =>
+            {
+                dialog.Close();
+                action();
+            };
+        }
+        /// <summary>
+        /// 杈撳叆妗�
+        /// </summary>
+        /// <param name="_if">鏄惁闇�瑕佸彇娑堟寜閽�</param>
+        /// <param name="action"></param>
+        public static void ShowInputTip(bool _if, Action<string> action)
+        {
+
+            ///涓绘帶浠�
+            Dialog dialog = new Dialog();
+            dialog.Show();
+            ///鑳屾櫙鐨勭埗鎺т欢
+            FrameLayout fLayout = new FrameLayout { BackgroundColor = ZigbeeColor.Current.LogicTranslucentColor };
+            dialog.AddChidren(fLayout);
+            fLayout.MouseUpEventHandler += (sender, e) =>
+            {
+                dialog.Close();
+            };
+            ///寮规鐖舵帶浠�
+            FrameLayout tipFLayout = new FrameLayout
+            {
+                X = Application.GetRealWidth(144),
+                Y = Application.GetRealHeight(706),
+                Width = Application.GetRealWidth(792),
+                Height = Application.GetRealHeight(351 + 127),
+                BackgroundColor = ZigbeeColor.Current.LogicBlankBackgroundColor,
+                Radius = (uint)Application.GetRealHeight(17)
+            };
+            fLayout.AddChidren(tipFLayout);
+            ///涓婇潰蹇殑鐖舵帶浠�
+            FrameLayout topFrame = new FrameLayout
+            {
+                Width = Application.GetRealWidth(792),
+                Height = Application.GetRealHeight(351),
+            };
+            tipFLayout.AddChidren(topFrame);
+            ///鎻愮ず鎺т欢
+            Button tipBtn = new Button
+            {
+                Y = Application.GetRealHeight(69),
+                X = Application.GetRealWidth(150),
+                Height = Application.GetRealHeight(63),
+                Width = Application.GetRealWidth(492),
+               TextID = R.MyInternationalizationString.invalidSetting,
+                TextAlignment = TextAlignment.Center,
+                TextColor = ZigbeeColor.Current.LogicTipColor,
+                TextSize = 16,
+
+            };
+            topFrame.AddChidren(tipBtn);
+            ///鏂囨湰1鎺т欢
+            Button Text1Btn = new Button
+            {
+                Y = Application.GetRealHeight(187),
+                X = Application.GetRealWidth(50),
+                Height = Application.GetRealHeight(58),
+                Width = Application.GetRealWidth(242 + 94),
+                TextID = R.MyInternationalizationString.lockOpen,
+                TextAlignment = TextAlignment.CenterRight,
+                TextColor = ZigbeeColor.Current.LogicBtnCancelColor,
+                TextSize = 14,
+
+            };
+            topFrame.AddChidren(Text1Btn);
+            ///杈撳叆鏂囨湰妗�
+            EditText editTime = new EditText()
+            {
+                X = Application.GetRealWidth(409),
+                Y = Application.GetRealHeight(173),
+                Height = Application.GetRealHeight(81),
+                Width = Application.GetRealWidth(132),
+                Radius = (uint)Application.GetMinRealAverage(17),
+                BackgroundColor = ZigbeeColor.Current.LogicMiddleBackgroundColor,
+                TextColor = ZigbeeColor.Current.LogicTextBlackColor,
+                TextAlignment = TextAlignment.Center,
+                TextSize = 14,
+                Text = "12",
+                IsNumberKeyboardType=true,//鍙緭鍏ユ暟瀛楃殑灞炴��
+            };
+            topFrame.AddChidren(editTime);
+            ///鏂囨湰2鎺т欢
+            Button Text2Btn = new Button
+            {
+                Y = Application.GetRealHeight(187),
+                X = Application.GetRealWidth(564),
+                Height = Application.GetRealHeight(58),
+                Width = Application.GetRealWidth(51 + 100),
+                TextID = R.MyInternationalizationString.hour,
+                TextAlignment = TextAlignment.CenterLeft,
+                TextColor = ZigbeeColor.Current.LogicBtnCancelColor,
+                TextSize = 14,
+
+            };
+            topFrame.AddChidren(Text2Btn);
+
+            ///涓嬮潰蹇殑鐖舵帶浠�
+            FrameLayout bottomFrame = new FrameLayout
+            {
+                Y = topFrame.Bottom,
+                Width = Application.GetRealWidth(792),
+                Height = Application.GetRealHeight(127),
+            };
+            tipFLayout.AddChidren(bottomFrame);
+            ///鍙栨秷鎺т欢
+            Button cancelBtn = new Button
+            {
+                TextAlignment = TextAlignment.Center,
+                TextColor = ZigbeeColor.Current.LogicBtnCancelColor,
+                TextSize = 14,
+                Height = Application.GetRealHeight(127),
+                Width = Application.GetRealWidth(397),
+                BackgroundColor = ZigbeeColor.Current.LogicMiddleBackgroundColor,
+                TextID = R.MyInternationalizationString.cancel,
+            };
+            bottomFrame.AddChidren(cancelBtn);
+            ///纭鎺т欢
+            Button okBtn = new Button
+            {
+                TextAlignment = TextAlignment.Center,
+                TextColor = ZigbeeColor.Current.LogicBlankBackgroundColor,
+                TextSize = 14,
+                X = cancelBtn.Right,
+                Height = Application.GetRealHeight(127),
+                Width = bottomFrame.Width - cancelBtn.Width,
+                BackgroundColor = ZigbeeColor.Current.LogicBtnTypeColor,
+                TextID = R.MyInternationalizationString.confrim,
+            };
+            bottomFrame.AddChidren(okBtn);
+
+            if (_if) {
+                cancelBtn.X = Application.GetRealWidth(0);
+                cancelBtn.Width = Application.GetRealWidth(0);
+                okBtn.X = Application.GetRealWidth(0);
+                okBtn.Width = Application.GetRealWidth(792);
+                okBtn.SetCornerWithSameRadius(Application.GetRealHeight(17), HDLUtils.RectCornerBottomLeft | HDLUtils.RectCornerBottomRight);
+            }
+            else
+            {
+                cancelBtn.X = Application.GetRealWidth(0);
+                cancelBtn.Width = Application.GetRealWidth(397);
+                okBtn.X = Application.GetRealWidth(397);
+                okBtn.Width = bottomFrame.Width - cancelBtn.Width;
+                cancelBtn.SetCornerWithSameRadius(Application.GetRealHeight(17), HDLUtils.RectCornerBottomLeft);
+                okBtn.SetCornerWithSameRadius(Application.GetRealHeight(17), HDLUtils.RectCornerBottomRight);
+
+            }
+            ///鍙栨秷鐐瑰嚮浜嬩欢
+            cancelBtn.MouseUpEventHandler += (sender, e) =>
+            {
+                dialog.Close();
+            };
+            ///纭鐐瑰嚮浜嬩欢
+            okBtn.MouseUpEventHandler += (sender, e) =>
+            {
+                if (string.IsNullOrEmpty(editTime.Text))
+                {
+                    ShowTip(Language.StringByID(R.MyInternationalizationString.timeNull),true);
+                    return;
+                }
+                if (int.Parse(editTime.Text) < 1 || int.Parse(editTime.Text) > 12)
+                {  ///闄愬埗杈撳叆鏁板瓧鑼冨洿;
+                    string str = Language.StringByID(R.MyInternationalizationString.less) + Language.StringByID(R.MyInternationalizationString.or) + Language.StringByID(R.MyInternationalizationString.more);
+                    ShowTip(str, true);
+                    return;
+
+
+                }
+                dialog.Close();
+                action(editTime.Text);
+           };
+
+        }
+        /// <summary>
+        /// 鎻愮ず妗�
+        /// </summary>
+        public static void ShowTip(string tipText,bool _if )
+        {
+            ///涓绘帶浠�
+            Dialog dialog = new Dialog();
+            dialog.Show();
+            ///鑳屾櫙鐨勭埗鎺т欢
+            FrameLayout fLayout = new FrameLayout { BackgroundColor = ZigbeeColor.Current.LogicTranslucentColor };
+            dialog.AddChidren(fLayout);
+            fLayout.MouseUpEventHandler += (sender, e) =>
+            {
+                dialog.Close();
+            };
+            ///寮规鐖舵帶浠�
+            FrameLayout tipFLayout = new FrameLayout
+            {
+                X = Application.GetRealWidth(144),
+                Y = Application.GetRealHeight(706),
+                Width = Application.GetRealWidth(792),
+                Height = Application.GetRealHeight(351 + 127),
+                BackgroundColor = ZigbeeColor.Current.LogicBlankBackgroundColor,
+                Radius = (uint)Application.GetRealHeight(17)
+            };
+            fLayout.AddChidren(tipFLayout);
+            ///涓婇潰蹇殑鐖舵帶浠�
+            FrameLayout topFrame = new FrameLayout
+            {
+                Width = Application.GetRealWidth(792),
+                Height = Application.GetRealHeight(351),
+            };
+            tipFLayout.AddChidren(topFrame);
+            ///鎻愮ず鎺т欢
+            Button tipBtn = new Button
+            {
+                Y = Application.GetRealHeight(69),
+                X = Application.GetRealWidth(150),
+                Height = Application.GetRealHeight(63),
+                Width = Application.GetRealWidth(492),
+                TextID = R.MyInternationalizationString.tip,
+                TextAlignment = TextAlignment.Center,
+                TextColor = ZigbeeColor.Current.LogicTipColor,
+                TextSize = 16,
+
+            };
+            topFrame.AddChidren(tipBtn);
+            ///鏂囨湰鎺т欢
+            Button Text1Btn = new Button
+            {
+                Y = Application.GetRealHeight(187),
+                X = Application.GetRealWidth(50),
+                Height = Application.GetRealHeight(58),
+                Width = Application.GetRealWidth(792-100),
+                Text= tipText,
+                TextAlignment = TextAlignment.Center,
+                TextColor = ZigbeeColor.Current.LogicBtnCancelColor,
+                TextSize = 14,
+
+            };
+            topFrame.AddChidren(Text1Btn);
+
+            ///涓嬮潰蹇殑鐖舵帶浠�
+            FrameLayout bottomFrame = new FrameLayout
+            {
+                Y = topFrame.Bottom,
+                Width = Application.GetRealWidth(792),
+                Height = Application.GetRealHeight(127),
+            };
+            tipFLayout.AddChidren(bottomFrame);
+            ///鍙栨秷鎺т欢
+            Button cancelBtn = new Button
+            {
+                TextAlignment = TextAlignment.Center,
+                TextColor = ZigbeeColor.Current.LogicBtnCancelColor,
+                TextSize = 14,
+                Height = Application.GetRealHeight(127),
+                Width = Application.GetRealWidth(397),
+                BackgroundColor = ZigbeeColor.Current.LogicMiddleBackgroundColor,
+                TextID = R.MyInternationalizationString.cancel,
+            };
+            bottomFrame.AddChidren(cancelBtn);
+            ///纭鎺т欢
+            Button okBtn = new Button
+            {
+                TextAlignment = TextAlignment.Center,
+                TextColor = ZigbeeColor.Current.LogicBlankBackgroundColor,
+                TextSize = 14,
+                X = cancelBtn.Right,
+                Height = Application.GetRealHeight(127),
+                Width = bottomFrame.Width - cancelBtn.Width,
+                BackgroundColor = ZigbeeColor.Current.LogicBtnTypeColor,
+                TextID = R.MyInternationalizationString.confrim,
+            };
+            bottomFrame.AddChidren(okBtn);
+
+            if (_if)
+            {
+                cancelBtn.X = Application.GetRealWidth(0);
+                cancelBtn.Width = Application.GetRealWidth(0);
+                okBtn.X = Application.GetRealWidth(0);
+                okBtn.Width = Application.GetRealWidth(792);
+                okBtn.SetCornerWithSameRadius(Application.GetRealHeight(17), HDLUtils.RectCornerBottomLeft | HDLUtils.RectCornerBottomRight);
+            }
+            else
+            {
+                cancelBtn.X = Application.GetRealWidth(0);
+                cancelBtn.Width = Application.GetRealWidth(397);
+                okBtn.X = Application.GetRealWidth(397);
+                okBtn.Width = bottomFrame.Width - cancelBtn.Width;
+                cancelBtn.SetCornerWithSameRadius(Application.GetRealHeight(17), HDLUtils.RectCornerBottomLeft);
+                okBtn.SetCornerWithSameRadius(Application.GetRealHeight(17), HDLUtils.RectCornerBottomRight);
+
+            }
+            ///鍙栨秷鐐瑰嚮浜嬩欢
+            cancelBtn.MouseUpEventHandler += (sender, e) =>
+            {
+                dialog.Close();
+            };
+            ///纭鐐瑰嚮浜嬩欢
+            okBtn.MouseUpEventHandler += (sender, e) =>
+            {
+                dialog.Close();
+            };
+        }
+    }
+}
diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/SkipView.cs b/ZigbeeApp/Shared/Phone/Device/Logic/SkipView.cs
index ca15989..9f07ac1 100755
--- a/ZigbeeApp/Shared/Phone/Device/Logic/SkipView.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Logic/SkipView.cs
@@ -8,7 +8,7 @@
 
 namespace Shared.Phone.Device.Logic
 {
-    public class SkipView
+    public class SkipView:FrameLayout
     {
         /// <summary>
         /// 鍏跺畠鐣岄潰璺宠繘鏉ョ殑鍏ュ彛
@@ -20,8 +20,10 @@
             {
                 case 0:
                     {
-                        //new涓�涓柊閫昏緫瀵硅薄锛�
-                        //鏂板姝e父鑷姩鍖栧叆鍙�
+                     
+
+                        ////new涓�涓柊閫昏緫瀵硅薄锛�
+                        ////鏂板姝e父鑷姩鍖栧叆鍙�
                         Common.Logic.CurrentLogic = new Common.Logic();
                         Common.Logic.CurrentLogic.IsEnable = 1;//榛樿涓哄紑
                         Common.Logic.CurrentLogic.LogicType = 0;//鏍囪閫昏緫绫诲瀷
@@ -60,32 +62,11 @@
                         doorLockLogicList.Show();
                     }
                     break;
-                case 2:
-                    {
-                        ///Sone闂ㄩ攣涓诲叆鍙�
-                        if (doorLock == null)
-                        {
-                            ///闃叉鎶涘紓甯�
-                            doorLock = new DoorLock();
-                        }
-                        Send.CurrentDoorLock = doorLock;
-                        ///杩涙潵鍒锋柊涓�娆¤澶囧垪琛紱
-                        Common.Logic.LogicDviceList.Clear();
-                        if (Common.Logic.LogicDviceList.Count == 0)
-                        {
-                            Common.Logic.LogicDviceList.AddRange(LocalDevice.Current.listAllDevice.ToArray());
-                        }
-                        var addLogicPage = new SoneLogicList();
-                        UserView.HomePage.Instance.AddChidren(addLogicPage);
-                        UserView.HomePage.Instance.PageIndex += 1;
-                        addLogicPage.Show();
-                     
-                    }
-                    break;
+              
             }
 
         }
-
+        
 
         #region 鈼� 鑷姩鍖朹_________________________
         /// <summary>
@@ -698,7 +679,7 @@
         #endregion
 
         /// <summary>
-        /// 闂ㄩ攣鍙栨秷璁剧疆鐢ㄧ殑鏂规硶(鐩稿綋涓�涓叧闂父寮�妯″紡鎸夐挳,鍒嗙被-鑷姩鍖�-涓嶉渶瑕佹樉绀鸿鑷姩鍖�)
+        /// 闂ㄩ攣澶辨晥璁剧疆鐢ㄧ殑鏂规硶(鐩稿綋涓�涓叧闂父寮�妯″紡鎸夐挳,鍒嗙被-鑷姩鍖�-涓嶉渶瑕佹樉绀鸿鑷姩鍖�)
         /// </summary>
         /// <param name="timeVlaue">鏃堕棿鍊�</param>
         /// <param name="common">璁惧</param>
@@ -776,6 +757,30 @@
             }
             return logic;
         }
+
+        ///<summary>
+        ///鍒犻櫎鎵�鏈夋椂鏁堟�ц嚜鍔ㄥ寲
+        /// 杩斿洖鍊硷細true鎴愬姛;false澶辫触;
+        /// </summary>
+        public static async System.Threading.Tasks.Task<bool> GetLogicAll()
+        {
+            bool _if = false;
+            var Idlist = await Send.GetLogicId(3);
+            if (Idlist.Count != 0)
+            {
+                _if = true;
+
+                for (int i = 0; i < Idlist.Count; i++)
+                {
+                    int id = Idlist[i];
+                    //鏈潵鍙湁涓�鏉℃椂鏁堟�ц嚜鍔ㄥ寲锛�
+                    //闃叉鐗规畩鎯呭喌,鎵惧埌灏卞垹闄ゆ帀;
+                    Send.DelLogic(id);
+                }
+            }
+            return _if;
+        }
+       
     }
 }
 
diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/SoneLogicList.cs b/ZigbeeApp/Shared/Phone/Device/Logic/SoneLogicList.cs
index 57a5a58..e647ad7 100755
--- a/ZigbeeApp/Shared/Phone/Device/Logic/SoneLogicList.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Logic/SoneLogicList.cs
@@ -8,12 +8,23 @@
 {
     public class SoneLogicList : FrameLayout
     {
+        /// <summary>
+        /// 缁橲one闂ㄩ攣寰愭鏇存柊鐣岄潰鐢ㄧ殑
+        /// </summary>
+        ///
         public SoneLogicList()
         {
             Tag = "SoneLogic";
         }
+        /// <summary>
+        /// 
+        /// </summary>
+        /// <param name="action">缁欏緪姊呭埛鏂扮晫闈㈢敤鐨�</param>
+        /// <param name="bool_If"></param>
+        public Action<bool> action;
         public async void Show()
         {
+         
             #region  鐣岄潰鐨勫竷灞�浠g爜
             UserView.HomePage.Instance.ScrollEnabled = false;//閿佷綇宸︽粦
             TopView view = new TopView();
@@ -22,7 +33,13 @@
             view.clickBtn.MouseDownEventHandler += (sender, e) =>
             {
                 UserView.HomePage.Instance.ScrollEnabled = true;
+                if (action != null)
+                {
+                    action(Send.CurrentDoorLock.IsDoorLockNormallyMode);
+                }
+
                 RemoveFromParent();
+
             };
 
             var middle = new FrameLayout
@@ -54,10 +71,11 @@
                 SelectedImagePath = "ZigeeLogic/openMode.png",
             };
             fLayout.AddChidren(modeIconBtn);
-            var logic = await SkipView.GetLogicIfon();
-            if (logic != null)
-            {
 
+            if (Send.CurrentDoorLock.IsDoorLockNormallyMode)
+            {
+                /// 鏌ユ壘鏄惁瀛樺湪鏃舵晥鎬ц嚜鍔ㄥ寲锛涙湁鐨勮瘽灏辫繑鍥炶嚜鍔ㄥ寲瀵硅薄;
+                var logic = await SkipView.GetLogicIfon();
 
                 fLayout.Height = Application.GetRealHeight(780);//鏀瑰彉楂樺害
                 modeIconBtn.IsSelected = true;//鏀瑰彉鍥炬爣鐘舵��
@@ -82,26 +100,33 @@
                     TextSize = 16,
                 };
                 openModeFl.AddChidren(closeBtn);
-                closeBtn.MouseUpEventHandler += (sender,e) => {
-                    
-
-                    var alert = new UserCenter.ShowMsgControl(UserCenter.ShowMsgType.Confirm,
-                   Language.StringByID(MyInternationalizationString.doyouwanttodelete),
-                   Language.StringByID(MyInternationalizationString.confrim));
-                    alert.Show();
-                    alert.ConfirmClickEvent += () =>
+                closeBtn.MouseUpEventHandler += async (sender, e) =>
+                {
+                    var result = await UserCenter.DoorLock.DoorLockCommonInfo.DelNormallyOpenMode(Send.CurrentDoorLock);
+                    if (result)
                     {
-                        Send.DelLogic(logic.LogicId);
+                        if (logic != null)
+                        {
+                            ///鏈夊彲鑳藉彧鏈夊父寮�妯″紡锛屾病鏈夋椂鏁堟�ц嚜鍔ㄥ寲
+                            ///娌℃湁鍒ゆ柇鐨勮瘽锛岄�昏緫浼氫负绌猴紝鎶涘嚭寮傚父;
+                            Send.DelLogic(logic.LogicId);
+                        }
+                        Send.CurrentDoorLock.IsDoorLockNormallyMode = false;
                         this.RemoveFromParent();
                         var soneLogicList = new SoneLogicList();
                         UserView.HomePage.Instance.AddChidren(soneLogicList);
                         UserView.HomePage.Instance.PageIndex += 1;
                         soneLogicList.Show();
-                    };
+                    }
+                    else
+                    {
+                        ///鎻愮ず澶辫触
+                    }
+
                 };
 
                 ///鏄剧ず澶辨晥璁剧疆鏃堕棿鏂囨湰鎺т欢
-                var timeTextBtn= new Button
+                var timeTextBtn = new Button
                 {
                     Y = Application.GetRealHeight(127 + 69),
                     X = Application.GetRealWidth(225),
@@ -111,19 +136,23 @@
                     TextColor = ZigbeeColor.Current.LogicTextBlackColor,
                     Text = "鏃舵晥鎬у父寮�璁剧疆12:20",
                 };
-                openModeFl.AddChidren(timeTextBtn);
+                if (logic != null)
+                {
+                    ///鏈夋椂鏁堟�у父寮�鎵嶆樉绀烘椂闂存潯浠舵枃鏈�
+                    openModeFl.AddChidren(timeTextBtn);
+                }
                 ///鏃舵晥鎬у父寮�鍙湁涓�涓潯浠�;
                 try
                 {
                     var y = DateTime.Now.ToString("yy");//閭d竴骞�
                     var m = DateTime.Now.ToString("mm");//閭d竴鏈�
                     var d = DateTime.Now.ToString("dd");//閭d竴澶�
-                    var h =int.Parse(DateTime.Now.ToString("HH"));//褰撳墠绯荤粺鏃堕棿
+                    var h = int.Parse(DateTime.Now.ToString("HH"));//褰撳墠绯荤粺鏃堕棿
                     var me = DateTime.Now.ToLongDateString();
                     var timeInt = int.Parse(logic.Conditions[0]["DoorLockOpenDelayTime"]);
-                    int dayInt = (h + timeInt)/ 24;//绠楀嚭鍑犲ぉ鍚庢墽琛�
+                    int dayInt = (h + timeInt) / 24;//绠楀嚭鍑犲ぉ鍚庢墽琛�
                     int hour = (h + timeInt) % 24;//绠楀嚭鍑犲ぉ鍚庨偅涓椂闂存墽琛�
-                    timeTextBtn.Text = "鏃舵晥鎬у父寮�璁剧疆" + y + "骞�" + m + "鏈�" + d + dayInt + "鍙�" + timeInt + "鏃�"+ "鎵ц";
+                    timeTextBtn.Text = "鏃舵晥鎬у父寮�璁剧疆" + y + "骞�" + m + "鏈�" + d + dayInt + "鍙�" + timeInt + "鏃�" + "鎵ц";
                 }
                 catch { }
 
@@ -155,8 +184,8 @@
                     TextSize = 15,
                     TextColor = ZigbeeColor.Current.LogicTextBlackColor,
                     TextAlignment = TextAlignment.CenterLeft,
-                   // Text = "鏃舵晥鎬у父寮�璁剧疆",
-                    TextID=MyInternationalizationString.timeSetSone,
+                    // Text = "鏃舵晥鎬у父寮�璁剧疆",
+                    TextID = MyInternationalizationString.timeSetSone,
                 };
                 modeFl.AddChidren(modeTextBtn);
                 ///涓嬩竴绾ц彍鍗曞浘鏍囨帶浠�
@@ -170,20 +199,54 @@
                 };
                 modeFl.AddChidren(nextIconBtn);
 
-                var clickBtn = new Button
-                {
-                    Y = Application.GetRealHeight(478),
-                    X = Application.GetRealWidth(58),
-                    Height = Application.GetRealHeight(138),
-                    Width = Application.GetRealWidth(1022),
-                };
-                modeFl.AddChidren(clickBtn);
 
 
-                clickBtn.MouseUpEventHandler += async (sender, e) =>
-                {
-                    var d = await SkipView.LockAddModifyLogic(12, Send.CurrentDoorLock);
-                };
+                nextIconBtn.MouseUpEventHandler += (sender, e) =>
+                 {
+                     LogicView.TipView.ShowConfrimTip(() =>
+                     {///鍐嶆纭
+                       LogicView.TipView.ShowInputTip(true, async (str) =>
+                         {///纭鍙戦�佸懡浠�
+                           try
+                             {
+                               ///xm
+                               var result = await UserCenter.DoorLock.DoorLockCommonInfo.SetNormallyOpenModeFuncAsync(Send.CurrentDoorLock);
+                                 if (!result)
+                                 {
+                                     Application.RunOnMainThread(() =>
+                                     {
+                                       ///鎻愮ず澶辫触
+                                   });
+                                     return;
+                                 }
+                                 else
+                                 {
+                                   ///鍥犱负鏈夊父寮�妯″紡涓嬫墠鍙互鍒涘缓澶辨晥閫昏緫锛�
+                                   SkipView.GetLogicAll();//鍒犻櫎涔嬪墠鎵�鏈夊け鏁堥�昏緫
+                                   var addResult = await SkipView.LockAddModifyLogic(int.Parse(str), Send.CurrentDoorLock);//娣诲姞涓�鏉″け鏁堥�昏緫
+                                   if (!addResult)
+                                     {
+                                       ///鎻愮ず澶辫触
+                                       return;
+                                     }
+                                     Send.CurrentDoorLock.IsDoorLockNormallyMode = true;
+                                     this.RemoveFromParent();
+                                     var soneLogicList = new SoneLogicList();
+                                     UserView.HomePage.Instance.AddChidren(soneLogicList);
+                                     UserView.HomePage.Instance.PageIndex += 1;
+                                     soneLogicList.Show();
+
+                                 }
+                             }
+                             catch
+                             {
+
+                             }
+                         });
+
+                     });
+
+                 };
             }
 
             #endregion
@@ -234,7 +297,7 @@
             addLogicfL.AddChidren(addIconBtn);
             addIconBtn.MouseUpEventHandler += (sender, e) =>
             {
-               
+
                 //璇诲彇绯荤粺褰撳墠鏃堕棿锛氭椂-鍒�
                 //璇诲彇绯荤粺褰撳墠鏃堕棿锛氭椂-鍒�
                 var h = DateTime.Now.ToString("HH");
diff --git a/ZigbeeApp/Shared/Phone/MainPage/ControlForm/DeviceFreshAirDetailCardForm.cs b/ZigbeeApp/Shared/Phone/MainPage/ControlForm/DeviceFreshAirDetailCardForm.cs
index 32925fc..a1a20dd 100755
--- a/ZigbeeApp/Shared/Phone/MainPage/ControlForm/DeviceFreshAirDetailCardForm.cs
+++ b/ZigbeeApp/Shared/Phone/MainPage/ControlForm/DeviceFreshAirDetailCardForm.cs
@@ -106,7 +106,7 @@
             {
                 if (!btnManual.IsSelected)
                 {
-                    this.SetFanComand(7);
+                    this.SetFanComand(15);
                 }
             };
 
@@ -217,7 +217,7 @@
         ///3:High
         ///4:On
         ///5:Auto
-        /// 7:Manual
+        /// 15:Manual
         /// </summary> 
         private void SetFanComand(int command)
         {
@@ -247,7 +247,7 @@
                 case 5:
                     FreshAirDev.SetAuto();
                     break;
-                case 7:
+                case 15:
                     FreshAirDev.SetManual();
                     break;
             }
@@ -295,7 +295,7 @@
                 this.listControl[2].IsBold = false;
                 this.listControl[3].Visible = false;
             }
-            else if (FreshAirDev.currentFanMode == 7)
+            else if (FreshAirDev.currentFanMode == 15)
             {
                 this.listControl[0].TextColor = ZigbeeColor.Current.XMGray3;
                 this.listControl[0].IsBold = false;
diff --git a/ZigbeeApp/Shared/Phone/MainPage/Controls/DeviceCard/Base/DeviceCardCommon.cs b/ZigbeeApp/Shared/Phone/MainPage/Controls/DeviceCard/Base/DeviceCardCommon.cs
index fbc388a..721b112 100755
--- a/ZigbeeApp/Shared/Phone/MainPage/Controls/DeviceCard/Base/DeviceCardCommon.cs
+++ b/ZigbeeApp/Shared/Phone/MainPage/Controls/DeviceCard/Base/DeviceCardCommon.cs
@@ -296,7 +296,7 @@
             //濡傛灉杩欎釜鍑芥暟琚噸鍐欑殑璇�,鍒欎唬琛ㄨ繖涓澶囨湁寮�鍏冲姛鑳�
             this.isHadOpenSwitch = false;
             //榛樿鐢ㄥ湪绾跨姸鎬佹潵鍒ゆ柇
-            return i_device.IsOnline == 1;
+            return Common.LocalDevice.Current.CheckDeviceIsOnline(i_device);
         }
 
 
diff --git a/ZigbeeApp/Shared/Phone/MainPage/Controls/DeviceCard/DeviceFreshAirCardControl.cs b/ZigbeeApp/Shared/Phone/MainPage/Controls/DeviceCard/DeviceFreshAirCardControl.cs
new file mode 100755
index 0000000..9fc1779
--- /dev/null
+++ b/ZigbeeApp/Shared/Phone/MainPage/Controls/DeviceCard/DeviceFreshAirCardControl.cs
@@ -0,0 +1,116 @@
+锘縰sing System;
+using Shared.Phone.UserCenter;
+using ZigBee.Device;
+namespace Shared.Phone.MainPage.Controls
+{
+    /// <summary>
+    /// 鏂伴鍗$墖鐨勬帶浠�
+    /// </summary>
+    public class DeviceFreshAirCardControl : DeviceCardCommon
+    {
+        #region 鈻� 鍒濆鍖朹____________________________
+
+        /// <summary>
+        /// 鍒濆鍖栨帶浠�
+        /// </summary>
+        /// <param name="i_device"></param>
+        public override void InitControl(CommonDevice i_device)
+        {
+            base.InitControl(i_device);
+
+            //娣诲姞璺宠浆娣卞害鍗$墖淇℃伅浜嬩欢
+            this.AddDetailInfoEvent(i_device);
+
+            //娣诲姞寮�鍏虫帶浠�
+            var btnSwitch = this.AddSwitchControl();
+            btnSwitch.ButtonClickEvent += (sender, e) =>
+            {
+                //濡傛灉浣忓畢涓鸿櫄鎷熶綇瀹�
+                if (Common.Config.Instance.Home.IsVirtually == true)
+                {
+                    //鐩存帴鍙樻洿缂撳瓨
+                    ((FreshAir)i_device).currentFanStatus = btnSwitch.IsSelected == true ? 4 : 0;
+                    this.RefreshControlInfo(this.device);
+                    return;
+                }
+
+                bool setStatu = !btnSwitch.IsSelected;
+                //鍙樻洿鍗$墖鐘舵��
+                this.SetCardOpenStatu(setStatu);
+                //妫�娴嬫槸鍚﹁幏鍙栫綉鍏冲弽棣堢殑缁撴灉,濡傛灉缃戝叧娌℃湁鍥炲,鍒欎細寮瑰嚭娑堟伅
+                this.StartCheckResponeResult(!setStatu);
+
+                if (setStatu == true)
+                {
+                    //鎵撳紑
+                    this.SetDeviceStatuText(Language.StringByID(R.MyInternationalizationString.uOpen1));
+                    (i_device as FreshAir).Open();
+                }
+                else
+                {
+                    //鍏抽棴
+                    this.SetDeviceStatuText(Language.StringByID(R.MyInternationalizationString.Close));
+                    (i_device as FreshAir).Close();
+                }
+            };
+        }
+
+        #endregion
+
+        #region 鈻� 娣卞害鍗$墖淇℃伅_______________________
+
+        /// <summary>
+        /// 娣诲姞璺宠浆娣卞害鍗$墖淇℃伅浜嬩欢
+        /// </summary>
+        private void AddDetailInfoEvent(CommonDevice i_device)
+        {
+            //娣卞害鍗$墖淇℃伅
+            this.ButtonClickEvent += (sender, e) =>
+            {
+                Common.CommonPage.Instance.IsDrawerLockMode = true;
+
+                //鏂伴绫诲瀷鐨勬繁搴﹀崱鐗囩晫闈�
+                var form = new MainPage.ControlForm.DeviceFreshAirDetailCardForm();
+                form.AddForm(i_device, HdlRoomLogic.Current.CurrentRoom, 965, 1374);
+                form.FormCloseEvent += this.CardDetailInfoBackEvent;
+            };
+        }
+
+        #endregion
+
+        #region 鈻� 妫�娴嬭澶囨墦寮�鐘舵�乢__________________
+
+        /// <summary>
+        /// 妫�娴嬭澶囨墦寮�鐘舵��
+        /// </summary>
+        /// <param name="i_device"></param>
+        /// <returns></returns>
+        public override bool CheckIsOpenStatu(CommonDevice i_device)
+        {
+            return ((FreshAir)i_device).currentFanStatus != 0;
+        }
+
+        #endregion
+
+        #region 鈻� 鍙戦�佽幏鍙栫姸鎬佸懡浠__________________
+
+        /// <summary>
+        /// 鍙戦�佽幏鍙栫姸鎬佸懡浠�
+        /// </summary>
+        public override void SendStatuComand()
+        {
+            if (Common.Config.Instance.Home.IsVirtually == true)
+            {
+                //濡傛灉浣忓畢涓鸿櫄鎷熶綇瀹�,鍒欐鍔熻兘鏃犳晥
+                return;
+            }
+            //妫�娴嬭兘鍚﹀彂閫佽幏鍙栫姸鎬佸懡浠�
+            if (this.CheckCanSendStatuComand() == true)
+            {
+                HdlDeviceAttributeLogic.Current.SendACStatuComand(this.device);
+            }
+        }
+
+        #endregion
+    }
+}
diff --git a/ZigbeeApp/Shared/Phone/MainPage/Controls/DeviceSelectUnallocatedControl.cs b/ZigbeeApp/Shared/Phone/MainPage/Controls/DeviceSelectUnallocatedControl.cs
index aa87c60..a778781 100755
--- a/ZigbeeApp/Shared/Phone/MainPage/Controls/DeviceSelectUnallocatedControl.cs
+++ b/ZigbeeApp/Shared/Phone/MainPage/Controls/DeviceSelectUnallocatedControl.cs
@@ -64,7 +64,7 @@
         /// <summary>
         /// 鏈垎閰嶇晫闈㈢殑璁惧閫夋嫨鎺т欢
         /// </summary>
-        /// <param name="i_ChidrenYaxis">瀛愭帶浠禮杞村亸绉婚噺(鐪熷疄鍊�,鏈変簺鐣岄潰闇�瑕佽繖绉嶇壒娈婃搷浣�)</param>
+        /// <param name="i_ChidrenYaxis">瀛愭帶浠禮杞村亸绉婚噺(銆愬垪琛ㄦ帶浠剁殑rowSpace/2銆戝嵆鍙�,涓嶆噦榛樿涓�0鍗冲彲)</param>
         public DeviceSelectUnallocatedControl(int i_ChidrenYaxis = 0) : base(i_ChidrenYaxis)
         {
             this.SetCornerWithSameRadius(Application.GetRealHeight(58), HDLUtils.RectCornerTopLeft);
diff --git a/ZigbeeApp/Shared/Phone/MainPage/HomeMainPageForm.cs b/ZigbeeApp/Shared/Phone/MainPage/HomeMainPageForm.cs
index fb67b15..cb99f85 100755
--- a/ZigbeeApp/Shared/Phone/MainPage/HomeMainPageForm.cs
+++ b/ZigbeeApp/Shared/Phone/MainPage/HomeMainPageForm.cs
@@ -607,6 +607,11 @@
                     {
                         cardContr = new Controls.DeviceAcCardControl();
                     }
+                    //鏂伴
+                    else if (device.Type == DeviceType.FreshAir)
+                    {
+                        cardContr = new Controls.DeviceFreshAirCardControl();
+                    }
                     //褰╃伅(璋冨厜鍣�)
                     else if (device.Type == DeviceType.DimmableLight)
                     {
@@ -1139,6 +1144,11 @@
                             //绌鸿皟鏄壒娈婄殑,瀹冪殑寮�鍏虫槸灞炴�т笂鎶ユ潵鐫�.宸茬粡鎺ユ敹鍒扮綉鍏崇殑鍙嶉
                             this.dicDeviceCardControl[mainKeys].SetHadGetResponeResultStatu();
                         }
+                        if (report.DeviceStatusReport.CluterID == 514 && report.DeviceStatusReport.AttriBute[0].AttributeId == 0)
+                        {
+                            //鏂伴鏄壒娈婄殑,瀹冪殑寮�鍏虫槸灞炴�т笂鎶ユ潵鐫�.宸茬粡鎺ユ敹鍒扮綉鍏崇殑鍙嶉
+                            this.dicDeviceCardControl[mainKeys].SetHadGetResponeResultStatu();
+                        }
                         this.dicDeviceCardControl[mainKeys].RefreshControlInfo(locadevice);
                     }
                 }, ShowErrorMode.NO);
@@ -1153,7 +1163,8 @@
                     if (this.dicDeviceCardControl.ContainsKey(mainKeys) == true)
                     {
                         //鍒锋柊鍗$墖鐘舵��
-                        this.dicDeviceCardControl[mainKeys].SetCardOnlineStatu(report.IsOnline == 1);
+                        bool bolOnline = Common.LocalDevice.Current.CheckDeviceIsOnline(report);
+                        this.dicDeviceCardControl[mainKeys].SetCardOnlineStatu(bolOnline);
                         return;
                     }
 
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/BelongAreaControl.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/BelongAreaControl.cs
index 267b219..4bd0902 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/BelongAreaControl.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/BelongAreaControl.cs
@@ -47,7 +47,7 @@
         /// <summary>
         /// 鎵�灞炲尯鍩熺殑鎺т欢
         /// </summary>
-        /// <param name="i_ChidrenYaxis">瀛愭帶浠禮杞村亸绉婚噺(鐪熷疄鍊�,鏈変簺鐣岄潰闇�瑕佽繖绉嶇壒娈婃搷浣�)</param>
+        /// <param name="i_ChidrenYaxis">瀛愭帶浠禮杞村亸绉婚噺(銆愬垪琛ㄦ帶浠剁殑rowSpace/2銆戝嵆鍙�,涓嶆噦榛樿涓�0鍗冲彲)</param>
         public BelongAreaControl(int i_ChidrenYaxis = 0) : base(i_ChidrenYaxis)
         {
             //鍒濆鍖栨暟鎹�
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/NormalSelectControl.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/NormalSelectControl.cs
index dbc3daa..63d9ce0 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/NormalSelectControl.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/NormalSelectControl.cs
@@ -58,7 +58,7 @@
         /// 鍋氭垚涓�涓畝鍗曠殑閫夋嫨鎺т欢
         /// </summary>
         /// <param name="i_text">鏄剧ず鏂囨湰</param>
-        /// <param name="i_ChidrenYaxis">瀛愭帶浠禮杞村亸绉婚噺(鐪熷疄鍊�,鏈変簺鐣岄潰闇�瑕佽繖绉嶇壒娈婃搷浣�)</param>
+        /// <param name="i_ChidrenYaxis">瀛愭帶浠禮杞村亸绉婚噺(銆愬垪琛ㄦ帶浠剁殑rowSpace/2銆戝嵆鍙�,涓嶆噦榛樿涓�0鍗冲彲)</param>
         public NormalSelectControl(string i_text, int i_ChidrenYaxis = 0) : base(i_ChidrenYaxis)
         {
             this.textValue = i_text;
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/SafetySensorStatuControl.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/SafetySensorStatuControl.cs
index 01d604f..1abe160 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/SafetySensorStatuControl.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/SafetySensorStatuControl.cs
@@ -81,7 +81,7 @@
             btnOnline.X = this.Width - Application.GetRealWidth(200 + 46);
             btnOnline.Y = btnDeviceName.Y;
             btnOnline.TextAlignment = TextAlignment.CenterRight;
-            this.SetOnlineStatu(device.IsOnline == 1);
+            this.SetOnlineStatu(Common.LocalDevice.Current.CheckDeviceIsOnline(device));
             this.AddChidren(btnOnline);
         }
 
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/DeviceControls/DeviceObjectControl.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/DeviceControls/DeviceObjectControl.cs
index 9a6ce1c..fcecdb3 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/DeviceControls/DeviceObjectControl.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/DeviceControls/DeviceObjectControl.cs
@@ -62,7 +62,7 @@
         /// 鍋氭垚涓�涓樉绀鸿澶囩被鍨�+璁惧MAC澶囨敞鐨凴owLayout
         /// </summary>
         /// <param name="i_deviceMac">璁惧鐨凪ac鍦板潃</param>
-        /// <param name="i_ChidrenYaxis">瀛愭帶浠禮杞村亸绉婚噺(鐪熷疄鍊�,鏈変簺鐣岄潰闇�瑕佽繖绉嶇壒娈婃搷浣�)</param>
+        /// <param name="i_ChidrenYaxis">瀛愭帶浠禮杞村亸绉婚噺(銆愬垪琛ㄦ帶浠剁殑rowSpace/2銆戝嵆鍙�,涓嶆噦榛樿涓�0鍗冲彲)</param>
         public DeviceObjectControl(string i_deviceMac, int i_ChidrenYaxis = 0) : base(i_ChidrenYaxis)
         {
             this.deviceMac = i_deviceMac;
@@ -96,7 +96,7 @@
             frameTable.AddBottomLine();
 
             //璁剧疆鍦ㄧ嚎鐘舵�佺殑鐗规晥
-            this.isOnline = listDevice[0].IsOnline == 1;
+            this.isOnline = Common.LocalDevice.Current.CheckDeviceIsOnline(listDevice[0]);
         }
 
         #endregion
@@ -144,7 +144,7 @@
             //璁惧鎴块棿
             btnDeviceRoom.Text = Common.LocalDevice.Current.GeteRealDeviceRoomName(listDevice[0]);
             //璁剧疆鍦ㄧ嚎鐘舵�佺殑鐗规晥
-            this.isOnline = listDevice[0].IsOnline == 1;
+            this.isOnline = Common.LocalDevice.Current.CheckDeviceIsOnline(listDevice[0]);
         }
 
 
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/DeviceControls/DeviceRoomControl.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/DeviceControls/DeviceRoomControl.cs
index f6e6474..9dcce0d 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/DeviceControls/DeviceRoomControl.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/DeviceControls/DeviceRoomControl.cs
@@ -61,7 +61,7 @@
         /// 鍋氭垚涓�涓樉绀鸿澶囧洖璺�+鎴块棿鐨凴owLayout
         /// </summary>
         /// <param name="i_device">璁惧瀵硅薄</param>
-        /// <param name="i_ChidrenYaxis">瀛愭帶浠禮杞村亸绉婚噺(鐪熷疄鍊�,鏈変簺鐣岄潰闇�瑕佽繖绉嶇壒娈婃搷浣�)</param>
+        /// <param name="i_ChidrenYaxis">瀛愭帶浠禮杞村亸绉婚噺(銆愬垪琛ㄦ帶浠剁殑rowSpace/2銆戝嵆鍙�,涓嶆噦榛樿涓�0鍗冲彲)</param>
         public DeviceRoomControl(CommonDevice i_device, int i_ChidrenYaxis = 0) : base(i_ChidrenYaxis)
         {
             this.mainKey = Common.LocalDevice.Current.GetDeviceMainKeys(i_device);
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/DeviceControls/DeviceSelectControl.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/DeviceControls/DeviceSelectControl.cs
index bcd071a..1059d0e 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/DeviceControls/DeviceSelectControl.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/DeviceControls/DeviceSelectControl.cs
@@ -63,7 +63,7 @@
         /// </summary>
         /// <param name="i_device">璁惧瀵硅薄</param>
         /// <param name="autoSelect">褰撶偣鍑绘鎺т欢鏃�,鏄惁鑷姩璁剧疆閫夋嫨鐘舵��</param>
-        /// <param name="i_ChidrenYaxis">瀛愭帶浠禮杞村亸绉婚噺(鐪熷疄鍊�,鏈変簺鐣岄潰闇�瑕佽繖绉嶇壒娈婃搷浣�)</param>
+        /// <param name="i_ChidrenYaxis">瀛愭帶浠禮杞村亸绉婚噺(銆愬垪琛ㄦ帶浠剁殑rowSpace/2銆戝嵆鍙�,涓嶆噦榛樿涓�0鍗冲彲)</param>
         public DeviceSelectControl(CommonDevice i_device, bool autoSelect, int i_ChidrenYaxis = 0) : base(i_ChidrenYaxis)
         {
             this.MainKeys = Common.LocalDevice.Current.GetDeviceMainKeys(i_device);
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/DeviceControls/DeviceSimpleSelectControl.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/DeviceControls/DeviceSimpleSelectControl.cs
index 369ccba..4c36649 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/DeviceControls/DeviceSimpleSelectControl.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/DeviceControls/DeviceSimpleSelectControl.cs
@@ -63,7 +63,7 @@
         /// </summary>
         /// <param name="i_device">璁惧瀵硅薄</param>
         /// <param name="autoSelect">褰撶偣鍑绘鎺т欢鏃�,鏄惁鑷姩璁剧疆閫夋嫨鐘舵��</param>
-        /// <param name="i_ChidrenYaxis">瀛愭帶浠禮杞村亸绉婚噺(鐪熷疄鍊�,鏈変簺鐣岄潰闇�瑕佽繖绉嶇壒娈婃搷浣�)</param>
+        /// <param name="i_ChidrenYaxis">瀛愭帶浠禮杞村亸绉婚噺(銆愬垪琛ㄦ帶浠剁殑rowSpace/2銆戝嵆鍙�,涓嶆噦榛樿涓�0鍗冲彲)</param>
         public DeviceSimpleSelectControl(CommonDevice i_device, bool autoSelect, int i_ChidrenYaxis = 0) : base(i_ChidrenYaxis)
         {
             this.MainKeys = Common.LocalDevice.Current.GetDeviceMainKeys(i_device);
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/DeviceControls/GatewayRowControl.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/DeviceControls/GatewayRowControl.cs
index dbf5e20..b61989d 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/DeviceControls/GatewayRowControl.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/DeviceControls/GatewayRowControl.cs
@@ -71,7 +71,7 @@
         /// 鍋氭垚涓�涓樉绀虹綉鍏充俊鎭殑RowLayout,娣诲姞姝ゆ帶浠跺埌瀹瑰櫒鍚庯紝璋冪敤銆怚nitControl()銆戝畬鎴愬垵濮嬪寲
         /// </summary>
         /// <param name="i_zbGateway">缃戝叧瀵硅薄</param>
-        /// <param name="ChidrenYaxis">瀛愭帶浠禮杞村亸绉婚噺(鏈変簺鐣岄潰闇�瑕佽繖绉嶇壒娈婃搷浣�)</param>
+        /// <param name="ChidrenYaxis">瀛愭帶浠禮杞村亸绉婚噺(銆愬垪琛ㄦ帶浠剁殑rowSpace/2銆戝嵆鍙�,涓嶆噦榛樿涓�0鍗冲彲)</param>
         public GatewayRowControl(ZbGateway i_zbGateway, int i_ChidrenYaxis = 0) : base(i_ChidrenYaxis)
         {
             this.zbGatewayId = HdlGatewayLogic.Current.GetGatewayId(i_zbGateway);
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/FrameLayoutControls/FrameCaptionInputControl.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/FrameLayoutControls/FrameCaptionInputControl.cs
index 261a095..fabd33b 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/FrameLayoutControls/FrameCaptionInputControl.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/FrameLayoutControls/FrameCaptionInputControl.cs
@@ -37,7 +37,7 @@
         /// </summary>
         /// <param name="i_caption">鏍囬鏂囨湰</param>
         /// <param name="i_text">杈撳叆妗嗙殑鍊�</param>
-        /// <param name="i_ChidrenYaxis">瀛愭帶浠禮杞村亸绉婚噺(鐪熷疄鍊�,鏈変簺鐣岄潰闇�瑕佽繖绉嶇壒娈婃搷浣�)</param>
+        /// <param name="i_ChidrenYaxis">瀛愭帶浠禮杞村亸绉婚噺(銆愬垪琛ㄦ帶浠剁殑rowSpace/2銆戝嵆鍙�,涓嶆噦榛樿涓�0鍗冲彲)</param>
         public FrameCaptionInputControl(string i_caption, string i_text, int i_ChidrenYaxis = 0) : base(i_ChidrenYaxis)
         {
             this.UseClickStatu = false;
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/FrameLayoutControls/FrameCaptionViewControl.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/FrameLayoutControls/FrameCaptionViewControl.cs
index 7038321..9844dcb 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/FrameLayoutControls/FrameCaptionViewControl.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/FrameLayoutControls/FrameCaptionViewControl.cs
@@ -37,7 +37,7 @@
         /// </summary>
         /// <param name="i_caption">鏍囬鏂囨湰</param>
         /// <param name="i_text">鏄剧ず鏂囨湰鐨勫��</param>
-        /// <param name="i_ChidrenYaxis">瀛愭帶浠禮杞村亸绉婚噺(鐪熷疄鍊�,鏈変簺鐣岄潰闇�瑕佽繖绉嶇壒娈婃搷浣�)</param>
+        /// <param name="i_ChidrenYaxis">瀛愭帶浠禮杞村亸绉婚噺(銆愬垪琛ㄦ帶浠剁殑rowSpace/2銆戝嵆鍙�,涓嶆噦榛樿涓�0鍗冲彲)</param>
         public FrameCaptionViewControl(string i_caption, string i_text, int i_ChidrenYaxis = 0) : base(i_ChidrenYaxis)
         {
             btnCaption = new NormalViewControl(270, 58, true);
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/FrameLayoutControls/FrameLayoutStatuControl.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/FrameLayoutControls/FrameLayoutStatuControl.cs
index c1b169c..3ba4da1 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/FrameLayoutControls/FrameLayoutStatuControl.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/FrameLayoutControls/FrameLayoutStatuControl.cs
@@ -54,7 +54,7 @@
         /// <summary>
         /// 鍋氭垚涓�涓偣鍑诲悗鑳藉鏄剧ず鐐瑰嚮鐘舵�佺殑鎺т欢
         /// </summary>
-        /// <param name="i_ChidrenYaxis">瀛愭帶浠禮杞村亸绉婚噺(鐪熷疄鍊�,鏈変簺鐣岄潰闇�瑕佽繖绉嶇壒娈婃搷浣�)</param>
+        /// <param name="i_ChidrenYaxis">瀛愭帶浠禮杞村亸绉婚噺(銆愬垪琛ㄦ帶浠剁殑rowSpace/2銆戝嵆鍙�,涓嶆噦榛樿涓�0鍗冲彲)</param>
         public FrameLayoutStatuControl(int i_ChidrenYaxis = 0)
         {
             this.chidrenYaxis = i_ChidrenYaxis;
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/FrameLayoutControls/FrameRowControl.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/FrameLayoutControls/FrameRowControl.cs
index 9fff52d..8905b4b 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/FrameLayoutControls/FrameRowControl.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/FrameLayoutControls/FrameRowControl.cs
@@ -42,7 +42,7 @@
         /// <summary>
         /// 鍋氭垚涓�涓猂owLayout鍨嬬殑FrameLayout
         /// </summary>
-        /// <param name="i_ChidrenYaxis">瀛愭帶浠禮杞村亸绉婚噺(鐪熷疄鍊�,鏈変簺鐣岄潰闇�瑕佽繖绉嶇壒娈婃搷浣�)</param>
+        /// <param name="i_ChidrenYaxis">瀛愭帶浠禮杞村亸绉婚噺(銆愬垪琛ㄦ帶浠剁殑rowSpace/2銆戝嵆鍙�,涓嶆噦榛樿涓�0鍗冲彲)</param>
         public FrameRowControl(int i_ChidrenYaxis = 0) : base(i_ChidrenYaxis)
         {
             this.Height = ControlCommonResourse.ListViewRowHeight;
@@ -331,7 +331,8 @@
             }
             var contr = this.AddLeftCaption(i_caption, i_width, Application.GetRealHeight(60), false);
             contr.TextSize = 15;
-            contr.Y = Application.GetRealHeight(12) + this.chidrenYaxis;
+            //褰撴寚瀹氬疄闄呭潗鏍囨椂,杩欓噷闇�瑕佺殑鍋忕Щ閲忎负2鍊�
+            contr.Y = Application.GetRealHeight(12) + this.chidrenYaxis * 2;
             this.AddChidren(contr, ChidrenBindMode.BindEventOnly);
 
             return contr;
@@ -355,7 +356,8 @@
                 i_width = Application.GetRealWidth(i_width);
             }
             var contr = this.AddLeftCaption(i_caption, i_width, Application.GetRealHeight(50), false);
-            contr.Y = Application.GetRealHeight(72) + this.chidrenYaxis;
+            //褰撴寚瀹氬疄闄呭潗鏍囨椂,杩欓噷闇�瑕佺殑鍋忕Щ閲忎负2鍊�
+            contr.Y = Application.GetRealHeight(72) + this.chidrenYaxis * 2;
             contr.TextSize = 12;
             contr.TextColor = UserCenterColor.Current.TextGrayColor1;
             this.AddChidren(contr, ChidrenBindMode.BindEventOnly);
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/RowLayoutControls/DeviceFunctionTypeRowControl.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/RowLayoutControls/DeviceFunctionTypeRowControl.cs
index 5b46b5e..4a8087c 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/RowLayoutControls/DeviceFunctionTypeRowControl.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/RowLayoutControls/DeviceFunctionTypeRowControl.cs
@@ -52,7 +52,7 @@
         /// 璁惧鍔熻兘绫诲瀷鐨勮嚜瀹氫箟琛屾帶浠�(閫夋嫨鍔熻兘涔嬪悗,鏃犳潯浠剁洿鎺ュ彉鏇寸被鍨�)
         /// </summary>
         /// <param name="i_device">璁惧鐨勫璞�</param>
-        /// <param name="i_ChidrenYaxis">瀛愭帶浠禮杞村亸绉婚噺(鐪熷疄鍊�,鏈変簺鐣岄潰闇�瑕佽繖绉嶇壒娈婃搷浣�)</param>
+        /// <param name="i_ChidrenYaxis">瀛愭帶浠禮杞村亸绉婚噺(銆愬垪琛ㄦ帶浠剁殑rowSpace/2銆戝嵆鍙�,涓嶆噦榛樿涓�0鍗冲彲)</param>
         public DeviceFunctionTypeRowControl(CommonDevice i_device, int i_ChidrenYaxis = 0) : base("", "", i_ChidrenYaxis)
         {
             this.device = i_device;
@@ -178,7 +178,7 @@
                 strType = Language.StringByID(R.MyInternationalizationString.uDeviceBelongId2800);
                 nowSelectNo = -1;
             }
-            else if (this.device.Type == DeviceType.DoorLock)
+            else if (this.device.Type == DeviceType.FreshAir)
             {
                 //鏂伴鍥哄畾涓� 鏂伴
                 strType = Language.StringByID(R.MyInternationalizationString.FreshAir);
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/RowLayoutControls/RowLayoutControl.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/RowLayoutControls/RowLayoutControl.cs
index 668b90c..0998463 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/RowLayoutControls/RowLayoutControl.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/RowLayoutControls/RowLayoutControl.cs
@@ -41,7 +41,7 @@
         /// <summary>
         /// 鍋氭垚涓�涓偣鍑昏兘澶熸樉绀洪�変腑鐘舵�佽儗鏅壊鐨凴owLayout(鎷ユ湁妗屽竷)
         /// </summary>
-        /// <param name="ChidrenYaxis">瀛愭帶浠禮杞村亸绉婚噺(鐪熷疄鍊�,鏈変簺鐣岄潰闇�瑕佽繖绉嶇壒娈婃搷浣�)</param>
+        /// <param name="ChidrenYaxis">瀛愭帶浠禮杞村亸绉婚噺(銆愬垪琛ㄦ帶浠剁殑rowSpace/2銆戝嵆鍙�,涓嶆噦榛樿涓�0鍗冲彲)</param>
         public RowLayoutControl(int i_ChidrenYaxis = 0)
         {
             this.LineColor = UserCenterColor.Current.Transparent;
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/SceneControls/SceneRoomControl.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/SceneControls/SceneRoomControl.cs
index f9d213d..a1719ae 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/SceneControls/SceneRoomControl.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/SceneControls/SceneRoomControl.cs
@@ -39,7 +39,7 @@
         /// </summary>
         /// <param name="i_SceneId">鍦烘櫙ID</param>
         /// <param name="i_SceneName">鍦烘櫙鍚�</param>
-        /// <param name="i_chidrenYaxis">瀛愭帶浠禮杞村亸绉婚噺(鐪熷疄鍊�,鏈変簺鐣岄潰闇�瑕佽繖绉嶇壒娈婃搷浣�)</param>
+        /// <param name="i_chidrenYaxis">瀛愭帶浠禮杞村亸绉婚噺(銆愬垪琛ㄦ帶浠剁殑rowSpace/2銆戝嵆鍙�,涓嶆噦榛樿涓�0鍗冲彲)</param>
         public SceneRoomControl(int i_SceneId, string i_SceneName, int i_chidrenYaxis) : base(i_chidrenYaxis)
         {
             this.SceneId = i_SceneId;
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/SceneControls/SceneSimpleSelectControl.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/SceneControls/SceneSimpleSelectControl.cs
index c44566f..4c2b4d5 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/SceneControls/SceneSimpleSelectControl.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/SceneControls/SceneSimpleSelectControl.cs
@@ -65,7 +65,7 @@
         /// 鍋氭垚涓�涓畝鍗曞満鏅�夋嫨鐨勮鎺т欢(瀹冧細鑷姩璁剧疆閫夋嫨鐘舵��)
         /// </summary>
         /// <param name="i_Scene">鍦烘櫙瀵硅薄</param>
-        /// <param name="i_ChidrenYaxis">瀛愭帶浠禮杞村亸绉婚噺(鐪熷疄鍊�,鏈変簺鐣岄潰闇�瑕佽繖绉嶇壒娈婃搷浣�)</param>
+        /// <param name="i_ChidrenYaxis">瀛愭帶浠禮杞村亸绉婚噺(銆愬垪琛ㄦ帶浠剁殑rowSpace/2銆戝嵆鍙�,涓嶆噦榛樿涓�0鍗冲彲)</param>
         public SceneSimpleSelectControl(Common.SceneUI i_Scene, int i_ChidrenYaxis = 0) : base(i_ChidrenYaxis)
         {
             this.SceneId = i_Scene.Id;
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlDevicePanelLogic.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlDevicePanelLogic.cs
index 90a72cc..91787a6 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlDevicePanelLogic.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlDevicePanelLogic.cs
@@ -113,6 +113,37 @@
             return true;
         }
 
+        /// <summary>
+        /// 璁剧疆闈㈡澘棰滆壊
+        /// </summary>
+        /// <param name="panel">鎸夐敭闈㈡澘鐨�</param>
+        /// <param name="colorData">鍙缃紑鐨勯鑹�</param>
+        /// <returns></returns>
+        public async Task<bool> SetPanelColorInfo(Panel panel, Panel.KeyColorData colorData)
+        {
+            var keyNum = new Panel.KeyNumStatus();
+            //榛樿绗竴涓敤闈㈡澘绗竴涓寜閿鑹蹭綔涓烘暣涓潰鏉跨殑棰滆壊
+            keyNum.Key1 = true;
+            var result = await panel.SetPanelColorInfoAsync(colorData, keyNum);
+            if (result == null || result.responseData == null)
+            {
+                //璁剧疆鎸夐敭闈㈡澘鎸囩ず鐏鑹插け璐�
+                string msg = Language.StringByID(R.MyInternationalizationString.uSetPanelPilolightSettionFail);
+                this.ShowErrorMsg(msg);
+                return false;
+            }
+            if (result.responseData.status != 0)
+            {
+                //璁剧疆鎸夐敭闈㈡澘鎸囩ず鐏鑹插け璐�
+                string msg = Language.StringByID(R.MyInternationalizationString.uSetPanelPilolightSettionFail);
+                this.ShowErrorMsg(msg);
+                return false;
+            }
+            //澶囦唤璁惧
+            await HdlGatewayLogic.Current.UpLoadDeviceBackupDataToGateway(panel, GatewayBackupEnum.A骞叉帴鐐归鑹茶皟鑺�, colorData);
+            return true;
+        }
+
         #endregion
 
         #region 鈻� 浜害璋冭妭___________________________
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlExperienceAccountLogic.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlExperienceAccountLogic.cs
index d181a06..878d26f 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlExperienceAccountLogic.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlExperienceAccountLogic.cs
@@ -241,6 +241,7 @@
                 list.Add(new AddDevicePra { DeviceType = VirtualDeviceEnum.A姘存蹈浼犳劅鍣�, RoomId = floorKey + "_ChuFang", DeviceCount = 1 });
                 list.Add(new AddDevicePra { DeviceType = VirtualDeviceEnum.A鐑熼浘浼犳劅鍣�, RoomId = floorKey + "_ChuFang", DeviceCount = 1 });
                 list.Add(new AddDevicePra { DeviceType = VirtualDeviceEnum.A鐕冩皵浼犳劅鍣�, RoomId = floorKey + "_ChuFang", DeviceCount = 1 });
+                list.Add(new AddDevicePra { DeviceType = VirtualDeviceEnum.A鍚搁《鐕冩皵浼犳劅鍣�, RoomId = floorKey + "_ChuFang", DeviceCount = 1 });
 
                 //璧板粖
                 list.Add(new AddDevicePra { DeviceType = VirtualDeviceEnum.A4鎸夐敭闈㈡澘, RoomId = floorKey + "_ZouLang", DeviceCount = 1 });
@@ -255,6 +256,9 @@
         {
             //鍏堝埛鏂板鍣�
             LocalDevice.Current.ReFreshByLocal();
+            //椤轰究涔熸暣涓�涓嬬綉鍏�(鏈夊彲鑳藉畠鏄粠瀹炰綋璐﹀彿杞负铏氭嫙鏃�,娌℃湁娓呯┖)
+            HdlGatewayLogic.Current.ReFreshByLocal();
+            HdlGatewayLogic.Current.RefreshAppOldSelectGatewayId();
 
             Type thisType = m_Current.GetType();
             //鑾峰彇闇�瑕佸垱寤虹殑铏氭嫙璁惧鍒楄〃
@@ -580,6 +584,19 @@
                 device.IasDeviceType = 43;
                 //璁剧疆璁惧鐨勫熀鏈俊鎭�
                 this.SetBaseDataToDevice(device, 1300, 1300, "MSG01/M-ZB.10", i_RoomId);
+
+                this.DeviceNumber++;
+            }
+        }
+
+        public void Zigbee鍚搁《鐕冩皵浼犳劅鍣�(int i_DeviceCount, string i_RoomId)
+        {
+            for (int i = 0; i < i_DeviceCount; i++)
+            {
+                var device = new IASZone() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = 1 };
+                device.IasDeviceType = 43;
+                //璁剧疆璁惧鐨勫熀鏈俊鎭�
+                this.SetBaseDataToDevice(device, 1300, 1300, "MGCD01/ZB.10", i_RoomId);
 
                 this.DeviceNumber++;
             }
@@ -933,7 +950,8 @@
             A鏂规偊鍙屽紑鍥涙帶闈㈡澘 = 23,
             A鏂规偊鍥涘紑鍏帶闈㈡澘 = 24,
             A鏂规偊鏂伴闈㈡澘 = 25,
-            A鏂规偊鏂伴灏忔ā鍧� = 26
+            A鏂规偊鏂伴灏忔ā鍧� = 26,
+            A鍚搁《鐕冩皵浼犳劅鍣� = 27,
         }
 
         #endregion
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayReceiveLogic.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayReceiveLogic.cs
index 31b6add..c4d3d74 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayReceiveLogic.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayReceiveLogic.cs
@@ -362,7 +362,7 @@
                                         ((FreshAir)locadevice).currentFanSpeed = attData.AttriButeData;
                                         break;
                                     case 5:
-                                    case 7:
+                                    case 15:
                                         ((FreshAir)locadevice).currentFanMode = attData.AttriButeData;
                                         break;
                                 }
@@ -507,6 +507,8 @@
             if (locadevice != null)
             {
                 ((IASZone)locadevice).iASInfo = ias.iASInfo;
+                //濡傛灉鎺ユ敹鍒颁笂鎶�,鍗宠鏄庤繖涓紶鎰熷櫒鏄湪绾跨殑
+                locadevice.IsOnline = 1;
                 //璁板綍鍥炲鏃堕棿
                 locadevice.LastDateTime = DateTime.Now;
             }
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/BindInfo.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/BindInfo.cs
index 4bc702c..720426a 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/BindInfo.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/BindInfo.cs
@@ -170,6 +170,26 @@
         }
 
         /// <summary>
+        /// 鑾峰彇褰撳墠妤煎眰鍚嶇О
+        /// fllodID:妤煎眰ID
+        /// </summary>
+        /// <returns></returns>
+        public static string GetBindTargetsFloorIdName(string curFllodID)
+        {
+            var dicFloor = HdlRoomLogic.Current.GetFloorSortList();
+            foreach (var floorId in dicFloor.Keys)
+            {
+                //褰撳墠妤煎眰
+                if (curFllodID == floorId)
+                {
+                    return dicFloor[floorId];
+                    break;
+                }
+            }
+            return null;
+        }
+
+        /// <summary>
         ///  妫�娴嬫帶鍒堕潰鏉�(鎸夐敭绫�)鎵�鎷ユ湁鐨勫姛鑳�,鐜版敮鎸佺殑鏈変互涓嬪嚑绉�(蹇呭畾瀛樺湪閿��,鍑洪敊浼氳繑鍥瀗ull)
         /// </summary>
         /// <returns>The panel key function level2.</returns>
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceAddSuccessForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceAddSuccessForm.cs
index cf2a242..cfdf0b0 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceAddSuccessForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceAddSuccessForm.cs
@@ -55,6 +55,8 @@
             this.SetAllEpointName();
             // 璁剧疆缃戝叧鎵�鍦ㄧ殑鏃跺尯鐨勬椂闂寸粰闂ㄩ攣鏃堕棿
             this.SetDoorTime();
+            //鏂板叆缃戠殑璁惧,娓呯┖鎺夊畠鐨勬埧闂�
+            this.ClearDeviceFromRoom();
         }
 
         /// <summary>
@@ -306,6 +308,23 @@
 
         #endregion
 
+        #region 鈻� 涓�鑸柟娉昣__________________________
+
+        /// <summary>
+        /// 鏂板叆缃戠殑璁惧,娓呯┖鎺夊畠鐨勬埧闂�
+        /// </summary>
+        private void ClearDeviceFromRoom()
+        {
+            foreach (var device in this.listNewDevice)
+            {
+                HdlRoomLogic.Current.DeleteDevice(device);
+                HdlRoomLogic.Current.DeleteLoveDevice(device);
+            }
+            Common.LocalDevice.Current.DeleteRealDeviceFromRoom(this.listNewDevice[0]);
+        }
+
+        #endregion
+
         #region 鈻� 鐢婚潰鍏抽棴___________________________
 
         /// <summary>
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceListMainForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceListMainForm.cs
index 4bd8639..4d4c692 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceListMainForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceListMainForm.cs
@@ -348,7 +348,7 @@
             //鍙崇澶�
             rowDevice.frameTable.AddRightArrow();
             //鍦ㄧ嚎鐘舵��
-            rowDevice.isOnline = device.IsOnline == 1;
+            rowDevice.isOnline = Common.LocalDevice.Current.CheckDeviceIsOnline(device);
 
             //淇濆瓨鎺т欢
             string maikey = Common.LocalDevice.Current.GetDeviceMainKeys(device);
@@ -792,7 +792,7 @@
             {
                 if (rowInfo != null)
                 {
-                    rowInfo.MenuRow.isOnline = device.IsOnline == 1;
+                    rowInfo.MenuRow.isOnline = Common.LocalDevice.Current.CheckDeviceIsOnline(device);
                     if (rowInfo.dicDetailRow != null)
                     {
                         foreach (var detailRow in rowInfo.dicDetailRow.Values)
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceSearchForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceSearchForm.cs
index e0ea8f3..c399fee 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceSearchForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceSearchForm.cs
@@ -96,11 +96,13 @@
             this.ClearBodyFrame();
 
             //鍥剧墖
-            var btnPic = new PicViewControl(878, 478);
-            btnPic.Y = Application.GetRealHeight(251);
-            btnPic.Gravity = Gravity.CenterHorizontal;
-            btnPic.UnSelectedImagePath = "Instruct/DeviceSearch.png";
-            bodyFrameLayout.AddChidren(btnPic);
+            var framePic = new FrameLayout();
+            framePic.Width = this.GetPictrueRealSize(878);
+            framePic.Height = this.GetPictrueRealSize(478);
+            framePic.Y = Application.GetRealHeight(251);
+            framePic.Gravity = Gravity.CenterHorizontal;
+            framePic.BackgroundImagePath = "Instruct/DeviceSearch.png";
+            bodyFrameLayout.AddChidren(framePic);
 
             //姝e湪鎼滅储璁惧锛岃绋嶅�欌��
             var btnSearch = new NormalViewControl(bodyFrameLayout.Width, Application.GetRealHeight(58), false);
@@ -150,7 +152,7 @@
                 this.realGateway.GwResDataAction += this.AdjustGatewayResultData;
             }
             //寮�鍚繛鎺ョ殑鍋囨兂鍔ㄧ敾鏁堟灉绾跨▼
-            this.StartConcetionAnimeteThread();
+            this.StartConcetionAnimeteThread(framePic);
         }
 
         #endregion
@@ -312,7 +314,7 @@
         /// <summary>
         /// 寮�鍚繛鎺ョ殑鍋囨兂鍔ㄧ敾鏁堟灉绾跨▼
         /// </summary>
-        private void StartConcetionAnimeteThread()
+        private void StartConcetionAnimeteThread(FrameLayout framePic)
         {
             int iconSize = this.GetPictrueRealSize(23);
 
@@ -320,15 +322,15 @@
             for (int i = 0; i < 9; i++)
             {
                 //X杞�+Index*(鍥炬爣澶у皬+闂磋窛)
-                listPoint.Add(this.GetPictrueRealSize(394) + i * (iconSize + this.GetPictrueRealSize(10)));
+                listPoint.Add(this.GetPictrueRealSize(300) + i * (iconSize + this.GetPictrueRealSize(10)));
             }
 
             var btnRound = new PicViewControl(iconSize, iconSize, false);
             btnRound.Radius = (uint)iconSize / 2;
             btnRound.BackgroundColor = UserCenterColor.Current.ConcetionRoundColor;
             btnRound.X = listPoint[0];
-            btnRound.Y = this.GetPictrueRealSize(475);
-            bodyFrameLayout.AddChidren(btnRound);
+            btnRound.Y = this.GetPictrueRealSize(225);
+            framePic.AddChidren(btnRound);
 
             HdlThreadLogic.Current.RunThread(() =>
             {
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/AddDeviceTypeListForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/AddDeviceTypeListForm.cs
index c8e359d..4e04d79 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/AddDeviceTypeListForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/AddDeviceTypeListForm.cs
@@ -152,6 +152,11 @@
             unSelectPic = "Device/SensorCarbonMonoxide.png";
             this.AddMenuRow(objectText, unSelectPic, "SensorCarbonMonoxideDirectionForm");
 
+            //鍚搁《鐕冩皵浼犳劅鍣�
+            objectText = Language.StringByID(R.MyInternationalizationString.uDeviceDirectionName26);
+            unSelectPic = "Device/SensorCarbonMonoxide.png";
+            this.AddMenuRow(objectText, unSelectPic, "SensorCeilingGasDirectionForm");
+
             //鐑熼浘浼犳劅鍣�
             objectText = Language.StringByID(R.MyInternationalizationString.uDeviceDirectionName20);
             unSelectPic = "Device/SensorFire.png";
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/PanelFangyueFreshAirModulDirectionForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/PanelFangyueFreshAirModulDirectionForm.cs
index 1fb635c..1b86ca9 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/PanelFangyueFreshAirModulDirectionForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/PanelFangyueFreshAirModulDirectionForm.cs
@@ -70,7 +70,7 @@
 
             //闀挎寜鍥剧ず鎸夐敭5绉掍互涓婏紝鎸囩ず鐏彉缁裤�侀棯鐑�
             //杩涘叆閰嶇綉鐘舵�併�傜豢鐏揩闂�3绉掑垯閰嶇綉鎴愬姛
-            string[] msgArry = Language.StringByID(R.MyInternationalizationString.uAddTwoButtonPanelMsg).Split(new string[] { "{0}" }, StringSplitOptions.RemoveEmptyEntries);
+            string[] msgArry = Language.StringByID(R.MyInternationalizationString.AddFreshAirModulPanelMsg).Split(new string[] { "{0}" }, StringSplitOptions.RemoveEmptyEntries);
 
             var msg1 = new NormalViewControl(bodyFrameLayout.Width, Application.GetRealHeight(60), false);
             msg1.Y = Application.GetRealHeight(1037);
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/SensorCeilingGasDirectionForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/SensorCeilingGasDirectionForm.cs
new file mode 100755
index 0000000..8c530e0
--- /dev/null
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/SensorCeilingGasDirectionForm.cs
@@ -0,0 +1,90 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Shared.Phone.UserCenter.DeviceDirection
+{
+    /// <summary>
+    /// 鍚搁《鐕冩皵浼犳劅鍣ㄧ殑娣诲姞姝ラ鐣岄潰
+    /// </summary>
+    public class SensorCeilingGasDirectionForm : DirectionCommonForm
+    {
+        #region 鈻� 鍒濆鍖朹____________________________
+
+        /// <summary>
+        /// 鐢婚潰鏄剧ず(搴曞眰浼氬浐瀹氳皟鐢ㄦ鏂规硶锛屽�熶互瀹屾垚鐢婚潰鍒涘缓)
+        /// </summary>
+        public void ShowForm()
+        {
+            //璁剧疆澶撮儴淇℃伅
+            base.SetTitleText(Language.StringByID(R.MyInternationalizationString.uAddDevice));
+
+            //鍒濆鍖栦腑閮ㄤ俊鎭�
+            this.InitMiddleFrame();
+        }
+
+        /// <summary>
+        /// 鍒濆鍖栦腑閮ㄤ俊鎭�
+        /// </summary>
+        private void InitMiddleFrame()
+        {
+            //鍥剧墖
+            var framePic = new FrameLayout();
+            framePic.Width = this.GetPictrueRealSize(948);
+            framePic.Height = this.GetPictrueRealSize(702);
+            framePic.Gravity = Gravity.CenterHorizontal;
+            framePic.Y = Application.GetRealHeight(138);
+            bodyFrameLayout.AddChidren(framePic);
+            var btnPic = new PicViewControl(framePic.Width, framePic.Height, false);
+            btnPic.UnSelectedImagePath = "Instruct/SensorCeilingGas.png";
+            framePic.AddChidren(btnPic);
+
+            //缁胯壊鎸囩ず鐏揩閫熼棯鐑�
+            var btnGreanLinght = new NormalViewControl(this.GetPictrueRealSize(501), this.GetPictrueRealSize(45), false);
+            btnGreanLinght.X = this.GetPictrueRealSize(447);
+            btnGreanLinght.Y = this.GetPictrueRealSize(326);
+            btnGreanLinght.TextAlignment = TextAlignment.Center;
+            btnGreanLinght.TextColor = UserCenterColor.Current.TextGrayColor3;
+            btnGreanLinght.TextSize = 10;
+            btnGreanLinght.TextID = R.MyInternationalizationString.uGreanPilotLampLinghtQuickly;
+            framePic.AddChidren(btnGreanLinght);
+
+            //闀挎寜5绉�
+            //(鎸夐敭)
+            string textMsg = Language.StringByID(R.MyInternationalizationString.uLongClickPanelSomeSecond);
+            if (textMsg.Contains("{0}") == true)
+            {
+                textMsg = string.Format(textMsg, "5");
+            }
+            var btnSecond2 = new NormalViewControl(this.GetPictrueRealSize(463), this.GetPictrueRealSize(45), false);
+            btnSecond2.Y = this.GetPictrueRealSize(222);
+            btnSecond2.TextColor = UserCenterColor.Current.TextGrayColor3;
+            btnSecond2.TextSize = 10;
+            btnSecond2.TextAlignment = TextAlignment.Center;
+            btnSecond2.Text = textMsg;
+            framePic.AddChidren(btnSecond2);
+
+            //闀挎寜鍥剧ず鎸夐敭5绉掍互涓婏紝缁胯壊蹇棯
+            //杩涘叆閰嶇綉鐘舵�侊紝缁跨伅甯镐寒鍒欏叆缃戞垚鍔�
+            string[] msgArry = Language.StringByID(R.MyInternationalizationString.uAddSensorCeilingGasMsg).Split(new string[] { "{0}" }, StringSplitOptions.RemoveEmptyEntries);
+
+            var msg1 = new NormalViewControl(bodyFrameLayout.Width, Application.GetRealHeight(60), false);
+            msg1.Y = Application.GetRealHeight(1037);
+            msg1.Text = msgArry[0];
+            msg1.TextColor = UserCenterColor.Current.TextGrayColor3;
+            msg1.TextAlignment = TextAlignment.Center;
+            bodyFrameLayout.AddChidren(msg1);
+            var msg2 = new NormalViewControl(bodyFrameLayout.Width, Application.GetRealHeight(60), false);
+            msg2.Y = msg1.Bottom;
+            if (msgArry.Length > 1)
+            {
+                msg2.Text = msgArry[1];
+            }
+            msg2.TextColor = UserCenterColor.Current.TextGrayColor3;
+            msg2.TextAlignment = TextAlignment.Center;
+            bodyFrameLayout.AddChidren(msg2);
+        }
+
+        #endregion
+    }
+}
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueFreshAirBackLightSettionForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueFreshAirBackLightSettionForm.cs
index 7e3c14c..248ffea 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueFreshAirBackLightSettionForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueFreshAirBackLightSettionForm.cs
@@ -78,8 +78,9 @@
 
                 //娣诲姞灞忓箷浜害绾у埆鎺т欢
                 this.AddScreenBrightnesLevelControl();
+
                 //娣诲姞鑳屽厜鐏寒搴︽帶浠躲�愭殏鏃朵笉闇�瑕侊紝鍙兘鍚庢湡鏂伴闈㈡澘鐨勮繖涓鑹茶琛ュ洖鏉ャ��
-                //this.AddBackLightControl();
+                this.AddBackLightControl();
                 //銆愭殏鏃朵笉闇�瑕侊紝鍙兘鍚庢湡鏂伴闈㈡澘鐨勮繖涓鑹茶琛ュ洖鏉ャ��
                 //this.FinishInitControl(listview, energyModeInfo.enable);
 
@@ -256,10 +257,10 @@
         }
         #endregion
 
-        #region 鈻� 鑳屽厜鐏寒搴________________________
+        #region 鈻� 鑳屽厜棰滆壊_________________________
 
         /// <summary>
-        /// 娣诲姞鑳屽厜鐏寒搴︽帶浠�
+        /// 娣诲姞鑳屽厜棰滆壊鎺т欢
         /// </summary>
         private void AddBackLightControl()
         {
@@ -270,69 +271,28 @@
             //鑳屾櫙
             var frameBack = new FrameLayout();
             frameBack.Y = Application.GetRealHeight(490);
-            frameBack.Height = Application.GetRealHeight(429);
+            frameBack.Height = Application.GetRealHeight(170);
             frameBack.BackgroundColor = UserCenterColor.Current.White;
             listview.AddChidren(frameBack);
 
-            //鑳屽厜鐏寒搴�
+            //鑳屽厜鐏鑹�
             var btnLevelView = new NormalViewControl(400, 60, true);
             btnLevelView.X = ControlCommonResourse.XXLeft;
             btnLevelView.Y = Application.GetRealHeight(54);
-            btnLevelView.TextID = R.MyInternationalizationString.uBacklightBrightness;
+            btnLevelView.Gravity = Gravity.CenterVertical;
+            btnLevelView.TextID = R.MyInternationalizationString.BackgroundLightColor;
             frameBack.AddChidren(btnLevelView);
-
-            //褰撳墠浜害
-            var btnProgressView1 = new NormalViewControl(200, 50, true);
-            btnProgressView1.X = ControlCommonResourse.XXLeft;
-            btnProgressView1.Y = Application.GetRealHeight(157);
-            btnProgressView1.TextSize = 12;
-            btnProgressView1.TextColor = UserCenterColor.Current.TextGrayColor1;
-            btnProgressView1.TextID = R.MyInternationalizationString.uNowLuminance;
-            frameBack.AddChidren(btnProgressView1);
-            var btnProgress1 = new NormalViewControl(200, 50, true);
-            btnProgress1.X = Application.GetRealWidth(222);
-            btnProgress1.Y = Application.GetRealHeight(157);
-            btnProgress1.TextSize = 12;
-            btnProgress1.TextColor = UserCenterColor.Current.TextGrayColor1;
-            btnProgress1.Text = "70%";
-            frameBack.AddChidren(btnProgress1);
-
-            //杩涘害鏉�
-            var seekBar1 = new SeekBarControl();
-            seekBar1.Y = Application.GetRealHeight(253);
-            frameBack.AddChidren(seekBar1);
-            seekBar1.ProgressChangedEvent += (div, value) =>
-            {
-                btnProgress1.Text = value + "%";
-            };
-            //seekBar1.Progress = linghtLevelInfo.panelBacklightLevel;
-
-            var btnTemp1 = new NormalViewControl(200, 50, true);
-            btnTemp1.X = ControlCommonResourse.XXLeft;
-            btnTemp1.Y = Application.GetRealHeight(322);
-            btnTemp1.TextSize = 12;
-            btnTemp1.TextColor = UserCenterColor.Current.TextGrayColor3;
-            btnTemp1.Text = "0%";
-            frameBack.AddChidren(btnTemp1);
-
-            var btnTemp2 = new NormalViewControl(200, 50, true);
-            btnTemp2.X = frameBack.Width - ControlCommonResourse.XXLeft - Application.GetRealWidth(200);
-            btnTemp2.Y = Application.GetRealHeight(322);
-            btnTemp2.TextAlignment = TextAlignment.CenterRight;
-            btnTemp2.TextSize = 12;
-            btnTemp2.TextColor = UserCenterColor.Current.TextGrayColor3;
-            btnTemp2.Text = "100%";
-            frameBack.AddChidren(btnTemp2);
 
             var frameColor = new FrameLayoutStatuControl();
             frameColor.UseClickStatu = false;
             frameColor.Width = Application.GetRealHeight(262);
             frameColor.Height = this.GetPictrueRealSize(79);
-            frameColor.Y = Application.GetRealHeight(26);
+            frameColor.Gravity = Gravity.CenterVertical;
             frameColor.X = frameBack.Width - ControlCommonResourse.XXLeft - Application.GetRealHeight(262);
             frameBack.AddChidren(frameColor);
+
             //棰滆壊
-            var btnColorView = new NormalViewControl(Application.GetRealHeight(110), this.GetPictrueRealSize(50), false);
+            var btnColorView = new NormalViewControl(Application.GetRealHeight(110), this.GetPictrueRealSize(49), false);
             btnColorView.Gravity = Gravity.CenterVertical;
             btnColorView.TextAlignment = TextAlignment.CenterRight;
             btnColorView.TextSize = 12;
@@ -341,28 +301,26 @@
             btnColorView.TextID = R.MyInternationalizationString.uColor;
             frameColor.AddChidren(btnColorView, ChidrenBindMode.BindEventOnly);
 
-            int R1 = Convert.ToInt32("d8", 16);
-            int G1 = Convert.ToInt32("95", 16);
-            int B1 = Convert.ToInt32("e3", 16);
+            int R1 = Convert.ToInt32(this.keyColorData.OpenColorR, 16);
+            int G1 = Convert.ToInt32(this.keyColorData.OpenColorG, 16);
+            int B1 = Convert.ToInt32(this.keyColorData.OpenColorB, 16);
             uint backColor = this.GetColorByRGB((byte)R1, (byte)G1, (byte)B1);
 
-            //棰滆壊澶栨
-            var btnColorLine = new NormalViewControl(this.GetPictrueRealSize(79), this.GetPictrueRealSize(79), false);
+            //棰滆壊澶栨 
+            var btnColorLine = new FrameLayoutStatuControl();
+            btnColorLine.Width = Application.GetRealHeight(79);
+            btnColorLine.Height = this.GetPictrueRealSize(79);
             btnColorLine.X = btnColorView.Right + Application.GetRealHeight(18);
             btnColorLine.Radius = (uint)this.GetPictrueRealSize(79) / 2;
             btnColorLine.BorderWidth = 1;
-            btnColorLine.BorderColor = 0xff666666;
+            btnColorLine.BorderColor = 0xffcccccc;
             frameColor.AddChidren(btnColorLine, ChidrenBindMode.BindEventOnly);
 
             var btnColor = new NormalViewControl(this.GetPictrueRealSize(69), this.GetPictrueRealSize(69), false);
-            btnColor.Y = Application.GetRealHeight(5);
-            btnColor.X = btnColorView.Right + Application.GetRealHeight(23);
+            btnColor.Gravity = Gravity.Center;
             btnColor.Radius = (uint)this.GetPictrueRealSize(69) / 2;
-            btnColor.BackgroundColor = UserCenterColor.Current.ErrorColor;
-            frameColor.AddChidren(btnColor, ChidrenBindMode.BindEventOnly);
-
-            //鍙樻洿婊戝姩鏉$殑棰滆壊
-            seekBar1.ProgressBarColor = backColor;
+            btnColor.BackgroundColor = backColor;
+            btnColorLine.AddChidren(btnColor, ChidrenBindMode.BindEventOnly);
 
             var btnRight = new NormalViewControl(this.GetPictrueRealSize(58), this.GetPictrueRealSize(58), false);
             btnRight.UnSelectedImagePath = "Item/RightNext.png";
@@ -381,13 +339,11 @@
                     G1 = Gcolor;
                     B1 = Bcolor;
 
-                    //this.keyColorData.CloseColorR = Convert.ToString(Rcolor, 16);
-                    //this.keyColorData.CloseColorG = Convert.ToString(Gcolor, 16);
-                    //this.keyColorData.CloseColorB = Convert.ToString(Bcolor, 16);
+                    this.keyColorData.OpenColorR = Convert.ToString(Rcolor, 16);
+                    this.keyColorData.OpenColorG = Convert.ToString(Gcolor, 16);
+                    this.keyColorData.OpenColorB = Convert.ToString(Bcolor, 16);
 
                     btnColor.BackgroundColor = this.GetColorByRGB((byte)Rcolor, (byte)Gcolor, (byte)Bcolor);
-                    //鍙樻洿婊戝姩鏉$殑棰滆壊
-                    seekBar1.ProgressBarColor = btnColor.BackgroundColor;
                 };
             };
         }
@@ -607,17 +563,16 @@
                 return;
             }
 
-            //璁剧疆鎸夐敭闈㈡澘鎸囧畾绔偣鐨勩�愭寚绀虹伅寮�鍏抽鑹层�戠殑淇℃伅
-            //result = await HdlDevicePanelLogic.Current.SetPanelEpointColorInfo(panelDevice, this.keyColorData);
-            //this.CloseProgressBar();
-            //if (result == false)
-            //{
-            //    return;
-            //}
+            //璁剧疆鎸夐敭闈㈡澘棰滆壊鐨勪俊鎭�
+            result = await HdlDevicePanelLogic.Current.SetPanelColorInfo(panelDevice, this.keyColorData);
+            this.CloseProgressBar();
+            if (result == false)
+            {
+                return;
+            }
             //鍏抽棴鑷韩
             this.CloseForm();
         }
-
         #endregion
 
         #region 鈻� 琛ュ厖瀹瑰櫒___________________________ 
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/DoorLockCommonInfo.cs b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/DoorLockCommonInfo.cs
index bb30fa1..7a4303f 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/DoorLockCommonInfo.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/DoorLockCommonInfo.cs
@@ -11,6 +11,10 @@
     {
         #region  鏈湴鍙橀噺
         /// <summary>
+        /// 鏇存柊鈥滈�昏緫甯稿紑鈥濈晫闈㈢殑鍥炶皟
+        /// </summary>
+        public static Action<bool> LogicAction = null;
+        /// <summary>
         /// 缃戝叧锛堥棬閿侊級鎵�鍦ㄧ殑鏃堕棿
         /// </summary>
         public static DateTime DoorlockZoneTime = DateTime.Now;
@@ -146,14 +150,11 @@
         /// </summary>
         public static void NormallyOpenModeValue(ZigBee.Device.DoorLock doorLock, bool value)
         {
-            string key = doorLock.DeviceAddr + "_" + doorLock.DeviceEpoint;
-            if (doorLock.IsDoorLockNormallyMode.ContainsKey(key))
+            doorLock.IsDoorLockNormallyMode = value;
+
+            if (LogicAction != null)
             {
-                doorLock.IsDoorLockNormallyMode[key] = value;
-            }
-            else
-            {
-                doorLock.IsDoorLockNormallyMode.Add(key, value);
+                LogicAction(value);
             }
         }
 
@@ -210,17 +211,9 @@
                 {
                     //涓婃姤鈥滃父寮�妯″紡鈥濆凡琚彇娑�
                     Application.RunOnMainThread(() => { CommonPage.Loading.Start(""); });
-                    //鍏堝垹闄ゅ凡澶辨晥鐨勨�滃父寮�妯″紡鈥濈殑閫昏緫 
-                    //if (resTemp == 1)
-                    //{
-                    //    var restulTemp = await Shared.Phone.Device.Logic.SkipView.Exist(3);
-                    //    //if (restulTemp == 3)
-                    //    //{
-                    //    //    string msg0 = Language.StringByID(R.MyInternationalizationString.CancelLogicNormallyModeFailed2);
-                    //    //    this.ShowTipMsg(msg0);
-                    //    //    return;
-                    //    //}
-                    //}
+
+                    //娓╁眳鍩庢柟娉曪紵锛燂紵
+                    //姝ゅ鏄惁瑕佸垹闄ゆ俯灞呭煄鐨勭壒娈婇�昏緫
 
                     //app閲嶆柊寮�鍚�滃父寮�妯″紡鈥�
                     var result = await doorLock.SetNormallyOpenModeFuncAsync(true);
@@ -232,7 +225,6 @@
                             ShowTipMsg(msg0);
                             NormallyOpenModeValue(doorLock, false);
                             CommonPage.Loading.Hide();
-                            //new Tip() { MaxWidth = 150, Text = msg0, Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(CommonPage.Instance);
                         });
                         action?.Invoke();
                         return;
@@ -245,7 +237,6 @@
                             ShowTipMsg(msg1);
                             NormallyOpenModeValue(doorLock, false);
                             CommonPage.Loading.Hide();
-                            //new Tip() { MaxWidth = 150, Text = msg1, Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(CommonPage.Instance);
                         });
                         action?.Invoke();
                         return;
@@ -260,7 +251,6 @@
                             ShowTipMsg(msg0);
                             NormallyOpenModeValue(doorLock, true);
                             CommonPage.Loading.Hide();
-                            //new Tip() { MaxWidth = 150, Text = msg0, Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(CommonPage.Instance);
                         });
                     }
                 }
@@ -279,12 +269,8 @@
                     NormallyOpenModeValue(doorLock, false);
                     if (haveLogic)
                     {
-                        var resTemp2 = await Shared.Phone.Device.Logic.SkipView.Exist(3);
-                        //if (resTemp2 == 3)
-                        //{
-                        //    string msg0 = Language.StringByID(R.MyInternationalizationString.CancelLogicNormallyModeFailed);
-                        //    this.ShowTipMsg(msg0);
-                        //}
+                        //娓╁眳鍩庢柟娉曪紵锛燂紵
+                        //姝ゅ鏄惁瑕佸垹闄ゆ俯灞呭煄鐨勭壒娈婇�昏緫
                     }
                 }
                 else
@@ -298,7 +284,6 @@
                         {
                             ShowTipMsg(Language.StringByID(R.MyInternationalizationString.GwResponseOvertime));
                             CommonPage.Loading.Hide();
-                            //new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.GwResponseOvertime), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(CommonPage.Instance);
                         });
                         action?.Invoke();
                         return;
@@ -310,7 +295,6 @@
                             string msg1 = Language.StringByID(R.MyInternationalizationString.CloseNormallyOpenModeFailed);
                             ShowTipMsg(msg1);
                             CommonPage.Loading.Hide();
-                            //new Tip() { MaxWidth = 150, Text = msg1, Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(CommonPage.Instance);
                         });
                         action?.Invoke();
                         return;
@@ -325,22 +309,8 @@
                         if (haveLogic)
                         {
                             var resTemp1 = await Shared.Phone.Device.Logic.SkipView.Exist(3);
-                            //鍥犱负鐩墠鏈哄埗闂锛岄�昏緫缁忓父澶辫触锛屾墍浠ヤ笉鎻愮ず锛屽悗鏈熸満鍒惰鏀癸紝閲嶆柊鍋氫竴涓繖涓晫闈�
-                            //if (resTemp1 == 3)
-                            //{ 
-                            //Application.RunOnMainThread(() =>
-                            //{
-                            //        string msg0 = Language.StringByID(R.MyInternationalizationString.CancelLogicNormallyModeFailed);
-                            //        ShowTipMsg(msg0);
-                            //}); 
-                            //}
-                            //else if (resTemp1 == 2)
-                            //{
-                            //Application.RunOnMainThread(() =>
-                            //{
-                            //    string msg0 = Language.StringByID(R.MyInternationalizationString.CloseNormallyOpenModeSuccess);
-                            //    ShowTipMsg(msg0);
-                            //}); 
+                            //娓╁眳鍩庢柟娉曪紵锛燂紵
+                            //姝ゅ鏄惁瑕佸垹闄ゆ俯灞呭煄鐨勭壒娈婇�昏緫 
                         }
                         Application.RunOnMainThread(() =>
                         {
@@ -354,32 +324,57 @@
             };
         }
 
-        /// <summary>
-        /// 鍒犻櫎甯稿紑妯″紡
-        /// </summary>
-        /// <param name="doorLock">褰撳墠闂ㄩ攣</param>
-        /// <param name="action">鍥炶皟澶勭悊鏇存柊鍐呭</param>
-        /// <returns></returns>
-        public static async System.Threading.Tasks.Task<bool> DelNormallyOpenMode(ZigBee.Device.DoorLock doorLock, Action action = null)
-        {
-            //app鎿嶄綔鍙栨秷鈥滃父寮�妯″紡鈥� 
-            var result = await doorLock.SetNormallyOpenModeFuncAsync(false);
-            if (result == null || result.defaultControlResponseData == null || result.defaultControlResponseData.status != 0)
-            {
-                action?.Invoke();
-                return false;
-            }
-
-            if (result.defaultControlResponseData.status == 0)
-            {
-                //app纭鍙栨秷鈥滃父寮�妯″紡鈥濇垚鍔� 
-                NormallyOpenModeValue(doorLock, false);
-                action?.Invoke();
-                return true;
-            }
-            return false;
+    
+/// <summary>
+        /// 鍒犻櫎甯稿紑妯″紡
+        /// </summary>
+        /// <param name="doorLock">褰撳墠闂ㄩ攣</param>
+        /// <param name="action">鍥炶皟澶勭悊鏇存柊鍐呭</param>
+        /// <returns></returns>
+        public static async System.Threading.Tasks.Task<bool> DelNormallyOpenMode(ZigBee.Device.DoorLock doorLock, Action action = null)
+        {
+            //app鎿嶄綔鍙栨秷鈥滃父寮�妯″紡鈥� 
+            var result = await doorLock.SetNormallyOpenModeFuncAsync(false);
+            if (result == null || result.defaultControlResponseData == null || result.defaultControlResponseData.status != 0)
+            {
+                action?.Invoke();
+                return false;
+            }
+
+            if (result.defaultControlResponseData.status == 0)
+            {
+                //app纭鍙栨秷鈥滃父寮�妯″紡鈥濇垚鍔� 
+                NormallyOpenModeValue(doorLock, false);
+                action?.Invoke();
+                return true;
+            }
+            return false;
+        }
+
+      
+         /// <summary>
+        /// 璁剧疆甯稿紑妯″紡
+        /// </summary>
+        /// <param name="doorLock">褰撳墠闂ㄩ攣</param>
+        /// <param name="action">鍥炶皟澶勭悊鏇存柊鍐呭</param>
+        /// <returns></returns>
+        public static async System.Threading.Tasks.Task<bool> SetNormallyOpenModeFuncAsync(ZigBee.Device.DoorLock doorLock)
+        {
+            //app璁剧疆鈥滃父寮�妯″紡鈥濆け璐� 
+            var result = await doorLock.SetNormallyOpenModeFuncAsync(false);
+            if (result == null || result.defaultControlResponseData == null || result.defaultControlResponseData.status != 0)
+            {
+                return false;
+            }
+
+            if (result.defaultControlResponseData.status == 0)
+            {
+                //app璁剧疆鈥滃父寮�妯″紡鈥濇垚鍔�  
+                NormallyOpenModeValue(doorLock, false);
+                return true;
+            }
+            return false;
         }
-
         /// <summary>
         /// 鍚姩甯稿紑妯″紡銆愬脊绐椼��
         /// </summary>
@@ -406,6 +401,27 @@
 
             alert.ConfirmClickEvent += async () =>
             {
+                NomallyOpenModeInvalidTimeDialog(doorLock, action);
+            };
+        }
+
+        /// <summary>
+        /// 甯稿紑妯″紡澶辨晥鏃堕棿澶勭悊銆愬脊绐椼��
+        /// </summary>
+        public static async void NomallyOpenModeInvalidTimeDialog(ZigBee.Device.DoorLock doorLock, Action action)
+        {
+            //澶辨晥璁剧疆 
+            string msgTimeInValidSetting = Language.StringByID(R.MyInternationalizationString.DoorLockOpenAllTheTime);
+            var timeConfrim = Language.StringByID(R.MyInternationalizationString.Confrim);
+            var alertTimeInValidSetting = new ShowDoorLockMsgControl(ShowDoorLockMsgControl.DoorLockMsgType.InValid, msgTimeInValidSetting, timeConfrim);
+            alertTimeInValidSetting.Show();
+
+            alertTimeInValidSetting.InvalidTimeAction += async (obj) =>
+            {
+                //甯稿紑妯″紡澶辨晥鏃堕棿璁剧疆鎴愬姛
+                var temp = int.Parse(obj);
+                DoorLockCommonInfo.NormallyOpenModeInvalidTime = temp;
+
                 Application.RunOnMainThread(() => { CommonPage.Loading.Start(""); });
                 var result = await doorLock.SetNormallyOpenModeFuncAsync(true);
                 if (result == null || result.defaultControlResponseData == null)
@@ -436,43 +452,12 @@
                     action?.Invoke();
                     Application.RunOnMainThread(() =>
                     {
-                        NomallyOpenModeInvalidTimeDialog(doorLock);
                         CommonPage.Loading.Hide();
                     });
                 }
-            };
-        }
 
-        /// <summary>
-        /// 甯稿紑妯″紡澶辨晥鏃堕棿澶勭悊銆愬脊绐椼��
-        /// </summary>
-        public static async void NomallyOpenModeInvalidTimeDialog(ZigBee.Device.DoorLock doorLock)
-        {
-            //澶辨晥璁剧疆 
-            string msgTimeInValidSetting = Language.StringByID(R.MyInternationalizationString.DoorLockOpenAllTheTime);
-            var timeConfrim = Language.StringByID(R.MyInternationalizationString.Confrim);
-            var alertTimeInValidSetting = new ShowDoorLockMsgControl(ShowDoorLockMsgControl.DoorLockMsgType.InValid, msgTimeInValidSetting, timeConfrim);
-            alertTimeInValidSetting.Show();
-
-            alertTimeInValidSetting.InvalidTimeAction += async (obj) =>
-            {
-                //甯稿紑妯″紡澶辨晥鏃堕棿璁剧疆鎴愬姛
-                var temp = int.Parse(obj);
-                DoorLockCommonInfo.NormallyOpenModeInvalidTime = temp;
-                //榛樿鍒涘缓甯稿紑妯″紡鐨勭壒娈婇�昏緫 
-                var res = await Shared.Phone.Device.Logic.SkipView.LockAddModifyLogic(DoorLockCommonInfo.NormallyOpenModeInvalidTime, doorLock);
-                if (!res)
-                {
-                    Application.RunOnMainThread(() =>
-                    {
-                        //榛樿鍒涘缓甯稿紑妯″紡澶辫触
-                        string msg0 = Language.StringByID(R.MyInternationalizationString.AddLogicNormallyModeFailed);
-                        var alert = new UserCenter.ShowMsgControl(UserCenter.ShowMsgType.Normal, msg0, Language.StringByID(R.MyInternationalizationString.confrim));
-                        alert.Show();
-                        //浜屾鍔犺浇寮圭獥 甯稿紑妯″紡寮�鍚彁绀�
-                        NomallyOpenModeInvalidTimeDialog(doorLock);
-                    });
-                }
+                //娓╁眳鍩庢柟娉曪紵锛燂紵
+                //姝ゅ鏄惁瑕佸垱寤哄父寮�妯″紡鐨勭壒娈婇�昏緫
             };
         }
         #endregion
@@ -1237,7 +1222,6 @@
             });
         }
 
-        #endregion
-
+        #endregion 
     }
 }
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/MasterManagementPage.cs b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/MasterManagementPage.cs
index e31c7df..9a3861b 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/MasterManagementPage.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/MasterManagementPage.cs
@@ -133,8 +133,8 @@
                     }
                     else
                     {
-                        ///澶囨敞锛歐JC鐨�
-                        ///璁板綍褰撳墠鐢ㄦ埛淇℃伅
+                        ///璁板綍褰撳墠鐢ㄦ埛淇℃伅H06C
+                        ///wjc
                         Shared.Phone.Device.Logic.SkipView.SkipAddLogic(1, doorLock, accountObj);
 
                     }
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/ShowDoorLockMsgControl.cs b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/ShowDoorLockMsgControl.cs
index ea5123d..3ac8d1e 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/ShowDoorLockMsgControl.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/ShowDoorLockMsgControl.cs
@@ -112,6 +112,11 @@
             ((ViewGroup)nowForm).AddChidren(MsgControlFrameLayout);
             MsgControlFrameLayout.MouseDownEventHandler += (sender, e) =>
             {
+                if (msgType == DoorLockMsgType.InValid)
+                {
+                    return;
+                }
+
                 //绉婚櫎鐣岄潰
                 MsgControlFrameLayout.RemoveFromParent();
                 //鍥炶皟鍑芥暟
@@ -179,10 +184,15 @@
                 btnMsg.Text = msgText;
             }
 
-            if (msgType == DoorLockMsgType.Confirm || msgType == DoorLockMsgType.InValid || msgType == DoorLockMsgType.NomallyOpenMode || msgType == DoorLockMsgType.CancelNomallyOpenModeWithLogic)
+            if (msgType == DoorLockMsgType.Confirm || msgType == DoorLockMsgType.NomallyOpenMode || msgType == DoorLockMsgType.CancelNomallyOpenModeWithLogic)
             {
                 //鍒濆鍖栫‘璁ょ被鍨嬬殑搴曢儴鎸夐挳
                 this.InitBottomConfirmButton(MsgControlFrameLayout, frameBack);
+            }
+            else if (msgType == DoorLockMsgType.InValid)
+            {
+                //澶辨晥璁剧疆鐨勫簳閮ㄦ寜閽�
+                this.InitBottomInvalidTimeButton(MsgControlFrameLayout, frameBack);
             }
             else if (msgType == DoorLockMsgType.DoorLockLogic)
             {
@@ -336,6 +346,46 @@
         }
 
         /// <summary>
+        /// 澶辨晥鏃堕棿鐨勫簳閮ㄦ寜閽�
+        /// </summary>
+        /// <param name="frameMain"></param>
+        /// <param name="frameBack"></param>
+        private void InitBottomInvalidTimeButton(FrameLayout frameMain, FrameLayout frameBack)
+        {
+            //纭畾鎸夐挳
+            var btnConfirm = new BottomRightClickButton(frameBack.Width, Application.GetRealHeight(127));
+            frameBack.AddChidren(btnConfirm);
+            btnConfirm.InitControl(buttonOkText);
+            btnConfirm.ButtonClickEvent += (sender, e) =>
+            {
+                string textValue = string.Empty;
+                if (editInvalidTime != null)
+                {
+                    textValue = editInvalidTime.Text.Trim();
+                    if (this.CheckInvalidTime(textValue.TrimStart('0')) == false)
+                    {
+                        return;
+                    }
+                }
+                //绉婚櫎鐣岄潰
+                frameMain.RemoveFromParent();
+                if (msgType == DoorLockMsgType.InValid)
+                {
+                    if (InvalidTimeAction != null)
+                    {
+                        InvalidTimeAction(textValue);
+                    }
+                }
+                else
+                {
+                    //鍥炶皟鍑芥暟
+                    this.ConfirmClickEvent?.Invoke();
+                    this.ConfirmClickEvent = null;
+                }
+            };
+        }
+
+        /// <summary>
         /// 鍒濆鍖栫‘璁ょ被鍨嬬殑搴曢儴鎸夐挳
         /// </summary>
         /// <param name="frameMain"></param>
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/UserDoorLockPage.cs b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/UserDoorLockPage.cs
index 6b5ed4f..37601a4 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/UserDoorLockPage.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/UserDoorLockPage.cs
@@ -218,7 +218,7 @@
 
             ClickHandle();
 
-            if (doorLock.IsOnline == 1)
+            if (Common.LocalDevice.Current.CheckDeviceIsOnline(doorLock) == true)
             {
                 ReadDoorLockUserInfo();
             }
@@ -605,15 +605,11 @@
                         {
                             return;
                         }
-                        string key = doorLock.DeviceAddr + "_" + doorLock.DeviceEpoint;
-                        if (doorLock.IsDoorLockNormallyMode.ContainsKey(key))
+                        if (doorLock.IsDoorLockNormallyMode)
                         {
-                            if (doorLock.IsDoorLockNormallyMode[key] == true)
-                            {
-                                if (canOpenNormallyMode)
-                                {
-                                    Application.RunOnMainThread(() => { NomallyOpenModeInvalidDialog(true); });
-                                }
+                            if (canOpenNormallyMode)
+                            {
+                                Application.RunOnMainThread(() => { NomallyOpenModeInvalidDialog(true); });
                             }
                         }
                     }
@@ -849,20 +845,11 @@
             //寮�閿佷簨浠�
             EventHandler<MouseEventArgs> hander1 = async (sender, e) =>
             {
-
-                string key = doorLock.DeviceAddr + "_" + doorLock.DeviceEpoint;
-                if (doorLock.IsDoorLockNormallyMode.ContainsKey(key))
+                if (doorLock.IsDoorLockNormallyMode)
                 {
-                    if (doorLock.IsDoorLockNormallyMode[key] == true)
-                    {
-                        if (canOpenNormallyMode)
-                        {
-                            NomallyOpenModeInvalidDialog(false);
-                        }
-                        else
-                        {
-                            OpenDoorLockHandle(progressButton, btnDoorLockPic, btnStatus);
-                        }
+                    if (canOpenNormallyMode)
+                    {
+                        NomallyOpenModeInvalidDialog(false);
                     }
                     else
                     {
@@ -886,13 +873,9 @@
             {
                 if (canOpenNormallyMode)
                 {
-                    var key = doorLock.DeviceAddr + "_" + doorLock.DeviceEpoint;
-                    if (doorLock.IsDoorLockNormallyMode.ContainsKey(key))
+                    if (doorLock.IsDoorLockNormallyMode)
                     {
-                        if (doorLock.IsDoorLockNormallyMode[key] == true)
-                        {
-                            NomallyOpenModeInvalidDialog();
-                        }
+                        NomallyOpenModeInvalidDialog();
                     }
                 }
                 else
@@ -1054,93 +1037,37 @@
             //    return;
             //}
 
-            //action = () =>
-            //{
-            //    //绯荤粺瀵嗙爜鏀寔鎿嶄綔闂ㄩ攣鍚庯紝璋冪敤娓╁眳鍩庣殑鐣岄潰銆愬父寮�鑷姩鍖栥��
-            //    var functionSetting = new Shared.Phone.UserCenter.DoorLock.FunctionSetting(currentRoom, doorLock);
-            //    Shared.Phone.UserView.HomePage.Instance.AddChidren(functionSetting);
-            //    Shared.Phone.UserView.HomePage.Instance.PageIndex += 1;
-            //    functionSetting.Show();
-            //    functionSetting.aaaAction = () =>
-            //   {
-            //       UpdateNomallyOpenStatus();
-            //   };
-            //};
-            //HdlCheckLogic.Current.CheckSecondarySecurity(action);
-            #endregion 
-
-            #region 鏆傛椂鐗堟湰 (鏈�缁堝幓鎺夛級
-            if (!btnNormallyOpen.IsSelected)
+            action = () =>
             {
-                if (UserCenterResourse.UserInfo.AuthorityNo != 1)
-                {
-                    this.ShowMassage(ShowMsgType.Tip, Language.StringByID(R.MyInternationalizationString.OnlyMasterOperate));
-                    return;
-                }
-
-                if (!UserCenterResourse.AccountOption.DoorUnLockByRemote)
-                {
-                    SystemSecondAuthentication();
-                    return;
-                }
-
-                action = () =>
-                {
-                    //绯荤粺瀵嗙爜鏀寔鎿嶄綔闂ㄩ攣鍚庯紝璋冪敤闂俯灞呭煄鐨勭晫闈€�愬父寮�鑷姩鍖栥��
-                    //Action nomallyOpenModeStartAction = () =>
-                    //{
-                    //    UpdateNomallyOpenStatus();
-                    //};
-
-                    string msg = Language.StringByID(R.MyInternationalizationString.SetDoorLockNomallyOpen).Replace("{0}", "\r\n");
-                    var confirm = Language.StringByID(R.MyInternationalizationString.Confrim);
-                    var alert = new ShowDoorLockMsgControl(ShowDoorLockMsgControl.DoorLockMsgType.Confirm, msg, confirm);
-                    alert.Show();
-
-                    alert.ConfirmClickEvent += async () =>
-                    {
-                        Application.RunOnMainThread(() => { CommonPage.Loading.Start(""); });
-                        var result = await doorLock.SetNormallyOpenModeFuncAsync(true);
-                        if (result == null || result.defaultControlResponseData == null)
-                        {
-                            string msg0 = Language.StringByID(R.MyInternationalizationString.GwResponseOvertime);
-                            this.ShowTipMsg(msg0);
-                            return;
-                        }
-                        if (result.defaultControlResponseData.status != 0)
-                        {
-                            string msg1 = Language.StringByID(R.MyInternationalizationString.OpenNormallyOpenModeFailed);
-                            this.ShowTipMsg(msg1);
-                            return;
-                        }
-                        else
-                        {
-                            //娣诲姞App寮�鍚父寮�妯″紡鐨勫巻鍙茶褰�
-                            HdlDeviceDoorLockLogic.Current.AddDoorHistoryLog(this.doorLock, 9001, string.Empty);
-
-                            //姣忔閲嶆柊璁剧疆甯稿紑锛岄粯璁ゆ椂闂撮兘鏄�12灏忔椂
-                            DoorLockCommonInfo.NormallyOpenModeInvalidTime = 12;
-                            DoorLockCommonInfo.NormallyOpenModeValue(doorLock, true);
-                            Application.RunOnMainThread(() =>
-                            {
-                                UpdateNomallyOpenStatus();
-                                CommonPage.Loading.Hide();
-                            });
-
-                            //甯稿紑妯″紡寮�鍚彁绀�
-                            AlreadyOpenNormallyMode();
-                        }
-                    };
-
-                };
-                HdlCheckLogic.Current.CheckSecondarySecurity(action);
-            }
-            else
-            {
-                NomallyOpenModeInvalidDialog();
-            }
-
+                //绯荤粺瀵嗙爜鏀寔鎿嶄綔闂ㄩ攣鍚庯紝璋冪敤娓╁眳鍩庣殑鐣岄潰銆愬父寮�鑷姩鍖栥��
+                if (doorLock == null)
+                {
+                    ///闃叉鎶涘紓甯�
+                    return;
+                }
+                ///澶囨敞锛歐JC鐨�
+                Shared.Phone.Device.Logic.Send.CurrentDoorLock = doorLock;
+                ///杩涙潵鍒锋柊涓�娆¤澶囧垪琛紱
+                Common.Logic.LogicDviceList.Clear();
+                if (Common.Logic.LogicDviceList.Count == 0)
+                {
+                    Common.Logic.LogicDviceList.AddRange(LocalDevice.Current.listAllDevice.ToArray());
+                }
+                var addLogicPage = new Shared.Phone.Device.Logic.SoneLogicList();
+                UserView.HomePage.Instance.AddChidren(addLogicPage);
+                UserView.HomePage.Instance.PageIndex += 1;
+                addLogicPage.Show();
+                addLogicPage.action += (w) =>
+                {
+                    doorLock.IsDoorLockNormallyMode = w;
+                    ///鐣欑粰寰愭鐢ㄧ殑
+                    UpdateNomallyOpenStatus();
+                };
+            };
+            //HdlCheckLogic.Current.CheckSecondarySecurity(action);
             #endregion
+
+
         }
 
         /// <summary>
@@ -1415,12 +1342,7 @@
                 btnNormallyOpenFrameLayout.Width = Application.GetRealWidth(0);
                 return;
             }
-            string key = doorLock.DeviceAddr + "_" + doorLock.DeviceEpoint;
-            if (!doorLock.IsDoorLockNormallyMode.ContainsKey(key))
-            {
-                return;
-            }
-            if (doorLock.IsDoorLockNormallyMode[key] == true)
+            if (doorLock.IsDoorLockNormallyMode)
             {
                 btnNormallyOpen.IsSelected = true;
                 btnDoorLockPic.IsSelected = true;
@@ -1428,7 +1350,7 @@
                 btnStatus.Text = Language.StringByID(R.MyInternationalizationString.Current) + Language.StringByID(R.MyInternationalizationString.DoorLockOpen);
 
             }
-            else if (doorLock.IsDoorLockNormallyMode[key] == false)
+            else if (!doorLock.IsDoorLockNormallyMode)
             {
                 btnStatus.Text = Language.StringByID(R.MyInternationalizationString.Current) + Language.StringByID(R.MyInternationalizationString.CLose);
                 btnDoorLockPic.IsSelected = false;
@@ -1517,6 +1439,7 @@
                 CommonPage.Instance.IsDrawerLockMode = false;
             }
             ZbGateway.StatusList.Remove(this);
+            DoorLockCommonInfo.LogicAction = null;
             base.RemoveFromParent();
         }
         #endregion
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Residence/LookRoomDeviceListForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Residence/LookRoomDeviceListForm.cs
index c848958..26abce9 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Residence/LookRoomDeviceListForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Residence/LookRoomDeviceListForm.cs
@@ -95,7 +95,7 @@
             //璁惧鍚嶅瓧
             var btnName = frameRow.AddLeftCaption(Common.LocalDevice.Current.GetDeviceEpointName(device), 700);
             btnName.TextSize = 15;
-            if (device.IsOnline == 0)
+            if (Common.LocalDevice.Current.CheckDeviceIsOnline(device) == false)
             {
                 btnName.TextColor = UserCenterColor.Current.TextGrayColor1;
             }
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Residence/LookRoomSettionForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Residence/LookRoomSettionForm.cs
index 194c955..756134f 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Residence/LookRoomSettionForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Residence/LookRoomSettionForm.cs
@@ -287,7 +287,7 @@
                         {
                             for (int j = 0; j < list.Count; j++)
                             {
-                                string mainkeys = Common.LocalDevice.Current.GetDeviceMainKeys(list[i]);
+                                string mainkeys = Common.LocalDevice.Current.GetDeviceMainKeys(list[j]);
                                 if (listView.Parent == null || dicData.ContainsKey(mainkeys) == false || listCheck.Contains(mainkeys) == true)
                                 {
                                     return;
@@ -295,13 +295,13 @@
                                 listCheck.Add(mainkeys);
 
                                 var localDevice = Common.LocalDevice.Current.GetDevice(mainkeys);
-                                if (localDevice != null && localDevice.IsOnline != list[i].IsOnline)
+                                if (localDevice != null && localDevice.IsOnline != list[j].IsOnline)
                                 {
                                     //鍦ㄧ嚎鐘舵�佷竴鏍风殑璇濓紝涓嶉渶瑕佸埛鏂�
-                                    localDevice.IsOnline = list[i].IsOnline;
+                                    localDevice.IsOnline = list[j].IsOnline;
                                     localDevice.ReSave();
                                 }
-                                if (list[i].IsOnline == 1)
+                                if (Common.LocalDevice.Current.CheckDeviceIsOnline(list[j]) == true)
                                 {
                                     dicData[mainkeys].OnlineCount += 1;
                                     dicData[mainkeys].btnOnline.Text = dicData[mainkeys].OnlineCount + "/" + dicData[mainkeys].listDeviceKeys.Count;
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Safety/SafetyManagementMainForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Safety/SafetyManagementMainForm.cs
index 6bafbed..5799375 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Safety/SafetyManagementMainForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Safety/SafetyManagementMainForm.cs
@@ -599,7 +599,8 @@
                     Application.RunOnMainThread(() =>
                     {
                         //璁剧疆鎺т欢鐨勫湪绾跨姸鎬佹枃鏈晥鏋�
-                        control?.SetOnlineStatu(device.IsOnline == 1);
+                        bool bolOnline = Common.LocalDevice.Current.CheckDeviceIsOnline(device);
+                        control?.SetOnlineStatu(bolOnline);
                     });
                 }
             }
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/UserMain/SecondAuthenticationForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/UserMain/SecondAuthenticationForm.cs
index c94de76..4fa2c8c 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/UserMain/SecondAuthenticationForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/UserMain/SecondAuthenticationForm.cs
@@ -415,10 +415,8 @@
                         UserCenterResourse.HideOption.CenterHideMenu = 1;
                     }
                 }
-                if (textValue == "0001a")
+                if (textValue == "1")
                 {
-                    var form = new Guide.GuideHouseForm();
-                    form.ShowFrom();
                 }
                 if (textValue == "12349")
                 {
diff --git a/ZigbeeApp/Shared/Phone/ZigBee/Device/DoorLock.cs b/ZigbeeApp/Shared/Phone/ZigBee/Device/DoorLock.cs
index 944cd49..6a54df8 100755
--- a/ZigbeeApp/Shared/Phone/ZigBee/Device/DoorLock.cs
+++ b/ZigbeeApp/Shared/Phone/ZigBee/Device/DoorLock.cs
@@ -35,11 +35,12 @@
         public string currentUserDisplayMethod = string.Empty;//褰撳墠鐢ㄦ埛鏄剧ず鏂瑰紡
         //鏈湴鎵�鏈夎处鎴峰垪琛�
         public List<Shared.Phone.UserCenter.MemberInfoRes> localAllAccountList = new List<Shared.Phone.UserCenter.MemberInfoRes> { };
+
         /// <summary>
-        /// 鏄惁甯稿紑妯″紡銆恔ey = doorLock.DeviceAddr + "_" + doorLock.DeviceEpoint銆�
+        /// 鏄惁甯稿紑妯″紡 
         /// ture:甯稿紑锛� false:鍏抽棴
         /// </summary>
-        public Dictionary<string, bool> IsDoorLockNormallyMode = new Dictionary<string, bool> { };//鏄惁鍐荤粨瀛愯处鎴�
+        public bool IsDoorLockNormallyMode = false;
         public string LocalTempPassword = string.Empty;//鏈湴鐢熸垚鐨勪复鏃跺瘑鐮�
         public Dictionary<string, bool> IsFreezeAccount = new Dictionary<string, bool> { };//鏄惁鍐荤粨瀛愯处鎴�
         public Dictionary<string, bool> HasRemoteUnlockAccess = new Dictionary<string, bool> { };//鏄惁缁欏瓙璐︽埛鎷ユ湁杩滅▼寮�閿佺殑鏉′欢
diff --git a/ZigbeeApp/Shared/Phone/ZigBee/Device/FreshAir.cs b/ZigbeeApp/Shared/Phone/ZigBee/Device/FreshAir.cs
index cc6989d..b90f787 100755
--- a/ZigbeeApp/Shared/Phone/ZigBee/Device/FreshAir.cs
+++ b/ZigbeeApp/Shared/Phone/ZigBee/Device/FreshAir.cs
@@ -18,7 +18,7 @@
         /// 椋庨�熸ā寮� 
         /// <para>5:鑷姩</para>
         /// <para>6:Smart</para>
-        /// <para>7:鎵嬪姩</para> 
+        /// <para>15:鎵嬪姩</para> 
         /// </summary>
         public int currentFanMode = 0;
         /// <summary>
@@ -224,7 +224,7 @@
             /// <summary>
             /// 鎵嬪姩
             /// </summary>
-            Manual = 7,
+            Manual = 15,
         }
     }
 }
diff --git a/ZigbeeApp/Shared/Phone/ZigBee/Device/Panel.cs b/ZigbeeApp/Shared/Phone/ZigBee/Device/Panel.cs
index 2ac732f..edd263e 100755
--- a/ZigbeeApp/Shared/Phone/ZigBee/Device/Panel.cs
+++ b/ZigbeeApp/Shared/Phone/ZigBee/Device/Panel.cs
@@ -37,6 +37,10 @@
         /// </summary>
         public string currentSelectFloorId = string.Empty;
         /// <summary>
+        /// 褰撳墠閫夋嫨鐨勬埧闂碔D銆愭柊椋庨潰鏉裤��
+        /// </summary>
+        public string currentSelectRoomId = string.Empty;
+        /// <summary>
         /// 褰撳墠寮�鍏虫ā寮�
         /// </summary>
         public string CurrentSwitchMode = "";
diff --git a/ZigbeeApp/Shared/Phone/ZigBee/Device/ZbGateway.cs b/ZigbeeApp/Shared/Phone/ZigBee/Device/ZbGateway.cs
index a105443..3cc5d12 100755
--- a/ZigbeeApp/Shared/Phone/ZigBee/Device/ZbGateway.cs
+++ b/ZigbeeApp/Shared/Phone/ZigBee/Device/ZbGateway.cs
@@ -603,422 +603,6 @@
         }
         #endregion
 
-        #region 鑾峰彇宸插叆缃戣澶囦俊鎭�
-        /// <summary>
-        /// 鑾峰彇缃戝叧璁惧淇℃伅(娉ㄦ剰锛岃繖涓帴鍙d細琚幓鎺夛級
-        /// </summary>
-        public async System.Threading.Tasks.Task<List<CommonDevice>> GetGwDeviceList()
-        {
-            DeviceList.Clear();
-            return await System.Threading.Tasks.Task.Run((Func<System.Threading.Tasks.Task<List<CommonDevice>>>)(async () =>
-            {
-                var dateTime = DateTime.Now;
-                bool canBreak = false;
-                Action<string, string> action = (topic, message) =>
-                {
-                    var gatewayID = topic.Split('/')[0];
-                    var jobject = Newtonsoft.Json.Linq.JObject.Parse(message);
-
-                    if (topic == gatewayID + "/" + "DeviceInfoRespon")
-                    {
-                        dateTime = DateTime.Now;
-                        var totalNum = Newtonsoft.Json.JsonConvert.DeserializeObject<int>(jobject["Data"]["TotalNum"].ToString());
-                        if (totalNum == 0)
-                        {
-                            canBreak = true;
-                            return;
-                        }
-                        var deviceID = jobject.Value<int>("Device_ID");
-                        switch ((DeviceType)(deviceID))
-                        {
-                            //case DeviceType.DimmableLight:
-                            //    var dimmableLight = new DimmableLight() { DeviceID = jobject.Value<int>("Device_ID"), DeviceAddr = jobject.Value<string>("DeviceAddr"), DeviceEpoint = jobject.Value<int>("Epoint"), DataID = jobject.Value<int>("Data_ID"), CurrentGateWayId = this.getGatewayBaseInfo?.gwID };
-                            //    dimmableLight.DeviceInfo = Newtonsoft.Json.JsonConvert.DeserializeObject<DimmableLight.DeviceInfoData>(jobject["Data"].ToString());
-                            //    if (dimmableLight.DeviceInfo == null)
-                            //    {
-                            //        return;
-                            //    }
-                            //    var light = DeviceList.Find(obj => obj.DeviceID == dimmableLight.DeviceID && obj.DeviceAddr == dimmableLight.DeviceAddr && obj.DeviceEpoint == dimmableLight.DeviceEpoint);
-                            //    if (light == null)
-                            //    {
-                            //        DeviceList.Add(dimmableLight);
-                            //        dimmableLight.DeviceName = dimmableLight.DeviceInfo.MacName;
-                            //        dimmableLight.DeviceEpointName = dimmableLight.DeviceInfo.DeviceName;
-                            //        dimmableLight.ImgVersion = dimmableLight.DeviceInfo.ImgVersion;
-                            //        dimmableLight.HwVersion = dimmableLight.DeviceInfo.HwVersion;
-                            //        dimmableLight.IsOnline = dimmableLight.DeviceInfo.IsOnline;
-                            //        dimmableLight.DriveCode = dimmableLight.DeviceInfo.DriveCode;
-                            //        dimmableLight.ImgTypeId = dimmableLight.DeviceInfo.ImgTypeId;
-                            //        dimmableLight.IasDeviceType = dimmableLight.DeviceInfo.DeviceType;
-                            //        dimmableLight.Profile = dimmableLight.DeviceInfo.Profile;
-                            //        dimmableLight.InClusterList = dimmableLight.DeviceInfo.InClusterList;
-                            //        dimmableLight.OutClusterList = dimmableLight.DeviceInfo.OutClusterList;
-                            //        dimmableLight.AttributeStatus = dimmableLight.DeviceInfo.AttributeStatus;
-                            //        //dimmableLight.Save();
-                            //    }
-                            //    else
-                            //    {
-                            //        light.DeviceInfo = dimmableLight.DeviceInfo;
-                            //        light.DeviceName = dimmableLight.DeviceInfo.MacName;
-                            //        light.DeviceEpointName = dimmableLight.DeviceInfo.DeviceName;
-                            //        light.ImgVersion = dimmableLight.DeviceInfo.ImgVersion;
-                            //        light.HwVersion = dimmableLight.DeviceInfo.HwVersion;
-                            //        light.IsOnline = dimmableLight.DeviceInfo.IsOnline;
-                            //        light.DriveCode = dimmableLight.DeviceInfo.DriveCode;
-                            //        light.ImgTypeId = dimmableLight.DeviceInfo.ImgTypeId;
-                            //        light.IasDeviceType = dimmableLight.DeviceInfo.DeviceType;
-                            //        light.Profile = dimmableLight.DeviceInfo.Profile;
-                            //        light.InClusterList = dimmableLight.DeviceInfo.InClusterList;
-                            //        light.OutClusterList = dimmableLight.DeviceInfo.OutClusterList;
-                            //        light.AttributeStatus = dimmableLight.DeviceInfo.AttributeStatus;
-                            //        //dimmableLight.ReSave();
-                            //    }
-                            //    DebugPrintLog($"UI鏀跺埌閫氱煡鍚庣殑涓婚_{ topic}");
-
-                            //    break;
-                            //case DeviceType.OnOffSwitch:
-                            //    var panel = new Panel() { Time = jobject.Value<int>("Time"), DeviceID = jobject.Value<int>("Device_ID"), DeviceAddr = jobject.Value<string>("DeviceAddr"), DeviceEpoint = jobject.Value<int>("Epoint"), DataID = jobject.Value<int>("Data_ID"), CurrentGateWayId = this.getGatewayBaseInfo?.gwID };
-                            //    panel.DeviceInfo = Newtonsoft.Json.JsonConvert.DeserializeObject<Panel.DeviceInfoData>(jobject["Data"].ToString());
-                            //    if (panel.DeviceInfo == null)
-                            //    {
-                            //        return;
-                            //    }
-                            //    var panelInfo = DeviceList.Find(obj => obj.DeviceID == panel.DeviceID && obj.DeviceAddr == panel.DeviceAddr && obj.DeviceEpoint == panel.DeviceEpoint);
-                            //    if (panelInfo == null)
-                            //    {
-                            //        DeviceList.Add(panel);
-                            //        panel.DeviceName = panel.DeviceInfo.MacName;
-                            //        panel.DeviceEpointName = panel.DeviceInfo.DeviceName;
-                            //        panel.ImgTypeId = panel.DeviceInfo.ImgTypeId;
-                            //        panel.ImgVersion = panel.DeviceInfo.ImgVersion;
-                            //        panel.HwVersion = panel.DeviceInfo.HwVersion;
-                            //        panel.IasDeviceType = panel.DeviceInfo.DeviceType;
-                            //        panel.IsOnline = panel.DeviceInfo.IsOnline;
-                            //        panel.DriveCode = panel.DeviceInfo.DriveCode;
-                            //        panel.Profile = panel.DeviceInfo.Profile;
-                            //        panel.InClusterList = panel.DeviceInfo.InClusterList;
-                            //        panel.OutClusterList = panel.DeviceInfo.OutClusterList;
-                            //        panel.AttributeStatus = panel.DeviceInfo.AttributeStatus;
-                            //        //panel.Save();
-                            //    }
-                            //    else
-                            //    {
-                            //        panelInfo.DeviceInfo = panel.DeviceInfo;
-                            //        panelInfo.DeviceName = panel.DeviceInfo.MacName;
-                            //        panelInfo.DeviceEpointName = panel.DeviceInfo.DeviceName;
-                            //        panelInfo.ImgVersion = panel.DeviceInfo.ImgVersion;
-                            //        panelInfo.HwVersion = panel.DeviceInfo.HwVersion;
-                            //        panelInfo.IsOnline = panel.DeviceInfo.IsOnline;
-                            //        panelInfo.DriveCode = panel.DeviceInfo.DriveCode;
-                            //        panelInfo.IasDeviceType = panel.DeviceInfo.DeviceType;
-                            //        panelInfo.Profile = panel.DeviceInfo.Profile;
-                            //        panelInfo.ImgTypeId = panel.DeviceInfo.ImgTypeId;
-                            //        panelInfo.InClusterList = panel.DeviceInfo.InClusterList;
-                            //        panelInfo.OutClusterList = panel.DeviceInfo.OutClusterList;
-                            //        panelInfo.AttributeStatus = panel.DeviceInfo.AttributeStatus;
-                            //        //panel.ReSave();
-                            //    }
-                            //    DebugPrintLog($"UI鏀跺埌閫氱煡鍚庣殑涓婚_{ topic}");
-
-                            //    break;
-                            //case DeviceType.OnOffOutput:
-                            //    var toggleLight = new ToggleLight() { Time = jobject.Value<int>("Time"), DeviceID = jobject.Value<int>("Device_ID"), DeviceAddr = jobject.Value<string>("DeviceAddr"), DeviceEpoint = jobject.Value<int>("Epoint"), DataID = jobject.Value<int>("Data_ID"), CurrentGateWayId = this.getGatewayBaseInfo?.gwID };
-                            //    toggleLight.DeviceInfo = Newtonsoft.Json.JsonConvert.DeserializeObject<ToggleLight.DeviceInfoData>(jobject["Data"].ToString());
-                            //    if (toggleLight.DeviceInfo == null)
-                            //    {
-                            //        return;
-                            //    }
-                            //    var toggleLightInfo = DeviceList.Find(obj => obj.DeviceID == toggleLight.DeviceID && obj.DeviceAddr == toggleLight.DeviceAddr && obj.DeviceEpoint == toggleLight.DeviceEpoint);
-                            //    if (toggleLightInfo == null)
-                            //    {
-                            //        DeviceList.Add(toggleLight);
-                            //        toggleLight.DeviceName = toggleLight.DeviceInfo.MacName;
-                            //        toggleLight.DeviceEpointName = toggleLight.DeviceInfo.DeviceName;
-                            //        toggleLight.ImgVersion = toggleLight.DeviceInfo.ImgVersion;
-                            //        toggleLight.HwVersion = toggleLight.DeviceInfo.HwVersion;
-                            //        toggleLight.IsOnline = toggleLight.DeviceInfo.IsOnline;
-                            //        toggleLight.DriveCode = toggleLight.DeviceInfo.DriveCode;
-                            //        toggleLight.IasDeviceType = toggleLight.DeviceInfo.DeviceType;
-                            //        toggleLight.Profile = toggleLight.DeviceInfo.Profile;
-                            //        toggleLight.ImgTypeId = toggleLight.DeviceInfo.ImgTypeId;
-                            //        toggleLight.InClusterList = toggleLight.DeviceInfo.InClusterList;
-                            //        toggleLight.OutClusterList = toggleLight.DeviceInfo.OutClusterList;
-                            //        toggleLight.AttributeStatus = toggleLight.DeviceInfo.AttributeStatus;
-                            //        //toggleLight.Save();
-                            //    }
-                            //    else
-                            //    {
-                            //        toggleLightInfo.DeviceName = toggleLight.DeviceInfo.MacName;
-                            //        toggleLightInfo.DeviceEpointName = toggleLight.DeviceInfo.DeviceName;
-                            //        toggleLightInfo.ImgVersion = toggleLight.DeviceInfo.ImgVersion;
-                            //        toggleLightInfo.HwVersion = toggleLight.DeviceInfo.HwVersion;
-                            //        toggleLightInfo.IsOnline = toggleLight.DeviceInfo.IsOnline;
-                            //        toggleLightInfo.DriveCode = toggleLight.DeviceInfo.DriveCode;
-                            //        toggleLightInfo.IasDeviceType = toggleLight.DeviceInfo.DeviceType;
-                            //        toggleLightInfo.Profile = toggleLight.DeviceInfo.Profile;
-                            //        toggleLightInfo.ImgTypeId = toggleLight.DeviceInfo.ImgTypeId;
-                            //        toggleLightInfo.InClusterList = toggleLight.DeviceInfo.InClusterList;
-                            //        toggleLightInfo.OutClusterList = toggleLight.DeviceInfo.OutClusterList;
-                            //        toggleLightInfo.AttributeStatus = toggleLight.DeviceInfo.AttributeStatus;
-                            //        toggleLightInfo.DeviceInfo = toggleLight.DeviceInfo;
-                            //        //toggleLightInfo.ReSave();
-                            //    }
-                            //    DebugPrintLog($"UI鏀跺埌閫氱煡鍚庣殑涓婚_{ topic}");
-
-                            //    break;
-                            //case DeviceType.AirSwitch:
-                            //    var airSwitch = new AirSwitch() { Time = jobject.Value<int>("Time"), DeviceID = jobject.Value<int>("Device_ID"), DeviceAddr = jobject.Value<string>("DeviceAddr"), DeviceEpoint = jobject.Value<int>("Epoint"), DataID = jobject.Value<int>("Data_ID"), CurrentGateWayId = this.getGatewayBaseInfo?.gwID };
-                            //    airSwitch.DeviceInfo = Newtonsoft.Json.JsonConvert.DeserializeObject<AirSwitch.DeviceInfoData>(jobject["Data"].ToString());
-                            //    if (airSwitch.DeviceInfo == null)
-                            //    {
-                            //        return;
-                            //    }
-                            //    var airSwitchInfo = DeviceList.Find(obj => obj.DeviceID == airSwitch.DeviceID && obj.DeviceAddr == airSwitch.DeviceAddr && obj.DeviceEpoint == airSwitch.DeviceEpoint);
-                            //    if (airSwitchInfo == null)
-                            //    {
-                            //        DeviceList.Add(airSwitch);
-                            //        airSwitch.DeviceName = airSwitch.DeviceInfo.MacName;
-                            //        airSwitch.DeviceEpointName = airSwitch.DeviceInfo.DeviceName;
-                            //        airSwitch.ImgVersion = airSwitch.DeviceInfo.ImgVersion;
-                            //        airSwitch.HwVersion = airSwitch.DeviceInfo.HwVersion;
-                            //        airSwitch.IsOnline = airSwitch.DeviceInfo.IsOnline;
-                            //        airSwitch.DriveCode = airSwitch.DeviceInfo.DriveCode;
-                            //        airSwitch.IasDeviceType = airSwitch.DeviceInfo.DeviceType;
-                            //        airSwitch.Profile = airSwitch.DeviceInfo.Profile;
-                            //        airSwitch.ImgTypeId = airSwitch.DeviceInfo.ImgTypeId;
-                            //        airSwitch.InClusterList = airSwitch.DeviceInfo.InClusterList;
-                            //        airSwitch.OutClusterList = airSwitch.DeviceInfo.OutClusterList;
-                            //        airSwitch.AttributeStatus = airSwitch.DeviceInfo.AttributeStatus;
-                            //        //airSwitch.Save();
-                            //    }
-                            //    else
-                            //    {
-                            //        airSwitchInfo.DeviceName = airSwitch.DeviceInfo.MacName;
-                            //        airSwitchInfo.DeviceEpointName = airSwitch.DeviceInfo.DeviceName;
-                            //        airSwitchInfo.ImgVersion = airSwitch.DeviceInfo.ImgVersion;
-                            //        airSwitchInfo.HwVersion = airSwitch.DeviceInfo.HwVersion;
-                            //        airSwitchInfo.IsOnline = airSwitch.DeviceInfo.IsOnline;
-                            //        airSwitchInfo.DriveCode = airSwitch.DeviceInfo.DriveCode;
-                            //        airSwitchInfo.IasDeviceType = airSwitch.DeviceInfo.DeviceType;
-                            //        airSwitchInfo.Profile = airSwitch.DeviceInfo.Profile;
-                            //        airSwitchInfo.ImgTypeId = airSwitch.DeviceInfo.ImgTypeId;
-                            //        airSwitchInfo.InClusterList = airSwitch.DeviceInfo.InClusterList;
-                            //        airSwitchInfo.OutClusterList = airSwitch.DeviceInfo.OutClusterList;
-                            //        airSwitchInfo.AttributeStatus = airSwitch.DeviceInfo.AttributeStatus;
-                            //        airSwitchInfo.DeviceInfo = airSwitch.DeviceInfo;
-                            //        // airSwitchInfo.ReSave();
-                            //    }
-                            //    DebugPrintLog($"UI鏀跺埌閫氱煡鍚庣殑涓婚_{ topic}");
-
-                            //    break;
-                            //case DeviceType.WindowCoveringDevice:
-                            //    var windowCovering = new Rollershade() { DeviceID = jobject.Value<int>((object)"Device_ID"), DeviceAddr = jobject.Value<string>((object)"DeviceAddr"), DeviceEpoint = jobject.Value<int>((object)"Epoint"), DataID = jobject.Value<int>((object)"Data_ID"), CurrentGateWayId = this.getGatewayBaseInfo?.gwID };
-                            //    windowCovering.DeviceInfo = Newtonsoft.Json.JsonConvert.DeserializeObject<Rollershade.DeviceInfoData>(jobject["Data"].ToString());
-                            //    if (windowCovering.DeviceInfo == null)
-                            //    {
-                            //        return;
-                            //    }
-                            //    var wc = DeviceList.Find(obj => obj.DeviceID == windowCovering.DeviceID && obj.DeviceAddr == windowCovering.DeviceAddr && obj.DeviceEpoint == windowCovering.DeviceEpoint);
-                            //    if (wc == null)
-                            //    {
-                            //        DeviceList.Add(windowCovering);
-                            //        windowCovering.DeviceName = windowCovering.DeviceInfo.MacName;
-                            //        windowCovering.DeviceEpointName = windowCovering.DeviceInfo.DeviceName;
-                            //        windowCovering.ImgVersion = windowCovering.DeviceInfo.ImgVersion;
-                            //        windowCovering.HwVersion = windowCovering.DeviceInfo.HwVersion;
-                            //        windowCovering.IsOnline = windowCovering.DeviceInfo.IsOnline;
-                            //        windowCovering.DriveCode = windowCovering.DeviceInfo.DriveCode;
-                            //        windowCovering.IasDeviceType = windowCovering.DeviceInfo.DeviceType;
-                            //        windowCovering.Profile = windowCovering.DeviceInfo.Profile;
-                            //        windowCovering.ImgTypeId = windowCovering.DeviceInfo.ImgTypeId;
-                            //        windowCovering.InClusterList = windowCovering.DeviceInfo.InClusterList;
-                            //        windowCovering.OutClusterList = windowCovering.DeviceInfo.OutClusterList;
-                            //        windowCovering.AttributeStatus = windowCovering.DeviceInfo.AttributeStatus;
-                            //        //windowCovering.Save();
-                            //    }
-                            //    else
-                            //    {
-                            //        wc.DeviceName = windowCovering.DeviceInfo.MacName;
-                            //        wc.DeviceEpointName = windowCovering.DeviceInfo.DeviceName;
-                            //        wc.DeviceInfo = windowCovering.DeviceInfo;
-                            //        wc.ImgVersion = windowCovering.DeviceInfo.ImgVersion;
-                            //        wc.HwVersion = windowCovering.DeviceInfo.HwVersion;
-                            //        wc.IsOnline = windowCovering.DeviceInfo.IsOnline;
-                            //        wc.DriveCode = windowCovering.DeviceInfo.DriveCode;
-                            //        wc.IasDeviceType = windowCovering.DeviceInfo.DeviceType;
-                            //        wc.Profile = windowCovering.DeviceInfo.Profile;
-                            //        wc.ImgTypeId = windowCovering.DeviceInfo.ImgTypeId;
-                            //        wc.InClusterList = windowCovering.DeviceInfo.InClusterList;
-                            //        wc.OutClusterList = windowCovering.DeviceInfo.OutClusterList;
-                            //        wc.AttributeStatus = windowCovering.DeviceInfo.AttributeStatus;
-                            //        // wc.ReSave();
-                            //    }
-                            //    DebugPrintLog($"UI鏀跺埌閫氱煡鍚庣殑涓婚_{ topic}");
-                            //    break;
-                            //case DeviceType.IASZone:
-                            //    var ias = new IASZone() { Time = jobject.Value<int>("Time"), DeviceID = jobject.Value<int>("Device_ID"), DeviceAddr = jobject.Value<string>("DeviceAddr"), DeviceEpoint = jobject.Value<int>("Epoint"), DataID = jobject.Value<int>("Data_ID"), CurrentGateWayId = this.getGatewayBaseInfo?.gwID };
-                            //    ias.DeviceInfo = Newtonsoft.Json.JsonConvert.DeserializeObject<IASZone.DeviceInfoData>(jobject["Data"].ToString());
-                            //    if (ias.DeviceInfo == null)
-                            //    {
-                            //        return;
-                            //    }
-                            //    var infoIAS = DeviceList.Find(obj => obj.DeviceID == ias.DeviceID && obj.DeviceAddr == ias.DeviceAddr && obj.DeviceEpoint == ias.DeviceEpoint);
-                            //    if (infoIAS == null)
-                            //    {
-                            //        DeviceList.Add(ias);
-                            //        ias.DeviceName = ias.DeviceInfo.MacName;
-                            //        ias.DeviceEpointName = ias.DeviceInfo.DeviceName;
-                            //        ias.ImgVersion = ias.DeviceInfo.ImgVersion;
-                            //        ias.HwVersion = ias.DeviceInfo.HwVersion;
-                            //        ias.IsOnline = ias.DeviceInfo.IsOnline;
-                            //        ias.DriveCode = ias.DeviceInfo.DriveCode;
-                            //        ias.IasDeviceType = ias.DeviceInfo.DeviceType;
-                            //        ias.Profile = ias.DeviceInfo.Profile;
-                            //        ias.ImgTypeId = ias.DeviceInfo.ImgTypeId;
-                            //        ias.InClusterList = ias.DeviceInfo.InClusterList;
-                            //        ias.OutClusterList = ias.DeviceInfo.OutClusterList;
-                            //        ias.AttributeStatus = ias.DeviceInfo.AttributeStatus;
-                            //        //ias.Save();
-                            //    }
-                            //    else
-                            //    {
-                            //        infoIAS.DeviceName = ias.DeviceInfo.MacName;
-                            //        infoIAS.DeviceEpointName = ias.DeviceInfo.DeviceName;
-                            //        infoIAS.DeviceEpointName = ias.DeviceInfo.DeviceName;
-                            //        infoIAS.ImgVersion = ias.DeviceInfo.ImgVersion;
-                            //        infoIAS.HwVersion = ias.DeviceInfo.HwVersion;
-                            //        infoIAS.IsOnline = ias.DeviceInfo.IsOnline;
-                            //        infoIAS.DriveCode = ias.DeviceInfo.DriveCode;
-                            //        infoIAS.IasDeviceType = ias.DeviceInfo.DeviceType;
-                            //        infoIAS.Profile = ias.DeviceInfo.Profile;
-                            //        infoIAS.ImgTypeId = ias.DeviceInfo.ImgTypeId;
-                            //        infoIAS.InClusterList = ias.DeviceInfo.InClusterList;
-                            //        infoIAS.OutClusterList = ias.DeviceInfo.OutClusterList;
-                            //        infoIAS.AttributeStatus = ias.DeviceInfo.AttributeStatus;
-                            //        infoIAS.DeviceInfo = ias.DeviceInfo;
-                            //        //ias.ReSave();
-                            //    }
-                            //    DebugPrintLog($"UI鏀跺埌閫氱煡鍚庣殑涓婚_{ topic}");
-                            //    break;
-                            //case DeviceType.OtaDevice:
-                            //case DeviceType.OtaPanelDevice:
-                            //var ota = new OTADevice() { Time = jobject.Value<int>("Time"), DeviceID = jobject.Value<int>("Device_ID"), DeviceAddr = jobject.Value<string>("DeviceAddr"), DeviceEpoint = jobject.Value<int>("Epoint"), DataID = jobject.Value<int>("Data_ID"), CurrentGateWayId = this.getGatewayBaseInfo?.gwID };
-                            //ota.DeviceInfo = Newtonsoft.Json.JsonConvert.DeserializeObject<DeviceInfoData>(jobject["Data"].ToString());
-                            //if (ota.DeviceInfo == null)
-                            //{
-                            //    return;
-                            //}
-                            //var infoOta = DeviceList.Find(obj => obj.DeviceID == ota.DeviceID && obj.DeviceAddr == ota.DeviceAddr && obj.DeviceEpoint == ota.DeviceEpoint);
-                            //if (infoOta == null)
-                            //{
-                            //    DeviceList.Add(ota);
-                            //    ota.DeviceName = ota.DeviceInfo.MacName;
-                            //    ota.DeviceEpointName = ota.DeviceInfo.DeviceName;
-                            //    ota.ImgVersion = ota.DeviceInfo.ImgVersion;
-                            //    ota.HwVersion = ota.DeviceInfo.HwVersion;
-                            //    ota.IsOnline = ota.DeviceInfo.IsOnline;
-                            //    ota.DriveCode = ota.DeviceInfo.DriveCode;
-                            //    ota.IasDeviceType = ota.DeviceInfo.DeviceType;
-                            //    ota.Profile = ota.DeviceInfo.Profile;
-                            //    ota.ImgTypeId = ota.DeviceInfo.ImgTypeId;
-                            //    ota.InClusterList = ota.DeviceInfo.InClusterList;
-                            //    ota.OutClusterList = ota.DeviceInfo.OutClusterList;
-                            //    ota.AttributeStatus = ota.DeviceInfo.AttributeStatus;
-                            //    //ota.Save();
-                            //}
-                            //else
-                            //{
-                            //    infoOta.DeviceName = ota.DeviceInfo.MacName;
-                            //    infoOta.DeviceEpointName = ota.DeviceInfo.DeviceName;
-                            //    infoOta.DeviceEpointName = ota.DeviceInfo.DeviceName;
-                            //    infoOta.ImgVersion = ota.DeviceInfo.ImgVersion;
-                            //    infoOta.HwVersion = ota.DeviceInfo.HwVersion;
-                            //    infoOta.IsOnline = ota.DeviceInfo.IsOnline;
-                            //    infoOta.DriveCode = ota.DeviceInfo.DriveCode;
-                            //    infoOta.IasDeviceType = ota.DeviceInfo.DeviceType;
-                            //    infoOta.Profile = ota.DeviceInfo.Profile;
-                            //    infoOta.ImgTypeId = ota.DeviceInfo.ImgTypeId;
-                            //    infoOta.InClusterList = ota.DeviceInfo.InClusterList;
-                            //    infoOta.OutClusterList = ota.DeviceInfo.OutClusterList;
-                            //    infoOta.AttributeStatus = ota.DeviceInfo.AttributeStatus;
-                            //    infoOta.DeviceInfo = ota.DeviceInfo;
-                            //    //ota.ReSave();
-                            //}
-                            //DebugPrintLog($"UI鏀跺埌閫氱煡鍚庣殑涓婚_{ topic}");
-                            //break;
-                            //case DeviceType.Thermostat:
-                            //var thermostat = new ThermostatObj() { DeviceID = jobject.Value<int>("Device_ID"), DeviceAddr = jobject.Value<string>("DeviceAddr"), DeviceEpoint = jobject.Value<int>("Epoint"), DataID = jobject.Value<int>("Data_ID"), CurrentGateWayId = gateway.getGatewayBaseInfo.gwID };
-                            //thermostat.DeviceInfo = Newtonsoft.Json.JsonConvert.DeserializeObject<ThermostatObj.DeviceInfoData>(jobject["Data"].ToString());
-                            //if (thermostat.DeviceInfo == null)
-                            //{
-                            //    return;
-                            //}
-                            //var ther = gateway.DeviceList.Find(obj => obj.DeviceID == thermostat.DeviceID && obj.DeviceAddr == thermostat.DeviceAddr && obj.DeviceEpoint == thermostat.DeviceEpoint);
-                            //if (ther == null)
-                            //{
-                            //    gateway.DeviceList.Add(thermostat);
-                            //    thermostat.DeviceName = thermostat.DeviceInfo.DeviceName;
-                            //    IO.LocalFileUtils.SaveDeviceInfo(thermostat, thermostat.DeviceEpoint.ToString());
-                            //}
-                            //else
-                            //{
-                            //    ther.DeviceName = thermostat.DeviceInfo.DeviceName;
-                            //    ther.DeviceInfo = thermostat.DeviceInfo;
-                            //    ZigBee.IO.LocalFileUtils.SaveDeviceInfo(ther, ther.DeviceEpoint.ToString());
-                            //}
-                            //break;
-                            //case DeviceType.TemperatureSensor:
-                            //var temperatureSensor = new TemperatureSensor() { DeviceID = jobject.Value<int>("Device_ID"), DeviceAddr = jobject.Value<string>("DeviceAddr"), DeviceEpoint = jobject.Value<int>("Epoint"), DataID = jobject.Value<int>("Data_ID"), CurrentGateWayId = gateway.getGatewayBaseInfo.gwID };
-                            //temperatureSensor.DeviceInfo = Newtonsoft.Json.JsonConvert.DeserializeObject<TemperatureSensor.DeviceInfoData>(jobject["Data"].ToString());
-                            //if (temperatureSensor.DeviceInfo == null)
-                            //{
-                            //    return;
-                            //}
-                            //var ts = gateway.DeviceList.Find(obj => obj.DeviceID == temperatureSensor.DeviceID && obj.DeviceAddr == temperatureSensor.DeviceAddr && obj.DeviceEpoint == temperatureSensor.DeviceEpoint);
-                            //if (ts == null)
-                            //{
-                            //    gateway.DeviceList.Add(temperatureSensor);
-                            //    temperatureSensor.DeviceName = temperatureSensor.DeviceInfo.DeviceName;
-                            //    IO.LocalFileUtils.SaveDeviceInfo(temperatureSensor, temperatureSensor.DeviceEpoint.ToString());
-                            //}
-                            //else
-                            //{
-                            //    ts.DeviceName = temperatureSensor.DeviceInfo.DeviceName;
-                            //    ts.DeviceInfo = temperatureSensor.DeviceInfo;
-                            //    IO.LocalFileUtils.SaveDeviceInfo(ts, ts.DeviceEpoint.ToString());
-                            //}
-                            //break;
-
-                        }
-                    }
-                    else if (topic == gatewayID + "/" + "DeviceInfoResponEnd")
-                    {
-                        canBreak = true;
-                    }
-                };
-
-                Actions += action;
-                DebugPrintLog("DeviceInfo Actions 鍚姩" + "_" + System.DateTime.Now.ToString());
-
-                try
-                {
-                    var jObject = new JObject { { "Cluster_ID", 0 }, { "Command", 93 } };
-                    Send("GetDeviceInfo", jObject.ToString());
-                }
-                catch { }
-
-                while (canBreak == false && (DateTime.Now - dateTime).TotalMilliseconds < 6000)
-                {
-                    await System.Threading.Tasks.Task.Delay(10);
-                }
-
-                Actions -= action;
-                DebugPrintLog("DeviceInfo_Actions 閫�鍑�" + System.DateTime.Now.ToString());
-                return DeviceList;
-            }));
-        }
-        #endregion
-
         #region 鑾峰彇缃戝叧璁板綍鐨勮澶囧睘鎬х姸鎬�
         /// <summary>
         ///鑾峰彇缃戝叧璁板綍鐨勮澶囧睘鎬х姸鎬�
diff --git a/ZigbeeApp/Shared/Phone/ZigBee/Device/ZbGatewayData.cs b/ZigbeeApp/Shared/Phone/ZigBee/Device/ZbGatewayData.cs
index d063079..e77d781 100755
--- a/ZigbeeApp/Shared/Phone/ZigBee/Device/ZbGatewayData.cs
+++ b/ZigbeeApp/Shared/Phone/ZigBee/Device/ZbGatewayData.cs
@@ -443,355 +443,6 @@
         }
         #endregion
 
-        #region 鑾峰彇鎵�鏈夌綉鍏崇殑鑺傜偣璁惧淇℃伅锛堢敤浜庝富缃戝叧锛�
-        ///// <summary>
-        ///// 鑾峰彇鎵�鏈夌綉鍏崇殑鑺傜偣璁惧淇℃伅锛堢敤浜庝富缃戝叧锛�
-        ///// </summary>
-        //public static async System.Threading.Tasks.Task<List<CommonDevice>> GetAllGatewayDeviceInfoList()
-        //{
-        //    if (ZbGateway.MainGateWay == null)
-        //    {
-        //        return null;
-        //    }
-        //    ZbGateway.MainGateWay.AllGatewayDeviceList.Clear();
-        //    return await System.Threading.Tasks.Task.Run((Func<System.Threading.Tasks.Task<List<CommonDevice>>>)(async () =>
-        //    {
-        //        var dateTime = DateTime.Now;
-        //        Action<string, string> action = (topic, message) =>
-        //        {
-
-        //            var gatewayID = topic.Split('/')[0];
-        //            var jobject = Newtonsoft.Json.Linq.JObject.Parse(message);
-        //            if (topic == gatewayID + "/" + "DeviceInfoRespon")
-        //            {
-        //                dateTime = DateTime.Now;
-        //                var deviceID = jobject.Value<int>("Device_ID");
-        //                switch ((DeviceType)(deviceID))
-        //                {
-        //                    case DeviceType.ColorDimmableLight:
-        //                        var dimmableLight = new ColorDimmableLight() { DeviceID = jobject.Value<int>("Device_ID"), DeviceAddr = jobject.Value<string>("DeviceAddr"), DeviceEpoint = jobject.Value<int>("Epoint"), DataID = jobject.Value<int>("Data_ID") };
-        //                        dimmableLight.getAllGatewayDeviceInfo = Newtonsoft.Json.JsonConvert.DeserializeObject<ColorDimmableLight.AllGatewayDeviceInfo>(jobject["Data"].ToString());
-        //                        if (dimmableLight.getAllGatewayDeviceInfo == null)
-        //                        {
-        //                            return;
-        //                        }
-        //                        dimmableLight.CurrentGateWayId = dimmableLight.getAllGatewayDeviceInfo.GwId;
-        //                        var light = ZbGateway.MainGateWay.AllGatewayDeviceList.Find(obj => obj.DeviceID == dimmableLight.DeviceID && obj.DeviceAddr == dimmableLight.DeviceAddr && obj.DeviceEpoint == dimmableLight.DeviceEpoint);
-        //                        if (light == null)
-        //                        {
-        //                            ZbGateway.MainGateWay.AllGatewayDeviceList.Add(dimmableLight);
-        //                            dimmableLight.DeviceName = dimmableLight.getAllGatewayDeviceInfo.MacName;
-        //                            dimmableLight.DeviceEpointName = dimmableLight.getAllGatewayDeviceInfo.DeviceName;
-        //                            dimmableLight.ImgVersion = dimmableLight.getAllGatewayDeviceInfo.ImgVersion;
-        //                            dimmableLight.IsOnline = dimmableLight.getAllGatewayDeviceInfo.IsOnline;
-        //                            dimmableLight.IasDeviceType = dimmableLight.getAllGatewayDeviceInfo.DeviceType;
-        //                            dimmableLight.Profile = dimmableLight.getAllGatewayDeviceInfo.Profile;
-        //                            dimmableLight.ImgTypeId = dimmableLight.getAllGatewayDeviceInfo.ImgTypeId;
-        //                            dimmableLight.InClusterList = dimmableLight.getAllGatewayDeviceInfo.InClusterList;
-        //                            dimmableLight.OutClusterList = dimmableLight.getAllGatewayDeviceInfo.OutClusterList;
-        //                            dimmableLight.AttributeStatus = dimmableLight.getAllGatewayDeviceInfo.AttributeStatus;
-        //                            dimmableLight.Save();
-        //                        }
-        //                        else
-        //                        {
-        //                            light.getAllGatewayDeviceInfo = dimmableLight.getAllGatewayDeviceInfo;
-        //                            light.DeviceName = dimmableLight.getAllGatewayDeviceInfo.MacName;
-        //                            light.DeviceEpointName = dimmableLight.getAllGatewayDeviceInfo.DeviceName;
-        //                            light.ImgVersion = dimmableLight.getAllGatewayDeviceInfo.ImgVersion;
-        //                            light.IsOnline = dimmableLight.getAllGatewayDeviceInfo.IsOnline;
-        //                            light.IasDeviceType = dimmableLight.getAllGatewayDeviceInfo.DeviceType;
-        //                            light.Profile = dimmableLight.getAllGatewayDeviceInfo.Profile;
-        //                            light.ImgTypeId = dimmableLight.getAllGatewayDeviceInfo.ImgTypeId;
-        //                            light.InClusterList = dimmableLight.getAllGatewayDeviceInfo.InClusterList;
-        //                            light.OutClusterList = dimmableLight.getAllGatewayDeviceInfo.OutClusterList;
-        //                            light.AttributeStatus = dimmableLight.getAllGatewayDeviceInfo.AttributeStatus;
-        //                            light.ReSave();
-        //                        }
-        //                        System.Console.WriteLine($"鏀跺埌閫氱煡鍚庣殑涓婚_{ topic}");
-
-        //                        break;
-        //                    case DeviceType.OnOffOutput:
-        //                        var toggleLight = new ToggleLight() { Time = jobject.Value<int>("Time"), DeviceID = jobject.Value<int>("Device_ID"), DeviceAddr = jobject.Value<string>("DeviceAddr"), DeviceEpoint = jobject.Value<int>("Epoint"), DataID = jobject.Value<int>("Data_ID") };
-        //                        toggleLight.getAllGatewayDeviceInfo = Newtonsoft.Json.JsonConvert.DeserializeObject<ToggleLight.AllGatewayDeviceInfo>(jobject["Data"].ToString());
-        //                        if (toggleLight.getAllGatewayDeviceInfo == null)
-        //                        {
-        //                            return;
-        //                        }
-        //                        toggleLight.CurrentGateWayId = toggleLight.getAllGatewayDeviceInfo.GwId;
-
-        //                        var localToggleLight = ZbGateway.MainGateWay.AllGatewayDeviceList.Find(obj => obj.DeviceID == toggleLight.DeviceID && obj.DeviceAddr == toggleLight.DeviceAddr && obj.DeviceEpoint == toggleLight.DeviceEpoint);
-        //                        if (localToggleLight == null)
-        //                        {
-        //                            toggleLight.DeviceName = toggleLight.getAllGatewayDeviceInfo.MacName;
-        //                            toggleLight.DeviceEpointName = toggleLight.getAllGatewayDeviceInfo.DeviceName;
-        //                            toggleLight.ImgVersion = toggleLight.getAllGatewayDeviceInfo.ImgVersion;
-        //                            toggleLight.IsOnline = toggleLight.getAllGatewayDeviceInfo.IsOnline;
-        //                            toggleLight.IasDeviceType = toggleLight.getAllGatewayDeviceInfo.DeviceType;
-        //                            toggleLight.Profile = toggleLight.getAllGatewayDeviceInfo.Profile;
-        //                            toggleLight.ImgTypeId = toggleLight.getAllGatewayDeviceInfo.ImgTypeId;
-        //                            toggleLight.InClusterList = toggleLight.getAllGatewayDeviceInfo.InClusterList;
-        //                            toggleLight.OutClusterList = toggleLight.getAllGatewayDeviceInfo.OutClusterList;
-        //                            toggleLight.AttributeStatus = toggleLight.getAllGatewayDeviceInfo.AttributeStatus;
-        //                            ZbGateway.MainGateWay.AllGatewayDeviceList.Add(toggleLight);
-        //                            toggleLight.Save();
-
-        //                        }
-        //                        else
-        //                        {
-        //                            localToggleLight.getAllGatewayDeviceInfo = toggleLight.getAllGatewayDeviceInfo;
-        //                            localToggleLight.DeviceName = toggleLight.getAllGatewayDeviceInfo.MacName;
-        //                            localToggleLight.DeviceEpointName = toggleLight.getAllGatewayDeviceInfo.DeviceName;
-        //                            localToggleLight.ImgVersion = toggleLight.getAllGatewayDeviceInfo.ImgVersion;
-        //                            localToggleLight.IsOnline = toggleLight.getAllGatewayDeviceInfo.IsOnline;
-        //                            localToggleLight.IasDeviceType = toggleLight.getAllGatewayDeviceInfo.DeviceType;
-        //                            localToggleLight.Profile = toggleLight.getAllGatewayDeviceInfo.Profile;
-        //                            localToggleLight.ImgTypeId = toggleLight.getAllGatewayDeviceInfo.ImgTypeId;
-        //                            localToggleLight.InClusterList = toggleLight.getAllGatewayDeviceInfo.InClusterList;
-        //                            localToggleLight.OutClusterList = toggleLight.getAllGatewayDeviceInfo.OutClusterList;
-        //                            localToggleLight.AttributeStatus = toggleLight.getAllGatewayDeviceInfo.AttributeStatus;
-        //                            localToggleLight.ReSave();
-        //                        }
-        //                        System.Console.WriteLine($"鏀跺埌閫氱煡鍚庣殑涓婚_{ topic}");
-
-        //                        break;
-        //                    case DeviceType.OnOffSwitch:
-        //                        var panel = new Panel() { Time = jobject.Value<int>("Time"), DeviceID = jobject.Value<int>("Device_ID"), DeviceAddr = jobject.Value<string>("DeviceAddr"), DeviceEpoint = jobject.Value<int>("Epoint"), DataID = jobject.Value<int>("Data_ID") };
-        //                        panel.getAllGatewayDeviceInfo = Newtonsoft.Json.JsonConvert.DeserializeObject<Panel.AllGatewayDeviceInfo>(jobject["Data"].ToString());
-        //                        if (panel.getAllGatewayDeviceInfo == null)
-        //                        {
-        //                            return;
-        //                        }
-        //                        panel.CurrentGateWayId = panel.getAllGatewayDeviceInfo.GwId;
-
-        //                        var localPanel = ZbGateway.MainGateWay.AllGatewayDeviceList.Find(obj => obj.DeviceID == panel.DeviceID && obj.DeviceAddr == panel.DeviceAddr && obj.DeviceEpoint == panel.DeviceEpoint);
-        //                        if (localPanel == null)
-        //                        {
-        //                            panel.DeviceName = panel.getAllGatewayDeviceInfo.MacName;
-        //                            panel.DeviceEpointName = panel.getAllGatewayDeviceInfo.DeviceName;
-        //                            panel.ImgVersion = panel.getAllGatewayDeviceInfo.ImgVersion;
-        //                            panel.IsOnline = panel.getAllGatewayDeviceInfo.IsOnline;
-        //                            panel.IasDeviceType = panel.getAllGatewayDeviceInfo.DeviceType;
-        //                            panel.Profile = panel.getAllGatewayDeviceInfo.Profile;
-        //                            panel.ImgTypeId = panel.getAllGatewayDeviceInfo.ImgTypeId;
-        //                            panel.InClusterList = panel.getAllGatewayDeviceInfo.InClusterList;
-        //                            panel.OutClusterList = panel.getAllGatewayDeviceInfo.OutClusterList;
-        //                            panel.AttributeStatus = panel.getAllGatewayDeviceInfo.AttributeStatus;
-        //                            if (panel.DeviceAddr != null)
-        //                            {
-        //                                ZbGateway.MainGateWay.AllGatewayDeviceList.Add(panel);
-        //                            }
-        //                            panel.Save();
-        //                        }
-        //                        else
-        //                        {
-        //                            localPanel.getAllGatewayDeviceInfo = panel.getAllGatewayDeviceInfo;
-        //                            localPanel.DeviceName = panel.getAllGatewayDeviceInfo.MacName;
-        //                            localPanel.DeviceEpointName = panel.getAllGatewayDeviceInfo.DeviceName;
-        //                            localPanel.ImgVersion = panel.getAllGatewayDeviceInfo.ImgVersion;
-        //                            localPanel.IsOnline = panel.getAllGatewayDeviceInfo.IsOnline;
-        //                            localPanel.IasDeviceType = panel.getAllGatewayDeviceInfo.DeviceType;
-        //                            localPanel.Profile = panel.getAllGatewayDeviceInfo.Profile;
-        //                            localPanel.ImgTypeId = panel.getAllGatewayDeviceInfo.ImgTypeId;
-        //                            localPanel.InClusterList = panel.getAllGatewayDeviceInfo.InClusterList;
-        //                            localPanel.OutClusterList = panel.getAllGatewayDeviceInfo.OutClusterList;
-        //                            localPanel.AttributeStatus = panel.getAllGatewayDeviceInfo.AttributeStatus;
-        //                            localPanel.ReSave();
-        //                        }
-        //                        System.Console.WriteLine($"鏀跺埌閫氱煡鍚庣殑涓婚_{ topic}");
-
-        //                        break;
-        //                    case DeviceType.WindowCoveringDevice:
-        //                        var windowCovering = new Rollershade() { DeviceID = jobject.Value<int>((object)"Device_ID"), DeviceAddr = jobject.Value<string>((object)"DeviceAddr"), DeviceEpoint = jobject.Value<int>((object)"Epoint"), DataID = jobject.Value<int>((object)"Data_ID") };
-        //                        windowCovering.getAllGatewayDeviceInfo = Newtonsoft.Json.JsonConvert.DeserializeObject<Rollershade.AllGatewayDeviceInfo>(jobject["Data"].ToString());
-        //                        if (windowCovering.getAllGatewayDeviceInfo == null)
-        //                        {
-        //                            return;
-        //                        }
-        //                        windowCovering.CurrentGateWayId = windowCovering.getAllGatewayDeviceInfo.GwId;
-
-        //                        var wc = ZbGateway.MainGateWay.AllGatewayDeviceList.Find(obj => obj.DeviceID == windowCovering.DeviceID && obj.DeviceAddr == windowCovering.DeviceAddr && obj.DeviceEpoint == windowCovering.DeviceEpoint);
-        //                        if (wc == null)
-        //                        {
-        //                            windowCovering.DeviceName = windowCovering.getAllGatewayDeviceInfo.MacName;
-        //                            windowCovering.DeviceEpointName = windowCovering.getAllGatewayDeviceInfo.DeviceName;
-        //                            windowCovering.ImgVersion = windowCovering.getAllGatewayDeviceInfo.ImgVersion;
-        //                            windowCovering.IsOnline = windowCovering.getAllGatewayDeviceInfo.IsOnline;
-        //                            windowCovering.IasDeviceType = windowCovering.getAllGatewayDeviceInfo.DeviceType;
-        //                            windowCovering.Profile = windowCovering.getAllGatewayDeviceInfo.Profile;
-        //                            windowCovering.ImgTypeId = windowCovering.getAllGatewayDeviceInfo.ImgTypeId;
-        //                            windowCovering.InClusterList = windowCovering.getAllGatewayDeviceInfo.InClusterList;
-        //                            windowCovering.OutClusterList = windowCovering.getAllGatewayDeviceInfo.OutClusterList;
-        //                            windowCovering.AttributeStatus = windowCovering.getAllGatewayDeviceInfo.AttributeStatus;
-        //                            ZbGateway.MainGateWay.AllGatewayDeviceList.Add(windowCovering);
-        //                            windowCovering.Save();
-
-        //                        }
-        //                        else
-        //                        {
-        //                            wc.getAllGatewayDeviceInfo = windowCovering.getAllGatewayDeviceInfo;
-        //                            wc.DeviceName = windowCovering.getAllGatewayDeviceInfo.MacName;
-        //                            wc.DeviceEpointName = windowCovering.getAllGatewayDeviceInfo.DeviceName;
-        //                            wc.ImgVersion = windowCovering.getAllGatewayDeviceInfo.ImgVersion;
-        //                            wc.IsOnline = windowCovering.getAllGatewayDeviceInfo.IsOnline;
-        //                            wc.IasDeviceType = windowCovering.getAllGatewayDeviceInfo.DeviceType;
-        //                            wc.Profile = windowCovering.getAllGatewayDeviceInfo.Profile;
-        //                            wc.ImgTypeId = windowCovering.getAllGatewayDeviceInfo.ImgTypeId;
-        //                            wc.InClusterList = windowCovering.getAllGatewayDeviceInfo.InClusterList;
-        //                            wc.OutClusterList = windowCovering.getAllGatewayDeviceInfo.OutClusterList;
-        //                            wc.AttributeStatus = windowCovering.getAllGatewayDeviceInfo.AttributeStatus;
-        //                            wc.ReSave();
-        //                        }
-        //                        System.Console.WriteLine($"鏀跺埌閫氱煡鍚庣殑涓婚_{ topic}");
-
-        //                        break;
-        //                    case DeviceType.IASZone:
-        //                        var ias = new IASZone() { Time = jobject.Value<int>("Time"), DeviceID = jobject.Value<int>("Device_ID"), DeviceAddr = jobject.Value<string>("DeviceAddr"), DeviceEpoint = jobject.Value<int>("Epoint"), DataID = jobject.Value<int>("Data_ID") };
-        //                        ias.getAllGatewayDeviceInfo = Newtonsoft.Json.JsonConvert.DeserializeObject<IASZone.AllGatewayDeviceInfo>(jobject["Data"].ToString());
-        //                        if (ias.getAllGatewayDeviceInfo == null)
-        //                        {
-        //                            return;
-        //                        }
-        //                        ias.CurrentGateWayId = ias.getAllGatewayDeviceInfo.GwId;
-
-        //                        var infoIAS = ZbGateway.MainGateWay.AllGatewayDeviceList.Find(obj => obj.DeviceID == ias.DeviceID && obj.DeviceAddr == ias.DeviceAddr && obj.DeviceEpoint == ias.DeviceEpoint);
-        //                        if (infoIAS == null)
-        //                        {
-        //                            ZbGateway.MainGateWay.AllGatewayDeviceList.Add(ias);
-        //                            ias.DeviceName = ias.getAllGatewayDeviceInfo.MacName;
-        //                            ias.DeviceEpointName = ias.getAllGatewayDeviceInfo.DeviceName;
-        //                            ias.ImgVersion = ias.getAllGatewayDeviceInfo.ImgVersion;
-        //                            ias.IsOnline = ias.getAllGatewayDeviceInfo.IsOnline;
-        //                            ias.IasDeviceType = ias.getAllGatewayDeviceInfo.DeviceType;
-        //                            ias.Profile = ias.getAllGatewayDeviceInfo.Profile;
-        //                            ias.ImgTypeId = ias.getAllGatewayDeviceInfo.ImgTypeId;
-        //                            ias.InClusterList = ias.getAllGatewayDeviceInfo.InClusterList;
-        //                            ias.OutClusterList = ias.getAllGatewayDeviceInfo.OutClusterList;
-        //                            ias.AttributeStatus = ias.getAllGatewayDeviceInfo.AttributeStatus;
-        //                            ias.Save();
-        //                        }
-        //                        else
-        //                        {
-        //                            infoIAS.DeviceName = ias.getAllGatewayDeviceInfo.MacName;
-        //                            infoIAS.DeviceEpointName = ias.getAllGatewayDeviceInfo.DeviceName;
-        //                            infoIAS.getAllGatewayDeviceInfo = ias.getAllGatewayDeviceInfo;
-        //                            infoIAS.ImgVersion = ias.getAllGatewayDeviceInfo.ImgVersion;
-        //                            infoIAS.IsOnline = ias.getAllGatewayDeviceInfo.IsOnline;
-        //                            infoIAS.IasDeviceType = ias.getAllGatewayDeviceInfo.DeviceType;
-        //                            infoIAS.Profile = ias.getAllGatewayDeviceInfo.Profile;
-        //                            infoIAS.ImgTypeId = ias.getAllGatewayDeviceInfo.ImgTypeId;
-        //                            infoIAS.InClusterList = ias.getAllGatewayDeviceInfo.InClusterList;
-        //                            infoIAS.OutClusterList = ias.getAllGatewayDeviceInfo.OutClusterList;
-        //                            infoIAS.AttributeStatus = ias.getAllGatewayDeviceInfo.AttributeStatus;
-        //                            ias.ReSave();
-        //                        }
-        //                        System.Console.WriteLine($"鏀跺埌閫氱煡鍚庣殑涓婚_{ topic}");
-        //                        break;
-        //                    case DeviceType.OtaDevice:
-        //                    case DeviceType.OtaPanelDevice:
-        //                        var ota = new OTADevice() { Time = jobject.Value<int>("Time"), DeviceID = jobject.Value<int>("Device_ID"), DeviceAddr = jobject.Value<string>("DeviceAddr"), DeviceEpoint = jobject.Value<int>("Epoint"), DataID = jobject.Value<int>("Data_ID") };
-        //                        ota.getAllGatewayDeviceInfo = Newtonsoft.Json.JsonConvert.DeserializeObject<AllGatewayDeviceInfo>(jobject["Data"].ToString());
-        //                        if (ota.getAllGatewayDeviceInfo == null)
-        //                        {
-        //                            return;
-        //                        }
-        //                        ota.CurrentGateWayId = ota.getAllGatewayDeviceInfo.GwId;
-
-        //                        var infoOta = ZbGateway.MainGateWay.AllGatewayDeviceList.Find(obj => obj.DeviceID == ota.DeviceID && obj.DeviceAddr == ota.DeviceAddr && obj.DeviceEpoint == ota.DeviceEpoint);
-        //                        if (infoOta == null)
-        //                        {
-        //                            ZbGateway.MainGateWay.AllGatewayDeviceList.Add(ota);
-        //                            ota.DeviceName = ota.getAllGatewayDeviceInfo.MacName;
-        //                            ota.DeviceEpointName = ota.getAllGatewayDeviceInfo.DeviceName;
-        //                            ota.ImgVersion = ota.getAllGatewayDeviceInfo.ImgVersion;
-        //                            ota.IsOnline = ota.getAllGatewayDeviceInfo.IsOnline;
-        //                            ota.IasDeviceType = ota.getAllGatewayDeviceInfo.DeviceType;
-        //                            ota.Profile = ota.getAllGatewayDeviceInfo.Profile;
-        //                            ota.ImgTypeId = ota.getAllGatewayDeviceInfo.ImgTypeId;
-        //                            ota.InClusterList = ota.getAllGatewayDeviceInfo.InClusterList;
-        //                            ota.OutClusterList = ota.getAllGatewayDeviceInfo.OutClusterList;
-        //                            ota.AttributeStatus = ota.getAllGatewayDeviceInfo.AttributeStatus;
-        //                            ota.Save();
-        //                        }
-        //                        else
-        //                        {
-        //                            infoOta.DeviceName = ota.getAllGatewayDeviceInfo.MacName;
-        //                            infoOta.DeviceEpointName = ota.getAllGatewayDeviceInfo.DeviceName;
-        //                            infoOta.getAllGatewayDeviceInfo = ota.getAllGatewayDeviceInfo;
-        //                            infoOta.ImgVersion = ota.getAllGatewayDeviceInfo.ImgVersion;
-        //                            infoOta.IsOnline = ota.getAllGatewayDeviceInfo.IsOnline;
-        //                            infoOta.IasDeviceType = ota.getAllGatewayDeviceInfo.DeviceType;
-        //                            infoOta.Profile = ota.getAllGatewayDeviceInfo.Profile;
-        //                            infoOta.ImgTypeId = ota.getAllGatewayDeviceInfo.ImgTypeId;
-        //                            infoOta.InClusterList = ota.getAllGatewayDeviceInfo.InClusterList;
-        //                            infoOta.OutClusterList = ota.getAllGatewayDeviceInfo.OutClusterList;
-        //                            infoOta.AttributeStatus = ota.getAllGatewayDeviceInfo.AttributeStatus;
-        //                            ota.ReSave();
-        //                        }
-        //                        System.Console.WriteLine($"鏀跺埌閫氱煡鍚庣殑涓婚_{ topic}");
-        //                        break;
-        //                        //case DeviceType.Thermostat:
-        //                        //var thermostat = new ThermostatObj() { DeviceID = jobject.Value<int>("Device_ID"), DeviceAddr = jobject.Value<string>("DeviceAddr"), DeviceEpoint = jobject.Value<int>("Epoint"), DataID = jobject.Value<int>("Data_ID"), CurrentGateWayId = ZbGateway.MainGateWay.getGatewayBaseInfo.gwID };
-        //                        //thermostat.DeviceInfo = Newtonsoft.Json.JsonConvert.DeserializeObject<ThermostatObj.DeviceInfoData>(jobject["Data"].ToString());
-        //                        //if (thermostat.DeviceInfo == null)
-        //                        //{
-        //                        //    return;
-        //                        //}
-        //                        // var ther = ZbGateway.MainGateWay.AllGatewayDeviceList.Find(obj => obj.DeviceID == thermostat.DeviceID && obj.DeviceAddr == thermostat.DeviceAddr && obj.DeviceEpoint == thermostat.DeviceEpoint);
-        //                        //if (ther == null)
-        //                        //{
-        //                        //    thermostat.DeviceName = thermostat.DeviceInfo.DeviceName;
-        //                        //    ZbGateway.MainGateWay.AllGatewayDeviceList.Add(thermostat);
-        //                        //}
-        //                        //else
-        //                        //{
-        //                        //    thermostat.DeviceName = thermostat.DeviceInfo.DeviceName;
-        //                        //    ZigBee.IO.LocalFileUtils.SaveDeviceInfo(thermostat, thermostat.DeviceEpoint.ToString());
-        //                        //}
-        //                        //break;
-        //                        //case DeviceType.TemperatureSensor:
-        //                        //    var temperatureSensor = new TemperatureSensor() { DeviceID = jobject.Value<int>("Device_ID"), DeviceAddr = jobject.Value<string>("DeviceAddr"), DeviceEpoint = jobject.Value<int>("Epoint"), DataID = jobject.Value<int>("Data_ID"), CurrentGateWayId = ZbGateway.MainGateWay.getGatewayBaseInfo.gwID };
-        //                        //    temperatureSensor.DeviceInfo = Newtonsoft.Json.JsonConvert.DeserializeObject<TemperatureSensor.DeviceInfoData>(jobject["Data"].ToString());
-        //                        //    if (temperatureSensor.DeviceInfo == null)
-        //                        //    {
-        //                        //        return;
-        //                        //    }
-        //                        //     var ts = ZbGateway.MainGateWay.AllGatewayDeviceList.Find(obj => obj.DeviceID == temperatureSensor.DeviceID && obj.DeviceAddr == temperatureSensor.DeviceAddr && obj.DeviceEpoint == temperatureSensor.DeviceEpoint);
-        //                        //    if (ts == null)
-        //                        //    {
-        //                        //        temperatureSensor.DeviceName = temperatureSensor.DeviceInfo.DeviceName;
-        //                        //        ZbGateway.MainGateWay.AllGatewayDeviceList.Add(temperatureSensor);
-
-        //                        //    }
-        //                        //    else
-        //                        //    {
-        //                        //        temperatureSensor.DeviceName = temperatureSensor.DeviceInfo.DeviceName;
-        //                        //        IO.LocalFileUtils.SaveDeviceInfo(temperatureSensor, temperatureSensor.DeviceEpoint.ToString());
-        //                        //    }
-        //                        //    break;
-
-        //                }
-        //            }
-        //        };
-
-        //        ZbGateway.MainGateWay.Actions += action;
-        //        System.Console.WriteLine("MainGatewayDeviceInfo_Actions 鍚姩" + System.DateTime.Now.ToString());
-
-        //        var jObject = new JObject { { "Cluster_ID",  0 }, { "Command", 90 } };
-        //        ZbGateway.MainGateWay.CurrentGateWayId = ZbGateway.MainGateWay.getGatewayBaseInfo?.gwID;
-        //        ZbGateway.MainGateWay.Send("GetAllDeviceInfo", Common.SecuritySet.Encryption(jObject.ToString()));
-
-        //        while ((DateTime.Now - dateTime).TotalMilliseconds < 4000)
-        //        {
-        //            await System.Threading.Tasks.Task.Delay(100);
-        //        }
-
-        //        ZbGateway.MainGateWay.Actions -= action;
-        //        System.Console.WriteLine("MainGatewayDeviceInfo_Actions 閫�鍑�" + System.DateTime.Now.ToString());
-        //        return ZbGateway.MainGateWay.AllGatewayDeviceList;
-        //    }));
-        //}
-        #endregion
-
         #region 缃戝叧鎭㈠鍑哄巶璁剧疆
         /// <summary>
         /// 缃戝叧鎭㈠鍑哄巶璁剧疆杩斿洖鐨勬暟鎹�.
@@ -1240,414 +891,6 @@
         }
         #endregion
 
-        //#region 鑾峰彇鍗忚皟鍣ㄨ幏鍙栧崗璋冨櫒褰撳墠鍙戝皠鍔熺巼.
-        /////<summary >
-        ///// 鑾峰彇鍗忚皟鍣ㄨ幏鍙栧崗璋冨櫒褰撳墠鍙戝皠鍔熺巼
-        ///// </summary>
-        //public static async System.Threading.Tasks.Task<GwGetPowerResponData> GetPowerAsync(ZigBee.Device.ZbGateway gateway)
-        //{
-        //    if (gateway == null)
-        //    {
-        //        return null;
-        //    }
-        //    return await System.Threading.Tasks.Task.Run(async () =>
-        //    {
-        //        GwGetPowerResponData d = null;
-        //        Action<string, string> action = (topic, message) =>
-        //        {
-        //            var gatewayID = topic.Split('/')[0];
-        //            var jobject = Newtonsoft.Json.Linq.JObject.Parse(message);
-
-        //            if (topic == gatewayID + "/" + "Error_Respon")
-        //            {
-        //                var gatewayTemp = new ZbGateway() { Time = jobject.Value<int>("Time"), DataID = jobject.Value<int>("Data_ID"), CurrentGateWayId = gateway.getGatewayBaseInfo.gwID };
-        //                var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<ZbGateway.ErrorResponData>(jobject["Data"].ToString());
-
-        //                if (temp == null)
-        //                {
-        //                    d = new GwGetPowerResponData { errorMessageBase = "缃戝叧閿欒鍥炲锛屼笖鏁版嵁鏄┖" };
-        //                }
-        //                else
-        //                {
-        //                    d = new GwGetPowerResponData { errorResponData = temp, errorMessageBase = ErrorMess(temp.Error) };
-
-        //                }
-        //            }
-
-        //            if (topic == gatewayID + "/" + "ZbGw/GetPower_Respon")
-        //            {
-        //                var gatewayTemp = new ZbGateway() { DataID = jobject.Value<int>("Data_ID") };
-        //                var power = Newtonsoft.Json.JsonConvert.DeserializeObject<int>(jobject["Data"]["Power"].ToString());
-
-        //                if (power == 0)
-        //                {
-        //                    d = new GwGetPowerResponData { errorMessageBase = "缃戝叧杩斿洖鐨勬暟鎹负绌�" };
-        //                }
-        //                else
-        //                {
-        //                    d = new GwGetPowerResponData { power = power };
-        //                    DebugPrintLog($"UI鏀跺埌閫氱煡鍚庣殑涓婚_{ topic}");
-        //                }
-        //            }
-        //        };
-
-        //        gateway.Actions += action;
-        //        System.Console.WriteLine("GetPower_Actions 鍚姩" + "_" + System.DateTime.Now.ToString());
-
-        //        var jObject = new JObject { { "Cluster_ID", 64512 }, { "Command", 10 } };
-        //         gateway.Send(("ZbGw/GetPower"), Common.SecuritySet.Encryption((jObject.ToString())));
-
-        //        var dateTime = DateTime.Now;
-        //        while ((DateTime.Now - dateTime).TotalMilliseconds < 1000)
-        //        {
-        //            await System.Threading.Tasks.Task.Delay(10);
-        //            if (d != null)
-        //            {
-        //                break;
-        //            }
-        //        }
-        //        if ((DateTime.Now - dateTime).TotalMilliseconds > 1000)
-        //        {
-        //            d = new GwGetPowerResponData { errorMessageBase = " 鍥炲瓒呮椂锛岃閲嶆柊鎿嶄綔" };
-
-        //        }
-        //        gateway.Actions -= action;
-        //        System.Console.WriteLine("GetPower_Actions 閫�鍑�" + "_" + System.DateTime.Now.ToString());
-
-        //        return d;
-        //    });
-        //}
-
-        ///// <summary>
-        ///// 鑾峰彇鍗忚皟鍣ㄨ幏鍙栧崗璋冨櫒褰撳墠鍙戝皠鍔熺巼,缃戝叧鍙嶉鍏蜂綋淇℃伅
-        ///// </summary>
-        //public GwGetPowerResponData gwGetPowerResponData;
-        ///// <summary>
-        ///// 鑾峰彇鍗忚皟鍣ㄨ幏鍙栧崗璋冨櫒褰撳墠鍙戝皠鍔熺巼,缃戝叧鍙嶉鍏蜂綋淇℃伅
-        ///// </summary>
-        //[System.Serializable]
-        //public class GwGetPowerResponData
-        //{
-        //    /// <summary>
-        //    /// 閿欒淇℃伅
-        //    /// </summary>
-        //    public string errorMessageBase;
-        //    /// <summary>
-        //    /// 缃戝叧淇℃伅閿欒鍙嶉
-        //    /// <para>褰撶綉鍏虫帴鏀跺埌瀹㈡埛绔俊鎭悗锛屽嚭鐜颁互涓嬪紓甯告儏鍐靛皢鍙嶉閿欒銆�</para>
-        //    /// </summary>
-        //    public ErrorResponData errorResponData;
-        //    /// <summary>
-        //    /// 鍗忚皟鍣ㄥ彂灏勫姛鐜�
-        //    /// </summary>
-        //    public int power = 999;
-        //}
-
-        //#endregion
-
-        //#region 璁剧疆鍙戝皠鍔�.
-        /////<summary >
-        /////璁剧疆鍙戝皠鍔熺巼
-        ///// <para>power:瑕佹洿鏀圭殑璁惧鍙戝皠鍔熺巼锛屽彲璁剧疆8,10,11,13,15,16,18,19,20,21,22(dBm)</para>
-        ///// </summary>
-        //public static async System.Threading.Tasks.Task<SetPowerResponAllData> GwSetPowerAsync(ZigBee.Device.ZbGateway gateway, int power)
-        //{
-        //    if (gateway == null)
-        //    {
-        //        return null;
-        //    }
-        //    return await System.Threading.Tasks.Task.Run(async () =>
-        //    {
-        //        SetPowerResponAllData d = null;
-        //        Action<string, string> action = (topic, message) =>
-        //        {
-        //            var gatewayID = topic.Split('/')[0];
-        //            var jobject = Newtonsoft.Json.Linq.JObject.Parse(message);
-
-        //            if (topic == gatewayID + "/" + "Error_Respon")
-        //            {
-        //                var gatewayTemp = new ZbGateway() { Time = jobject.Value<int>("Time"), DataID = jobject.Value<int>("Data_ID"), CurrentGateWayId = gateway.getGatewayBaseInfo.gwID };
-        //                var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<ZbGateway.ErrorResponData>(jobject["Data"].ToString());
-
-        //                if (temp == null)
-        //                {
-        //                    d = new SetPowerResponAllData { errorMessageBase = "缃戝叧閿欒鍥炲锛屼笖鏁版嵁鏄┖" };
-        //                }
-        //                else
-        //                {
-        //                    d = new SetPowerResponAllData { errorResponData = temp, errorMessageBase = ErrorMess(temp.Error) };
-        //                }
-        //            }
-
-        //            if (topic == gatewayID + "/" + "ZbGw/SetPower_Respon")
-        //            {
-        //                var gatewayTemp = new ZbGateway() { DataID = jobject.Value<int>("Data_ID") };
-        //                var tempInfo = Newtonsoft.Json.JsonConvert.DeserializeObject<SetPoweResponData>(jobject["Data"].ToString());
-
-        //                if (tempInfo == null)
-        //                {
-        //                    d = new SetPowerResponAllData { errorMessageBase = "缃戝叧杩斿洖鐨勬暟鎹负绌�" };
-        //                }
-        //                else
-        //                {
-        //                    d = new SetPowerResponAllData { setPoweResponData = tempInfo };
-        //                    DebugPrintLog($"UI鏀跺埌閫氱煡鍚庣殑涓婚_{ topic}");
-        //                }
-        //            }
-        //        };
-
-        //        gateway.Actions += action;
-        //        System.Console.WriteLine("ZbGw/SetPower_Actions 鍚姩" + "_" + System.DateTime.Now.ToString());
-
-        //        var jObject = new JObject { { "Cluster_ID", 64512 }, { "Command", 11 } };
-        //        var data = new JObject { { "Power", power } };
-        //        jObject.Add("Data", data);
-        //         gateway.Send(("ZbGw/SetPower"), Common.SecuritySet.Encryption(jObject.ToString(),Password));
-
-        //        var dateTime = DateTime.Now;
-        //        while ((DateTime.Now - dateTime).TotalMilliseconds < 1000)
-        //        {
-        //            await System.Threading.Tasks.Task.Delay(10);
-        //            if (d != null)
-        //            {
-        //                break;
-        //            }
-        //        }
-        //        if ((DateTime.Now - dateTime).TotalMilliseconds > 1000)
-        //        {
-        //            d = new SetPowerResponAllData { errorMessageBase = " 鍥炲瓒呮椂锛岃閲嶆柊鎿嶄綔" };
-        //        }
-        //        gateway.Actions -= action;
-        //        System.Console.WriteLine("ZbGw/SetPower_Actions閫�鍑�" + "_" + System.DateTime.Now.ToString());
-
-        //        return d;
-        //    });
-        //}
-
-        ///// <summary>
-        ///// 璁剧疆鍙戝皠鍔熺巼,缃戝叧鍙嶉鍏蜂綋淇℃伅
-        ///// </summary>
-        //public SetPowerResponAllData setPoweResponAllData;
-        ///// <summary>
-        ///// 璁剧疆鍙戝皠鍔熺巼,缃戝叧鍙嶉鍏蜂綋淇℃伅
-        ///// </summary>
-        //[System.Serializable]
-        //public class SetPowerResponAllData
-        //{
-        //    /// <summary>
-        //    /// 閿欒淇℃伅
-        //    /// </summary>
-        //    public string errorMessageBase;
-        //    /// <summary>
-        //    /// 缃戝叧淇℃伅閿欒鍙嶉
-        //    /// <para>褰撶綉鍏虫帴鏀跺埌瀹㈡埛绔俊鎭悗锛屽嚭鐜颁互涓嬪紓甯告儏鍐靛皢鍙嶉閿欒銆�</para>
-        //    /// </summary>
-        //    public ErrorResponData errorResponData;
-        //    /// <summary>
-        //    /// 璁剧疆鍙戝皠鍔熺巼鏁版嵁
-        //    /// </summary>
-        //    public SetPoweResponData setPoweResponData;
-        //}
-
-        ///// <summary>
-        ///// 璁剧疆鍙戝皠鍔熺巼鏁版嵁
-        ///// </summary>
-        //public SetPoweResponData setPoweResponData;
-        ///// <summary>
-        ///// 璁剧疆鍙戝皠鍔熺巼鏁版嵁
-        ///// </summary>
-        //[System.Serializable]
-        //public class SetPoweResponData
-        //{
-        //    /// <summary>
-        //    /// 鏄惁閰嶇疆鎴愬姛
-        //    ///<para>0锛氭垚鍔�</para>
-        //    ///<para>2锛氶厤缃殑淇¢亾涓烘棤鏁堝��</para>
-        //    /// </summary>
-        //    public int Status = 999;
-        //    /// <summary>
-        //    /// 鍔熺巼
-        //    /// </summary>
-        //    public int Power = 999;
-        //}
-        //#endregion
-
-        //#region 璇诲彇褰撳墠灞�鍩熺綉鐨凱ANID.
-        /////<summary >
-        ///// 璇诲彇褰撳墠灞�鍩熺綉鐨凱ANID
-        ///// </summary>
-        //public static async System.Threading.Tasks.Task<GetPanIdResponData> ReadPanIdAsync(ZigBee.Device.ZbGateway gateway)
-        //{
-        //    if (gateway == null)
-        //    {
-        //        return null;
-        //    }
-        //    return await System.Threading.Tasks.Task.Run(async () =>
-        //    {
-        //        GetPanIdResponData d = null;
-        //        Action<string, string> action = (topic, message) =>
-        //        {
-        //            var gatewayID = topic.Split('/')[0];
-        //            var jobject = Newtonsoft.Json.Linq.JObject.Parse(message);
-
-        //            if (topic == gatewayID + "/" + "Error_Respon")
-        //            {
-        //                var gatewayTemp = new ZbGateway() { Time = jobject.Value<int>("Time"), DataID = jobject.Value<int>("Data_ID"), CurrentGateWayId = gateway.getGatewayBaseInfo.gwID };
-        //                var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<ZbGateway.ErrorResponData>(jobject["Data"].ToString());
-
-        //                if (temp == null)
-        //                {
-        //                    d = new GetPanIdResponData { errorMessageBase = "缃戝叧閿欒鍥炲锛屼笖鏁版嵁鏄┖" };
-        //                }
-        //                else
-        //                {
-        //                    d = new GetPanIdResponData { errorResponData = temp, errorMessageBase = ErrorMess(temp.Error) };
-        //                }
-        //            }
-
-        //            if (topic == gatewayID + "/" + "ZbGw/GetPanId_Respon")
-        //            {
-        //                var gatewayTemp = new ZbGateway() { DataID = jobject.Value<int>("Data_ID") };
-        //                var panID = Newtonsoft.Json.JsonConvert.DeserializeObject<int>(jobject["Data"]["PANID"].ToString());
-
-        //                if (panID == null)
-        //                {
-        //                    d = new GetPanIdResponData { errorMessageBase = "缃戝叧杩斿洖鐨勬暟鎹负绌�" };
-
-        //                }
-        //                else
-        //                {
-        //                    d = new GetPanIdResponData { panID = panID };
-        //                    DebugPrintLog($"UI鏀跺埌閫氱煡鍚庣殑涓婚_{ topic}");
-        //                }
-        //            }
-        //        };
-
-        //        gateway.Actions += action;
-        //        System.Console.WriteLine("ZbGw/GetPanId_Actions 鍚姩" + "_" + System.DateTime.Now.ToString());
-
-        //        var jObject = new JObject { { "Cluster_ID", 64512 }, { "Command", 12 } };
-        //         gateway.Send(("ZbGw/GetPanId"), Common.SecuritySet.Encryption((jObject.ToString())));
-
-        //        var dateTime = DateTime.Now;
-        //        while ((DateTime.Now - dateTime).TotalMilliseconds < 1000)
-        //        {
-        //            await System.Threading.Tasks.Task.Delay(10);
-        //            if (d != null)
-        //            {
-        //                break;
-        //            }
-        //        }
-        //        if ((DateTime.Now - dateTime).TotalMilliseconds > 1000)
-        //        {
-        //            d = new GetPanIdResponData { errorMessageBase = " 鍥炲瓒呮椂锛岃閲嶆柊鎿嶄綔" };
-        //        }
-        //        gateway.Actions -= action;
-        //        System.Console.WriteLine("ZbGw/GetPanId_Actions 閫�鍑�" + "_" + System.DateTime.Now.ToString());
-
-        //        return d;
-        //    });
-        //}
-
-        ///// <summary>
-        ///// 璇诲彇褰撳墠灞�鍩熺綉鐨凱ANID,缃戝叧鍙嶉鍏蜂綋淇℃伅
-        ///// </summary>
-        //public GetPanIdResponData getPanIdResponData;
-        ///// <summary>
-        ///// 璇诲彇褰撳墠灞�鍩熺綉鐨凱ANID,缃戝叧鍙嶉鍏蜂綋淇℃伅
-        ///// </summary>
-        //[System.Serializable]
-        //public class GetPanIdResponData
-        //{
-        //    /// <summary>
-        //    /// 閿欒淇℃伅
-        //    /// </summary>
-        //    public string errorMessageBase;
-        //    /// <summary>
-        //    /// 缃戝叧淇℃伅閿欒鍙嶉
-        //    /// <para>褰撶綉鍏虫帴鏀跺埌瀹㈡埛绔俊鎭悗锛屽嚭鐜颁互涓嬪紓甯告儏鍐靛皢鍙嶉閿欒銆�</para>
-        //    /// </summary>
-        //    public ErrorResponData errorResponData;
-        //    /// <summary>
-        //    /// 褰撳墠缃戠粶鐨凱ANID
-        //    /// </summary>
-        //    public int panID = 999;
-        //}
-
-        //#endregion
-
-        //#region 璇诲彇鍗忚皟鍣∕AC鍦板潃.
-        /////<summary >
-        ///// 璇诲彇鍗忚皟鍣∕AC鍦板潃
-        ///// </summary>
-        //public static async System.Threading.Tasks.Task<GetMacResponData> ReadMacAsync(ZigBee.Device.ZbGateway gateway)
-        //{
-        //    if (gateway == null)
-        //    {
-        //        return null;
-        //    }
-        //    return await System.Threading.Tasks.Task.Run(async () =>
-        //    {
-        //        GetMacResponData d = null;
-        //        Action<string, string> action = (topic, message) =>
-        //        {
-        //            var gatewayID = topic.Split('/')[0];
-        //            var jobject = Newtonsoft.Json.Linq.JObject.Parse(message);
-
-        //            if (topic == gatewayID + "/" + "Error_Respon")
-        //            {
-        //                var gatewayTemp = new ZbGateway() { Time = jobject.Value<int>("Time"), DataID = jobject.Value<int>("Data_ID"), CurrentGateWayId = gateway.getGatewayBaseInfo.gwID };
-        //                var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<ZbGateway.ErrorResponData>(jobject["Data"].ToString());
-
-        //                if (temp == null)
-        //                {
-        //                    d = new GetMacResponData { errorMessageBase = "缃戝叧閿欒鍥炲锛屼笖鏁版嵁鏄┖" };
-        //                }
-        //                else
-        //                {
-        //                    d = new GetMacResponData { errorResponData = temp, errorMessageBase = ErrorMess(temp.Error) };
-        //                }
-        //            }
-
-        //            if (topic == gatewayID + "/" + "ZbGw/GetMac_Respon")
-        //            {
-        //                var gatewayTemp = new ZbGateway() { DataID = jobject.Value<int>("Data_ID") };
-        //                var tempData = Newtonsoft.Json.JsonConvert.DeserializeObject<MacAddrData>(jobject["Data"].ToString());
-
-        //                if (tempData == null)
-        //                {
-        //                    d = new GetMacResponData { errorMessageBase = "缃戝叧杩斿洖鐨勬暟鎹负绌�" };
-        //                }
-        //                else
-        //                {
-        //                    d = new GetMacResponData { macAddrData = tempData };
-        //                    DebugPrintLog($"UI鏀跺埌閫氱煡鍚庣殑涓婚_{ topic}");
-        //                }
-        //            }
-        //        };
-
-        //        gateway.Actions += action;
-        //        var jObject = new JObject { { "Cluster_ID", 64512 }, { "Command", 13 } };
-        //         gateway.Send(("ZbGw/GetMac"), Common.SecuritySet.Encryption((jObject.ToString())));
-
-        //        var dateTime = DateTime.Now;
-        //        while ((DateTime.Now - dateTime).TotalMilliseconds < 1000)
-        //        {
-        //            await System.Threading.Tasks.Task.Delay(10);
-        //            if (d != null)
-        //            {
-        //                break;
-        //            }
-        //        }
-        //        if ((DateTime.Now - dateTime).TotalMilliseconds > 10000)
-        //        {
-        //            d = new GetMacResponData { errorMessageBase = " 鍥炲瓒呮椂锛岃閲嶆柊鎿嶄綔" };
-        //        }
-        //        gateway.Actions -= action;
-        //        return d;
-        //    });
-        //}
-
         /// <summary>
         /// 璇诲彇鍗忚皟鍣∕AC鍦板潃,缃戝叧鍙嶉鍏蜂綋淇℃伅
         /// </summary>
@@ -1686,108 +929,6 @@
 
         //#endregion
 
-        #region 娣诲姞Install Codes鐮�
-        /////<summary >
-        /////娣诲姞Install Codes鐮�
-        ///// <para>installCode:InstallCode鐮�  36涓瓧绗�</para>
-        ///// <para>installCodeAddr:InstallCodes鐮佽澶囩殑mac鍦板潃16涓瓧绗�</para>
-        ///// </summary>
-        //public static async System.Threading.Tasks.Task<InstallCodeResponData> InstallCodeAsync(ZigBee.Device.ZbGateway gateway, string installCode, string installCodeAddr)
-        //{
-        //    if (gateway == null)
-        //    {
-        //        return null;
-        //    }
-        //    return await System.Threading.Tasks.Task.Run(async () =>
-        //    {
-        //        var d = new InstallCodeResponData { };
-        //        Action<string, string> action = (topic, message) =>
-        //        {
-        //            var gatewayID = topic.Split('/')[0];
-        //            var jobject = Newtonsoft.Json.Linq.JObject.Parse(message);
-
-        //            if (topic == gatewayID + "/" + "Error_Respon")
-        //            {
-        //                var gatewayTemp = new ZbGateway() { Time = jobject.Value<int>("Time"), DataID = jobject.Value<int>("Data_ID"), CurrentGateWayId = gateway.getGatewayBaseInfo.gwID };
-        //                var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<ZbGateway.ErrorResponData>(jobject["Data"].ToString());
-
-        //                if (temp == null)
-        //                {
-        //                    d.errorMessageBase = "缃戝叧閿欒鍥炲锛屼笖鏁版嵁鏄┖";
-        //                }
-        //                else
-        //                {
-        //                    d.errorResponData = temp;
-        //                    d.errorMessageBase = ErrorMess(temp.Error);
-        //                }
-        //            }
-
-        //            if (topic == gatewayID + "/" + "ZbGw/InstallCode_Respon")
-        //            {
-        //                var gatewayTemp = new ZbGateway() { DataID = jobject.Value<int>("Data_ID") };
-        //                var code = Newtonsoft.Json.JsonConvert.DeserializeObject<int>(jobject["Data"].ToString());
-
-        //                if (code == null)
-        //                {
-        //                    d.errorMessageBase = "缃戝叧杩斿洖鐨勬暟鎹负绌�";
-        //                }
-        //                else
-        //                {
-        //                    d.Status = code;
-        //                    DebugPrintLog($"UI鏀跺埌閫氱煡鍚庣殑涓婚_{ topic}");
-        //                }
-        //            }
-        //        };
-
-        //        gateway.Actions += action;
-        //        var jObject = new JObject { { "Cluster_ID", 64512 }, { "Command", 13 } };
-        //         gateway.Send(("ZbGw/GetMac"), Common.SecuritySet.Encryption((jObject.ToString())));
-
-        //        var dateTime = DateTime.Now;
-        //        while ((DateTime.Now - dateTime).TotalMilliseconds < 1000)
-        //        {
-        //            await System.Threading.Tasks.Task.Delay(10);
-        //            //if (d.Status != 999)
-        //            //{
-        //            //    break;
-        //            //}
-        //        }
-        //        if ((DateTime.Now - dateTime).TotalMilliseconds > 1000)
-        //        {
-        //            d.errorMessageBase = " 鍥炲瓒呮椂锛岃閲嶆柊鎿嶄綔";
-        //        }
-        //        gateway.Actions -= action;
-        //        return d;
-        //    });
-        //}
-
-        /// <summary>
-        /// 娣诲姞Install Codes鐮�,缃戝叧鍙嶉鍏蜂綋淇℃伅
-        /// </summary>
-        public InstallCodeResponData installCodeResponData;
-        /// <summary>
-        /// 娣诲姞Install Codes鐮�,缃戝叧鍙嶉鍏蜂綋淇℃伅
-        /// </summary>
-        [System.Serializable]
-        public class InstallCodeResponData
-        {
-            /// <summary>
-            /// 閿欒淇℃伅
-            /// </summary>
-            public string errorMessageBase;
-            /// <summary>
-            /// 缃戝叧淇℃伅閿欒鍙嶉
-            /// <para>褰撶綉鍏虫帴鏀跺埌瀹㈡埛绔俊鎭悗锛屽嚭鐜颁互涓嬪紓甯告儏鍐靛皢鍙嶉閿欒銆�</para>
-            /// </summary>
-            public ErrorResponData errorResponData;
-            /// <summary>
-            /// 0:鎴愬姛锛�1:澶辫触
-            /// </summary>
-            public int Status = 999;
-        }
-
-        #endregion
-
         #region 鍚敤鎴栧叧闂�忎紶鏁版嵁涓婁紶鎺ュ彛
         /// <summary>
         /// 閫忎紶鏁版嵁涓婁紶鎺ュ彛,缃戝叧鍙嶉淇℃伅
@@ -1814,134 +955,6 @@
             public string passData;
         }
         #endregion
-
-        //#region 鍗忚皟鍣ㄩ�氱敤鍔熻兘鎿嶄綔鎺ュ彛
-        ///// <summary>
-        ///// 鍗忚皟鍣ㄩ�氱敤鍔熻兘鎿嶄綔鎺ュ彛
-        ///// </summary>
-        ///// <returns>The or get all data async.</returns>
-        ///// <param name="gateway">Gateway.</param>
-        ///// <param name="commandID">Command identifier.</param>
-        ///// <param name="payload">Payload.</param>
-        //public static async System.Threading.Tasks.Task<SetOrGetAllData> SetOrGetAllDataAsync(ZigBee.Device.ZbGateway gateway, int commandID, string payload)
-        //{
-        //    if (gateway == null)
-        //    {
-        //        return null;
-        //    }
-        //    return await System.Threading.Tasks.Task.Run(async () =>
-        //    {
-        //        var d = new SetOrGetAllData { };
-        //        Action<string, string> action = (topic, message) =>
-        //        {
-        //            var gatewayID = topic.Split('/')[0];
-        //            var jobject = Newtonsoft.Json.Linq.JObject.Parse(message);
-
-        //            if (topic == gatewayID + "/" + "Error_Respon")
-        //            {
-        //                var gatewayTemp = new ZbGateway() { DeviceID = jobject.Value<int>("Device_ID"), DeviceAddr = jobject.Value<string>("DeviceAddr"), DeviceEpoint = jobject.Value<int>("Epoint"), DataID = jobject.Value<int>("Data_ID"), CurrentGateWayId = gateway.getGatewayBaseInfo.gwID };
-        //                var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<ZbGateway.ErrorResponData>(jobject["Data"].ToString());
-
-        //                if (temp == null)
-        //                {
-        //                    d.errorMessageBase = "缃戝叧閿欒鍥炲锛屼笖鏁版嵁鏄┖";
-        //                }
-        //                else
-        //                {
-        //                    d.errorResponData = temp;
-        //                    d.errorMessageBase = ErrorMess(temp.Error);
-        //                }
-        //            }
-
-        //            if (topic == gatewayID + "/" + "ZbGw/SetOrGetData_Respon")
-        //            {
-        //                var gatewayTemp = new ZbGateway() { DataID = jobject.Value<int>("Data_ID"), CurrentGateWayId = gateway.getGatewayBaseInfo.gwID };
-        //                var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<SetOrGetData>(jobject["Data"].ToString());
-
-        //                if (gatewayTemp.getGwVersion == null)
-        //                {
-        //                    d.errorMessageBase = "缃戝叧杩斿洖鐨勬暟鎹负绌�";
-        //                }
-        //                else
-        //                {
-        //                    d.setOrGetData = temp;
-        //                    DebugPrintLog($"UI鏀跺埌閫氱煡鍚庣殑涓婚_{ topic}");
-        //                }
-        //            }
-        //        };
-        //        gateway.Actions += action;
-        //        System.Console.WriteLine("ZbDataPassthrough_Actions 鍚姩" + "_" + System.DateTime.Now.ToString());
-
-        //        var jObject = new JObject { { "Cluster_ID", 64512 }, { "Command", 2 } };
-        //        var data = new JObject { { "Command_ID", commandID }, { "Payload", payload } };
-        //        jObject.Add("Data", data);
-        //         gateway.Send("ZbGw/SetOrGetData", Common.SecuritySet.Encryption(jObject.ToString()));
-        //        var dateTime = DateTime.Now;
-        //        while ((DateTime.Now - dateTime).TotalMilliseconds < 1000)
-        //        {
-        //            await System.Threading.Tasks.Task.Delay(10);
-        //            if (d.setOrGetData != null)
-        //            {
-        //                break;
-        //            }
-        //        }
-        //        if ((DateTime.Now - dateTime).TotalMilliseconds > 10000)
-        //        {
-        //            d.errorMessageBase = " 鍥炲瓒呮椂锛岃閲嶆柊鎿嶄綔";
-        //        }
-        //        gateway.Actions -= action;
-        //        System.Console.WriteLine("GetGwVersionData_Actions 閫�鍑�" + System.DateTime.Now.ToString());
-
-        //        return d;
-        //    });
-        //}
-
-        ///// <summary>
-        ///// BDB鎺ュ彛,缃戝叧鍙嶉淇℃伅
-        ///// </summary>
-        //public SetOrGetAllData setOrGetAllData;
-        ///// <summary>
-        ///// BDB鎺ュ彛,缃戝叧鍙嶉淇℃伅
-        ///// </summary>
-        //[System.Serializable]
-        //public class SetOrGetAllData
-        //{
-        //    /// <summary>
-        //    /// 閿欒淇℃伅
-        //    /// </summary>
-        //    public string errorMessageBase;
-        //    /// <summary>
-        //    /// 缃戝叧淇℃伅閿欒鍙嶉
-        //    /// <para>褰撶綉鍏虫帴鏀跺埌瀹㈡埛绔俊鎭悗锛屽嚭鐜颁互涓嬪紓甯告儏鍐靛皢鍙嶉閿欒銆�</para>
-        //    /// </summary>
-        //    public ErrorResponData errorResponData;
-        //    /// <summary>
-        //    /// BDB鏁版嵁
-        //    /// </summary>
-        //    public SetOrGetData setOrGetData;
-
-        //}
-
-        ///// <summary>
-        ///// BDB鏁版嵁
-        ///// </summary>
-        //public SetOrGetData setOrGetData;
-        ///// <summary>
-        ///// BDB鏁版嵁
-        ///// </summary>
-        //[System.Serializable]
-        //public class SetOrGetData
-        //{
-        //    /// <summary>
-        //    /// 鍗忚皟鍣ㄦ寚浠ょ殑command_ID銆傚搴斻�婂崗璋冨櫒涓插彛閫氫俊鍗忚瑙勮寖銆嬬2绔犺妭鎸囦护鐨刢ommand_ID
-        //    /// </summary>
-        //    public int commandID;
-        //    /// <summary>
-        //    /// 宸茬粡杞崲鎴愬瓧绗︽牸寮忕殑16杩涘埗鐨刣ata鏁版嵁銆傚搴斻�婂崗璋冨櫒涓插彛閫氫俊鍗忚瑙勮寖銆嬬2绔犺妭鎸囦护鐨勨�滄暟鎹�濆唴瀹�
-        //    /// </summary>
-        //    public string payload;
-        //}
-        //#endregion
 
         #region 瀹㈡埛绔彂閫佹枃浠舵祦鍒扮綉鍏�
         /// <summary>
diff --git a/ZigbeeApp/Shared/R.cs b/ZigbeeApp/Shared/R.cs
index aa36b64..11d8f17 100755
--- a/ZigbeeApp/Shared/R.cs
+++ b/ZigbeeApp/Shared/R.cs
@@ -558,6 +558,10 @@
         /// 鎵嬪姩
         /// </summary>
         public const int Manual = 311;
+        /// <summary>
+        /// 鑳屽厜鐏鑹�
+        /// </summary>
+        public const int BackgroundLightColor = 312;
 
         public readonly static int cancel = 5097;
         public readonly static int confrim = 5098;
@@ -822,7 +826,15 @@
         public readonly static int numberSone = 5387;
         public readonly static int openAutomationSone = 5388;
         public readonly static int timeSetSone= 5389;
-
+        public readonly static int invalidSetting = 5390;
+        public readonly static int hour = 5391;
+        public readonly static int lockOpen = 5392;
+        public readonly static int setDoorLockOpen = 5393;
+        public readonly static int less = 5394;
+        public readonly static int more = 5395;
+        public readonly static int or = 5396;
+        public readonly static int timeNull = 5397;
+        public readonly static int numberInput = 5398;
 
         #region 鐧诲綍娉ㄥ唽
         /// <summary>
@@ -5961,6 +5973,10 @@
         /// 绐楀笜闈㈡澘 -> 闀挎寜闈㈡澘宸︿笂瑙掓寜閿紝鎵�鏈夋寜閿畕0}鎸囩ず鐏寒璧凤紝鍒欓厤缃戞垚鍔� 
         /// </summary>
         public const int uAddCurtaunPanelMsg = 21022;
+        /// <summary>
+        /// 鍚搁《鐕冩皵浼犳劅鍣� -> 闀挎寜鍥剧ず鎸夐敭5绉掍互涓婏紝缁胯壊蹇棯{0}杩涘叆閰嶇綉鐘舵�侊紝缁跨伅甯镐寒鍒欏叆缃戞垚鍔�
+        /// </summary>
+        public const int uAddSensorCeilingGasMsg = 21023;
 
 
         //鈽呪槄鈽呪槄涓嬮潰杩欎簺鏄ā鍧桰D鐨勫畼鏂瑰悕瀛�,浠�30000寮�濮嬧槄鈽呪槄鈽�
@@ -6120,6 +6136,10 @@
         /// 闀滃儚ID涓�2310鐨勮澶囩殑榛樿鍚嶅瓧锛氭柟鎮︽柊椋庡皬妯″潡
         /// </summary>
         public const int uDeviceModelId2310 = 30038;
+        /// <summary>
+        /// 闀滃儚ID涓�1306鐨勮澶囩殑榛樿鍚嶅瓧锛歓igbee鍚搁《鐕冩皵浼犳劅鍣�
+        /// </summary>
+        public const int uDeviceModelId1306 = 30039;
 
         //鈽呪槄鈽呪槄涓嬮潰杩欎簺鏄澶囨墍灞炵绫荤殑缈昏瘧鍚嶅瓧,浠�40000寮�濮嬧槄鈽呪槄鈽�
         /// <summary>
@@ -6303,5 +6323,9 @@
         /// 鏅鸿兘绌哄紑
         /// </summary>
         public const int uDeviceDirectionName25 = 70024;
+        /// <summary>
+        /// 鍚搁《鐕冩皵浼犳劅鍣�
+        /// </summary>
+        public const int uDeviceDirectionName26 = 70025;
     }
 }
diff --git a/ZigbeeApp/Shared/Shared.projitems b/ZigbeeApp/Shared/Shared.projitems
index f0009d2..caac832 100755
--- a/ZigbeeApp/Shared/Shared.projitems
+++ b/ZigbeeApp/Shared/Shared.projitems
@@ -42,6 +42,7 @@
     <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\Logic\LogicView\mFunView.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\Logic\LogicView\SaveView.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\Logic\LogicView\SelectedDeviceView.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\Logic\LogicView\TipView.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\Logic\LogicView\TopView.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\Logic\LogicView\TypeView.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\Logic\Method.cs" />
@@ -96,6 +97,7 @@
     <Compile Include="$(MSBuildThisFileDirectory)Phone\MainPage\ControlForm\DeviceCurtainDetailCardForm.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Phone\MainPage\ControlForm\DeviceFreshAirDetailCardForm.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Phone\MainPage\ControlForm\DeviceRelayDetailCardForm.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Phone\MainPage\Controls\DeviceCard\DeviceFreshAirCardControl.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Phone\MainPage\Controls\DeviceFunctionUnallocatedControl.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Phone\MainPage\Controls\DeviceSelectUnallocatedControl.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Phone\MainPage\SelectLocalDeviceImageForm.cs" />
@@ -185,6 +187,7 @@
     <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Device\Direction\PanelFangyueTwoButtonDirectionForm.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Device\Direction\RepeaterZigbeeDirectionForm.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Device\Direction\SensorCarbonMonoxideDirectionForm.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Device\Direction\SensorCeilingGasDirectionForm.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Device\Direction\SensorDoorWindowDirectionForm.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Device\Direction\SensorFireDirectionForm.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Device\Direction\SensorInfraredDirectionForm.cs" />

--
Gitblit v1.8.0