黄学彪
2020-11-19 9ef48d7b2da7c408b53f73be0f6eef3cbac1c84a
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/BelongAreaControl.cs
@@ -54,7 +54,7 @@
        /// <param name="i_gateway">网关对象</param>
        public void InitControl(string i_caption, ZigBee.Device.ZbGateway i_gateway)
        {
            var room = HdlGatewayLogic.Current.GetRoomByGateway(i_gateway);
            var room = HdlRoomLogic.Current.GetRoomByGateway(i_gateway);
            this.DoInitControl(i_caption, room);
        }
@@ -76,7 +76,7 @@
        /// <param name="i_listDevice">设备对象</param>
        public void InitControl(string i_caption, List<ZigBee.Device.CommonDevice> i_listDevice)
        {
            var room = Common.LocalDevice.Current.GeteRealDeviceRoom(i_listDevice[0]);
            var room = HdlRoomLogic.Current.GeteRealDeviceRoom(i_listDevice[0]);
            this.DoInitControl(i_caption, room);
        }
@@ -144,11 +144,15 @@
            //右箭头
            this.AddRightArrow();
            this.ButtonClickEvent += (sender, e) =>
            //如果当前是展示模板,则需要处理
            if (Common.Config.Instance.Home.IsShowTemplate == false)
            {
                //区域选择
                this.ShowSelectRoom(btnTextView, i_caption);
            };
                this.ButtonClickEvent += (sender, e) =>
                {
                    //区域选择
                    this.ShowSelectRoom(btnTextView, i_caption);
                };
            }
        }
        #endregion
@@ -169,6 +173,8 @@
                txtView.Text = selectName;
                //调用回调函数
                this.SelectRoomEvent?.Invoke(RoomKey);
                //上传空间区域信息
                HdlRoomLogic.Current.SetRoomInfoToGateway();
            });
            if (result == false)
            {