From 6fa9d69da922c8049f5acfcbb9ce9fd26811024c Mon Sep 17 00:00:00 2001
From: xm <1271024303@qq.com>
Date: 星期四, 16 四月 2020 17:10:57 +0800
Subject: [PATCH] 请合并代码

---
 ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/ChooseKeyModePage.cs |   95 ++++++++++++++++++++++++++---------------------
 1 files changed, 52 insertions(+), 43 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/ChooseKeyModePage.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/ChooseKeyModePage.cs
old mode 100755
new mode 100644
index 953f73e..2028413
--- a/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/ChooseKeyModePage.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/ChooseKeyModePage.cs
@@ -5,19 +5,8 @@
 using static ZigBee.Device.BindObj;
 namespace Shared.Phone.UserCenter.DeviceBind
 {
-    public class ChooseKeyModePage : BindCommonLayout, ZigBee.Common.IStatus
+    public class ChooseKeyModePage : BindCommonLayout
     {
-        /// <summary>
-        /// 鎸夐敭妯″紡鎺ユ敹
-        /// </summary>
-        /// <param name="common">Common.</param>
-        public void Changed(CommonDevice common)
-        {
-            Shared.Application.RunOnMainThread(() =>
-            {
-            });
-        }
-
         /// 鏋勯�犲嚱鏁�
         /// </summary>
         /// <param name="doorLock"></param>
@@ -29,23 +18,46 @@
             this.targetList = targetSelectList;
         }
 
-        #region 鈼� 鍙橀噺鐢虫槑__________________________
-        ZigBee.Device.Panel currentKey;//褰撳墠鎸夐敭
-        //鏄剧ず琚粦瀹氳澶囨垨鍦烘櫙鐨剉iew
-        VerticalScrolViewLayout midVerticalScrolViewLayout;//涓儴鍒锋柊鍒楄〃
-        HorizontalScrolViewLayout btnHorizontalScrolViewLayout;//鎴块棿鍒楄〃宸﹀彸婊戝姩甯冨眬
+        #region 鍙橀噺鐢虫槑
+        /// <summary>
+        /// 褰撳墠鎸夐敭
+        /// </summary>
+        ZigBee.Device.Panel currentKey;
+        /// <summary>
+        /// 涓儴鍒锋柊鍒楄〃
+        /// </summary>
+        VerticalScrolViewLayout midVerticalScrolViewLayout;
+        /// <summary>
+        /// 鎴块棿鍒楄〃宸﹀彸婊戝姩甯冨眬
+        /// </summary>
+        HorizontalScrolViewLayout btnHorizontalScrolViewLayout;
         /// <summary>
         /// 鎸夐敭閰嶇疆鐨勭洰鏍囧垪琛�
         /// </summary>
-        List<CommonDevice> targetList = new List<CommonDevice>();//鏈湴涓存椂閫変腑鍒楄〃
+        List<CommonDevice> targetList = new List<CommonDevice>();
         /// <summary>
-        /// 鏂扮殑鎸夐敭閰嶇疆鐩爣鍒楄〃涓紝鐩爣瀹為檯瀛樺湪鎸夐敭涓紝姝ゆ椂瑕佸垹鎺夌殑鏁版嵁
+        /// 鏈湴鏃х殑閫変腑鍒楄〃
         /// </summary>
-        List<CommonDevice> oldTargetList = new List<CommonDevice>();//鏈湴鏃х殑閫変腑鍒楄〃
-        int currentClusterID = 6;//褰撳墠绨嘔D
-        public Action<List<BindListResponseObj>> action;//鍥炶皟缁戝畾鐩爣椤甸潰鍒锋柊
-        int currentModeID = 0;//褰撳墠妯″紡ID
-        string curDeviceBindType = "";//褰撳墠璁惧缁戝畾绫诲瀷
+        List<CommonDevice> oldTargetList = new List<CommonDevice>();
+        /// <summary>
+        /// 褰撳墠绨嘔D
+        /// </summary>
+        int currentClusterID = 6;
+        /// <summary>
+        /// 鍥炶皟缁戝畾鐩爣椤甸潰鍒锋柊
+        /// </summary>
+        public Action<List<BindListResponseObj>> action;
+        /// <summary>
+        /// 褰撳墠妯″紡ID
+        /// </summary>
+        int currentModeID = 0;
+        /// <summary>
+        /// 褰撳墠璁惧缁戝畾绫诲瀷
+        /// </summary>
+        string curDeviceBindType = "";
+        /// <summary>
+        /// 绫诲瀷鐨勫叿浣撴ā寮忓垪琛�
+        /// </summary>
         List<int> typeDetailModeList = new List<int> { };
         #endregion
 
@@ -232,7 +244,7 @@
 
                             var dev = new AddedDeviceBindResponseAllData();
                             dev = await currentKey.AddDeviceBindAsync(addBindeDev);
-                            if (dev.addedDeviceBindResponseData == null)
+                            if (dev != null || dev.addedDeviceBindResponseData == null)
                             {
                                 Application.RunOnMainThread(() =>
                                 {
@@ -578,6 +590,9 @@
             });
         }
 
+        /// <summary>
+        /// 娣诲姞寮�鍏虫ā寮�
+        /// </summary>
         async private void AddSwitchMode()
         {
             if (typeDetailModeList == null)
@@ -619,8 +634,8 @@
 
                 var btnChoose = new Button()
                 {
-                    Width = Application.GetRealWidth(60),
-                    Height = Application.GetRealHeight(60),
+                    Width = Application.GetMinReal(60),
+                    Height = Application.GetMinReal(60),
                     X = Application.GetRealWidth(861 + 81),
                     Y = Application.GetRealHeight(35),
                     SelectedImagePath = "DoorLock/SelectedIcon.png",
@@ -723,6 +738,9 @@
             }
         }
 
+        /// <summary>
+        /// 娣诲姞璋冨厜妯″紡
+        /// </summary>
         async private void AddDimmerMode()
         {
             if (typeDetailModeList == null)
@@ -775,8 +793,8 @@
 
                 var btnChoose = new Button()
                 {
-                    Width = Application.GetRealWidth(60),
-                    Height = Application.GetRealHeight(60),
+                    Width = Application.GetMinReal(60),
+                    Height = Application.GetMinReal(60),
                     X = Application.GetRealWidth(861 + 81),
                     Y = Application.GetRealHeight(35),
                     SelectedImagePath = "DoorLock/SelectedIcon.png",
@@ -905,6 +923,9 @@
             }
         }
 
+        /// <summary>
+        /// 娣诲姞绐楀笜妯″紡
+        /// </summary>
         async private void AddCurtainMode()
         {
             if (typeDetailModeList == null)
@@ -946,8 +967,8 @@
 
                 var btnChoose = new Button()
                 {
-                    Width = Application.GetRealWidth(60),
-                    Height = Application.GetRealHeight(60),
+                    Width = Application.GetMinReal(60),
+                    Height = Application.GetMinReal(60),
                     X = Application.GetRealWidth(861 + 81),
                     Y = Application.GetRealHeight(35),
                     SelectedImagePath = "DoorLock/SelectedIcon.png",
@@ -1074,18 +1095,6 @@
                 btnChoose.MouseUpEventHandler += hander;
                 i++;
             }
-        }
-
-        public void DeviceInfoChange(CommonDevice common, string typeTag)
-        {
-        }
-
-        public void ChangedILogicStatus(ZigBee.Device.Logic logic)
-        {
-        }
-
-        public void ChangedISceneStatus(Scene scene)
-        {
         }
     }
 }

--
Gitblit v1.8.0