xm
2020-05-19 136b9e2fc48249a5ff89874f1080ba94130e7a9e
ZigbeeApp/Shared/Phone/MainPage/DeviceDetailInfoForm.cs
@@ -17,13 +17,13 @@
        /// <summary>
        /// 界面关闭事件(该事件目前给分类界面的自定义行控件使用)
        /// </summary>
        public Action<CommonDevice, Room> FormCloseEvent = null;
        public Action FormCloseEvent = null;
        /// <summary>
        /// 设备对象
        /// </summary>
        private CommonDevice device;
        /// <summary>
        /// 房间对象(这个房间有可能是喜爱)
        /// 房间对象(这个房间有可能是喜爱,有可能是null)
        /// </summary>
        private Room room = null;
        /// <summary>
@@ -132,7 +132,7 @@
            };
            //喜爱房间不允许变更区域
            if (this.room.IsLove == false)
            if (this.room == null || this.room.IsLove == false)
            {
                //所属区域
                var rowBeloneArea = new BelongAreaControl(listview.rowSpace / 2);
@@ -232,7 +232,7 @@
            btnNote.AddBottomLine();
            //喜爱房间不允许出现区域
            if (this.room.IsLove == false)
            if (this.room == null || this.room.IsLove == false)
            {
                //所属区域
                caption = Language.StringByID(R.MyInternationalizationString.uBelongArea);
@@ -345,7 +345,7 @@
        /// </summary>
        public override void CloseFormBefore()
        {
            this.FormCloseEvent?.Invoke(this.device, this.room);
            this.FormCloseEvent?.Invoke();
            this.FormCloseEvent = null;
            base.CloseFormBefore();