From a2d26f15b940c853faaf6d6959b16a6d919cb800 Mon Sep 17 00:00:00 2001
From: xm <1271024303@qq.com>
Date: 星期三, 27 十一月 2019 19:26:30 +0800
Subject: [PATCH] 请合并最新的代码(完成门锁功能)

---
 ZigbeeApp/Shared/Phone/UserCenter/DoorLock/UndistributeDoorlockUserPage.cs |   63 +++++++++++--------------------
 1 files changed, 23 insertions(+), 40 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/UndistributeDoorlockUserPage.cs b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/UndistributeDoorlockUserPage.cs
index 5ea8018..a0f8318 100644
--- a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/UndistributeDoorlockUserPage.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/UndistributeDoorlockUserPage.cs
@@ -49,7 +49,7 @@
                 {
                     Application.RunOnMainThread(() =>
                     {
-                        RefreshList();
+                        TypeRefresh();
                         CommonPage.Loading.Hide();
                     });
                 }
@@ -580,27 +580,7 @@
                             var d = uList.Find((value) => { return value == curDoorLockUser.UserID; });
                             if (d != null)
                             {
-                                // 绫诲瀷鍖哄垎
-                                if (doorLock.currentUserDisplayMethod == Language.StringByID(R.MyInternationalizationString.AllMethod))
-                                {
-                                    RefreshList();
-                                }
-                                else if (doorLock.currentUserDisplayMethod == Language.StringByID(R.MyInternationalizationString.PasswordUnlock))
-                                {
-                                    RefreshList(0);
-                                }
-                                else if (doorLock.currentUserDisplayMethod == Language.StringByID(R.MyInternationalizationString.FingerprintUnlock))
-                                {
-                                    RefreshList(15);
-                                }
-                                else if (doorLock.currentUserDisplayMethod == Language.StringByID(R.MyInternationalizationString.ProximithCardUnlock))
-                                {
-                                    RefreshList(3);
-                                }
-                                else if (doorLock.currentUserDisplayMethod == "")
-                                {
-                                    RefreshList();
-                                }
+                                TypeRefresh();
                                 flMain.RemoveFromParent();
                                 bottomFrameLayout.RemoveAll();
                             }
@@ -705,24 +685,7 @@
                         doorLock.currentUserDisplayMethod = btnMethodText.Text;
                         btnAllMethod.IsSelected = true;
                         oldbuttonText.TextColor = Shared.Common.ZigbeeColor.Current.XMBlack;
-
-                        // 绫诲瀷鍖哄垎
-                        if (doorLock.currentUserDisplayMethod == Language.StringByID(R.MyInternationalizationString.AllMethod))
-                        {
-                            RefreshList();
-                        }
-                        if (doorLock.currentUserDisplayMethod == Language.StringByID(R.MyInternationalizationString.PasswordUnlock))
-                        {
-                            RefreshList(0);
-                        }
-                        if (doorLock.currentUserDisplayMethod == Language.StringByID(R.MyInternationalizationString.FingerprintUnlock))
-                        {
-                            RefreshList(15);
-                        }
-                        if (doorLock.currentUserDisplayMethod == Language.StringByID(R.MyInternationalizationString.ProximithCardUnlock))
-                        {
-                            RefreshList(3);
-                        }
+                        TypeRefresh();
                     }
                     dialog.Close();
                 };
@@ -792,6 +755,26 @@
             }
         }
 
+        //绫诲瀷鍖哄垎 
+        void TypeRefresh()
+        {
+            if (doorLock.currentUserDisplayMethod == Language.StringByID(R.MyInternationalizationString.PasswordUnlock))
+            {
+                RefreshList(0);
+            }
+            else if (doorLock.currentUserDisplayMethod == Language.StringByID(R.MyInternationalizationString.FingerprintUnlock))
+            {
+                RefreshList(15);
+            }
+            else if (doorLock.currentUserDisplayMethod == Language.StringByID(R.MyInternationalizationString.ProximithCardUnlock))
+            {
+                RefreshList(3);
+            }
+            else
+            {
+                RefreshList();
+            }
+        }
         #region 鈼� 鎺ュ彛瀹炵幇__________________________
         /// <summary>
         /// 澶勭悊鍙樺寲浜嬩欢 --灏嗗純鐢� 鏀圭敤DeviceInfoChange()

--
Gitblit v1.8.0