WJC
2019-11-04 e5f993f52e09eb46878baced83bb8492f147d41c
ZigbeeApp/Shared/Phone/UserCenter/Member/MemberListForm.cs
@@ -34,17 +34,17 @@
            titleIcon.InitControl();
            titleIcon.ButtonClickEvent += (sender, e) =>
            {
                var menuContr = new TopRightMenuControl(this, 2);
                var menuContr = new TopRightMenuControl(2, 449);
                //扫描二维码
                string msg1 = Language.StringByID(R.MyInternationalizationString.uScanQRcode);
                menuContr.AddRowMenu(msg1,"","", () =>
                menuContr.AddRowMenu(msg1, "Item/ScanQRcodeIcon.png", "Item/ScanQRcodeIconSelected.png", () =>
                {
                    var form = new AddMemberByIdForm();
                    form.AddForm();
                });
                //输入账号
                string msg2 = Language.StringByID(R.MyInternationalizationString.uInputAccount);
                menuContr.AddRowMenu(msg2,"","", () =>
                menuContr.AddRowMenu(msg2, "Item/InputAccountIcon.png", "Item/InputAccountIconSelected.png", () =>
                {
                    var form = new AddMemberByIdForm();
                    form.AddForm();
@@ -69,9 +69,6 @@
            //初始化列表控件
            this.InitMemberListControl();
            //总之先清空共享文件夹准没错
            HdlShardLogic.Current.ClearShardDirectory();
        }
        #endregion
@@ -132,15 +129,26 @@
            btnMenberTile.TextSize = 15;
            bodyFrameLayout.AddChidren(btnMenberTile);
            var frameBack = new FrameLayout();
            frameBack.Y = btnMenberTile.Bottom + Application.GetRealHeight(23);
            frameBack.Height = Application.GetRealHeight(11);
            frameBack.BackgroundColor = UserCenterColor.Current.White;
            bodyFrameLayout.AddChidren(frameBack);
            //添加可以向下滚动的控件
            listView = new VerticalListControl(12);
            listView.Height = bodyFrameLayout.Height - Application.GetRealHeight(567);
            listView.Height = bodyFrameLayout.Height - frameBack.Bottom;
            listView.BackgroundColor = UserCenterColor.Current.White;
            listView.Y = Application.GetRealHeight(567);
            listView.Y = frameBack.Bottom;
            bodyFrameLayout.AddChidren(listView);
            //初始化成员列表
            this.InitMemberList();
            HdlThreadLogic.Current.RunMainInThread(() =>
            {
                //总之先清空共享文件夹准没错
                HdlShardLogic.Current.ClearShardDirectory();
                //初始化成员列表
                this.InitMemberList();
            });
        }
        /// <summary>
@@ -184,12 +192,17 @@
            {
                if (listCheck.Contains(infoRes.DistributedMark) == true
                    || infoRes.Account == UserCenterResourse.UserInfo.Phone
                    || infoRes.Account == UserCenterResourse.UserInfo.Email
                    || infoRes.AccountType != 0)
                    || infoRes.Account == UserCenterResourse.UserInfo.Email)
                {
                    //如果是它自己的话,或者权限等级比他高的,不显示
                    //如果是它自己的话,不显示
                    continue;
                }
                if (UserCenterResourse.UserInfo.AuthorityNo != 1 && infoRes.AccountType != 0)
                {
                    //不能够获取权限等级比他高的(主人自己可以无视这个判断)
                    continue;
                }
                listCheck.Add(infoRes.DistributedMark);
                //添加成员信息的缓存
                UserCenterResourse.ListMemberInfo.Add(infoRes);
@@ -224,13 +237,7 @@
                this.AddRowLayout(listNewInfo[i], i != count);
            }
            //调整列表控件的高度
            var realHeight = listNewInfo.Count * listView.GetChildren(listView.ChildrenCount - 1).Height;
            realHeight += Application.GetRealHeight(23) - listView.rowSpace + Application.GetRealHeight(23);
            if (realHeight < listView.Height)
            {
                //缩小控件高度
                listView.Height = realHeight;
            }
            listView.AdjustRealHeight(Application.GetRealHeight(23));
        }
        #endregion
@@ -244,16 +251,6 @@
        ///  <param name="addLine">addLine</param>
        private void AddRowLayout(MemberInfoRes info, bool addLine)
        {
            if (listView.ChildrenCount == 0)
            {
                //塞一个空白的进去占空间
                var rowTemp = new FrameRowControl();
                rowTemp.UseClickStatu = false;
                rowTemp.Height = Application.GetRealHeight(23) - listView.rowSpace;
                rowTemp.MainKeys = string.Empty;
                listView.AddChidren(rowTemp);
            }
            var rowlayout = new FrameRowControl(listView.rowSpace / 2);
            rowlayout.Height = Application.GetRealHeight(138);
            rowlayout.MainKeys = info.Account;
@@ -277,7 +274,7 @@
                rowlayout.AddBottomLine();
            }
            //右图标
            rowlayout.AddRightIconControl();
            rowlayout.AddRightArrow();
            rowlayout.ButtonClickEvent += (sender, e) =>
            {
                var form = new MemberManagementForm();
@@ -317,7 +314,7 @@
        /// <summary>
        /// 自身的上层界面关闭后,它自身处于最上层时,触发的事件
        /// </summary>
        public override void FormActionAgainEvent()
        public override int FormActionAgainEvent()
        {
            //清空共享文件夹
            HdlShardLogic.Current.ClearShardDirectory();
@@ -327,6 +324,8 @@
            //添加成员列表
            this.AddMemberListRowByData();
            return 1;
        }
        #endregion