WJC
2019-11-21 6a518151a9a8efb62c768198aebe4a0ff9ce77f2
ZigbeeApp/Shared/Phone/Device/Logic/MemberList.cs
@@ -15,7 +15,7 @@
        }
        Button selectedIcon = new Button();
        public static bool edit=false;
        VerticalScrolViewLayout middle;
        public async void Show(CommonDevice common, Dictionary<string, string> editdeviceConditionsInfo=null)
        {
@@ -73,7 +73,7 @@
            };
            #endregion
            var middle = new VerticalScrolViewLayout
            middle = new VerticalScrolViewLayout
            {
                Y = topRowLayout.Bottom,
                Height = Application.GetRealHeight(1920 - 184),
@@ -94,13 +94,21 @@
                }
            }
            CommonPage.Loading.Start();
            if (!d)
            {
                var allMemberslist = await Send.AllMembers(common.DeviceAddr);
                Send.LockList.AddRange(allMemberslist);
            }
            UserList(macport, common, editdeviceConditionsInfo);
            CommonPage.Loading.Hide();
        }
        /// <summary>
        /// 成员列表的方法
        /// </summary>
        /// <param name="macport"></param>
        void UserList(string macport, CommonDevice common, Dictionary<string, string> editdeviceConditionsInfo)
        {
       
            foreach (var user in Send.LockList)
            {
@@ -147,6 +155,24 @@
                userRow.AddChidren(userBack);
                EventHandler<MouseEventArgs> useridclick = (sender, e) =>
                {
                    User(user, common, editdeviceConditionsInfo);
                };
                userBtn.MouseUpEventHandler += useridclick;
                userBack.MouseUpEventHandler += useridclick;
                userFramelayout.MouseUpEventHandler += useridclick;
                userRow.MouseUpEventHandler += useridclick;
            }
        }
        /// <summary>
        /// 当前成员信息的方法
        /// </summary>
        /// <param name="user"></param>
        void User(Send.MembershipIfon user, CommonDevice common, Dictionary<string, string> editdeviceConditionsInfo)
                {
                    var flMain = new FrameLayout { BackgroundColor = ZigbeeColor.Current.LogicViewBackgroundColor };
                    this.AddChidren(flMain);
@@ -305,8 +331,6 @@
                        }
                    }
                    Btncomplete.MouseUpEventHandler += (sender3, e3) =>
                    {
                        string userIdstr = "", openModestr="";
@@ -396,14 +420,7 @@
                    };
                };
                userBtn.MouseUpEventHandler += useridclick;
                userBack.MouseUpEventHandler += useridclick;
                userFramelayout.MouseUpEventHandler += useridclick;
                userRow.MouseUpEventHandler += useridclick;
            }
        }
    }
}