黄学彪
2020-08-21 9cc8fd11b13813adbdd3c6c31554e5c0bebf4026
ZigbeeApp/Shared/Phone/MainPage/HomeMainPageForm.cs
@@ -74,9 +74,6 @@
                listBodyContr.RecoverTableHeight();
            }
            //初始化默认楼层ID
            this.InitDefultFloorId();
            //初始化头部控件
            this.InitTopFrameLayoutControl();
            //初始化中间控件
@@ -628,6 +625,11 @@
                    {
                        cardContr = new Controls.DeviceFreshAirCardControl();
                    }
                    // PM2.5
                    else if (device.Type == DeviceType.PMSensor)
                    {
                        cardContr = new Controls.DevicePmSensorCardControl();
                    }
                    //彩灯(调光器)
                    else if (device.Type == DeviceType.DimmableLight)
                    {
@@ -1068,13 +1070,15 @@
                this.ShowProgressBar();
                //切换住宅
                HdlResidenceLogic.Current.SwitchResidence(home.Id);
                var result = HdlResidenceLogic.Current.SwitchResidence(home.Id);
                HdlThreadLogic.Current.RunMain(() =>
                {
                    //刷新界面
                    this.ShowForm();
                    if (result == true)
                    {
                        //刷新界面
                        this.ShowForm();
                    }
                    this.CloseProgressBar();
                });
            });
@@ -1258,23 +1262,6 @@
                return false;
            }
            return true;
        }
        /// <summary>
        /// 初始化默认楼层ID
        /// </summary>
        private void InitDefultFloorId()
        {
            if (Config.Instance.Home.CurrentFloorId != string.Empty)
            {
                return;
            }
            var dicFloor = HdlRoomLogic.Current.GetFloorSortList();
            foreach (var floorId in dicFloor.Keys)
            {
                Config.Instance.Home.CurrentFloorId = floorId;
                break;
            }
        }
        #endregion