From d8713d720fe7bc6d5dec99fa238397829b715aff Mon Sep 17 00:00:00 2001
From: WJC <wjc@hdlchina.com.cn>
Date: 星期一, 18 十一月 2019 15:18:28 +0800
Subject: [PATCH] 2019-11-18-1

---
 ZigbeeApp/Shared/Phone/Device/Logic/MemberList.cs |   81 ++++++++++++++++++++++++++--------------
 1 files changed, 52 insertions(+), 29 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/MemberList.cs b/ZigbeeApp/Shared/Phone/Device/Logic/MemberList.cs
index 9077c94..79df66a 100644
--- a/ZigbeeApp/Shared/Phone/Device/Logic/MemberList.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Logic/MemberList.cs
@@ -14,7 +14,6 @@
             Tag = "Logic";
         }
         Button selectedIcon = new Button();
-        public static Action action;
         public static bool edit=false;
       
 
@@ -35,7 +34,7 @@
 
             var titleName = new Button
             {
-                TextSize = 16,
+                TextSize = 17,
                 TextColor = ZigbeeColor.Current.LogicTextBlackColor,
                 TextAlignment = TextAlignment.CenterLeft,
                 X = Application.GetRealWidth(176),
@@ -56,7 +55,6 @@
             clickBtn.MouseDownEventHandler += (sender, e) =>
             {
                 RemoveFromParent();
-                action();
             };
 
             var back = new Button
@@ -82,19 +80,39 @@
                 BackgroundColor = ZigbeeColor.Current.LogicMiddleBackgroundColor,
             };
             this.AddChidren(middle);
-            if (Send.UserList.Count == 0)
+
+
+            bool d = false;
+            string macport = common.DeviceAddr + "_" + common.DeviceEpoint.ToString();
+            for (int i = 0; i < Send.LockList.Count; i++)
+            {
+                if (Send.LockList[i].DoorLockMacPort == macport)
+                {
+                    ///宸茬粡瀛樺湪璇ラ棬閿佷俊鎭�
+                    d = true;
+                    break;
+                }
+
+            }
+
+            if (!d)
             {
                 var allMemberslist = await Send.AllMembers(common.DeviceAddr);
-                Send.UserList.AddRange(allMemberslist);
+                Send.LockList.AddRange(allMemberslist);
             }
-            foreach (var user in Send.UserList)
-            {
 
-                var userFramelayout = new RowLayout
+       
+            foreach (var user in Send.LockList)
+            {
+                if (user.DoorLockMacPort != macport)
+                {
+                    continue;
+                }
+                var userFramelayout = new FrameLayout
                 {
                     Height = Application.GetRealHeight(160),
                     BackgroundColor = ZigbeeColor.Current.LogicBlankBackgroundColor,
-                    LineColor = ZigbeeColor.Current.LogicBlankBackgroundColor,
+                   // LineColor = ZigbeeColor.Current.LogicBlankBackgroundColor,
                 };
                 middle.AddChidren(userFramelayout);
 
@@ -111,9 +129,10 @@
 
                 var userBtn = new Button
                 {
-                    Text = user.MembershipName,
+                    Text = user.UserName,
                     TextAlignment = TextAlignment.CenterLeft,
                     TextColor = ZigbeeColor.Current.LogicTextBlackColor,
+                    TextSize = 14,
                 };
                 userRow.AddChidren(userBtn);
 
@@ -171,6 +190,7 @@
                         Width = Application.GetRealWidth(200),
                         X = Application.GetRealWidth(80),
                         TextAlignment = TextAlignment.CenterLeft,
+                        TextSize = 14,
                     };
                     lockRow.AddChidren(Btncancel);
                     Btncancel.MouseUpEventHandler += (sender16, e16) =>
@@ -188,7 +208,7 @@
                         TextAlignment = TextAlignment.Center,
                         X = Btncancel.Right + Application.GetRealWidth(100),
                         TextSize = 16,
-                        Text = user.MembershipName,
+                        Text = user.UserName,
                     };
                     lockRow.AddChidren(Btntitle);
                     var Btncomplete = new Button
@@ -199,6 +219,7 @@
                         Width = Application.GetRealWidth(200),
                         TextAlignment = TextAlignment.CenterRight,
                         X = Btntitle.Right + Application.GetRealWidth(100),
+                        TextSize = 14,
 
                     };
                     lockRow.AddChidren(Btncomplete);
@@ -232,27 +253,29 @@
                             Width = Application.GetRealWidth(600),
                             TextAlignment = TextAlignment.CenterLeft,
                             TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor,
+                            Text= userifon.ModeName,
+                            TextSize = 14,
                         };
                         doorlockRow.AddChidren(doorlockBtn);
                         //(1鎸夐敭/3鍗�/15鎸囩汗)
-                        switch (userifon.OpenMode.ToString())
-                        {
-                            case "0":
-                                {
-                                    doorlockBtn.Text = Language.StringByID(MyInternationalizationString.lockpassword);
-                                }
-                                break;
-                            case "3":
-                                {
-                                    doorlockBtn.Text = Language.StringByID(MyInternationalizationString.ic);
-                                }
-                                break;
-                            case "15":
-                                {
-                                    doorlockBtn.Text = Language.StringByID(MyInternationalizationString.fingerprint);
-                                }
-                                break;
-                        }
+                        //switch (userifon.OpenMode.ToString())
+                        //{
+                        //    case "0":
+                        //        {
+                        //            doorlockBtn.Text = Language.StringByID(MyInternationalizationString.lockpassword);
+                        //        }
+                        //        break;
+                        //    case "3":
+                        //        {
+                        //            doorlockBtn.Text = Language.StringByID(MyInternationalizationString.ic);
+                        //        }
+                        //        break;
+                        //    case "15":
+                        //        {
+                        //            doorlockBtn.Text = Language.StringByID(MyInternationalizationString.fingerprint);
+                        //        }
+                        //        break;
+                        //}
                         var doorlockSelected = new Button
                         {
                             X = Application.GetRealWidth(860),

--
Gitblit v1.8.0