HDL Home App 第二版本 旧平台金堂用 正在使用
黄学彪
2020-05-11 53cb8c211ecec2388a6583d32c5d2fe709285344
ZigbeeApp/Shared/Phone/MainPage/ListRoomViewFrom.cs
@@ -27,7 +27,6 @@
                    //初始化左滑菜单
                    roomManagement = new ListRoomViewFrom();
                    CommonPage.Instance.AddLeftView(roomManagement);
                    roomManagement.ShowForm();
                }
                return roomManagement;
            }
@@ -37,6 +36,10 @@
        /// 是否可以触发点击事件--是否可以跳转主页房间
        /// </summary>
        public bool CanClick = true;
        /// <summary>
        /// 是否初始化完成
        /// </summary>
        private bool isInitFinish = false;
        /// <summary>
        /// 当前楼层id
        /// </summary>
@@ -58,8 +61,7 @@
        /// 画面显示
        /// </summary>
        public void ShowForm()
        {
            roomManagement = this;
        {
            //初始化头部信息
            this.InitTopFrame();
            //初始化中部控件
@@ -90,10 +92,8 @@
            };
            //获取楼层
            if (this.curFloorId == string.Empty)
            {
                this.curFloorId = Config.Instance.Home.CurrentFloorId;
            }
            this.curFloorId = Config.Instance.Home.CurrentFloorId;
            var dicFloor = HdlRoomLogic.Current.GetFloorSortList();
            if (dicFloor.Count == 0)
            {
@@ -124,8 +124,8 @@
                {
                    this.curFloorId = floorId;
                    btnFloor.Text = dicFloor[floorId];
                    //刷新房间列表
                    this.RefreshListRoom();
                    //刷新Body容器
                    this.RefreshBodyFrame();
                };
            };
        }
@@ -139,8 +139,8 @@
            listView.Height = bodyFrameLayout.Height;
            listView.Width = bodyFrameLayout.Width;
            bodyFrameLayout.AddChidren(listView);
            //刷新房间列表
            this.RefreshListRoom();
            //刷新Body容器
            this.RefreshBodyFrame();
        }
        #endregion
@@ -152,11 +152,27 @@
        /// </summary>
        public void RefreshListRoom()
        {
            //如果还没有初始化完成界面的话
            if (this.isInitFinish == false)
            {
                this.ShowForm();
                this.isInitFinish = true;
                return;
            }
            //把头部也一起初始化了
            this.topFrameLayout.RemoveAll();
            //初始化头部信息
            this.InitTopFrame();
            //刷新Body容器
            this.RefreshBodyFrame();
        }
        /// <summary>
        /// 刷新Body容器
        /// </summary>
        private void RefreshBodyFrame()
        {
            //先清空
            this.listView.frameTable.RemoveAll();
            this.listView.frameTable.Height = Application.GetRealHeight(100);