黄学彪
2020-01-17 4b378188ce972df432b23d9cb73babb6cc0679c6
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/DeviceControls/DeviceSelectControl.cs
@@ -20,14 +20,6 @@
            get { return Common.LocalDevice.Current.GetDevice(MainKeys); }
        }
        /// <summary>
        /// 房间控件
        /// </summary>
        private NormalViewControl btnRoom = null;
        /// <summary>
        /// 设备控件
        /// </summary>
        private NormalViewControl btnDevie = null;
        /// <summary>
        /// 选择控件
        /// </summary>
        private MostRightIconControl btnSelect = null;
@@ -95,20 +87,11 @@
            //设备
            string eName = Common.LocalDevice.Current.GetDeviceEpointName(device);
            btnDevie = this.AddLeftCaption(eName, 850, 60);
            btnDevie.TextSize = 15;
            //这个坐标有点特殊
            btnDevie.Y = Application.GetRealHeight(12) + this.chidrenYaxis;
            this.AddChidren(btnDevie, ChidrenBindMode.BindEventOnly);
            this.AddTopView(eName, 850);
            //房间
            string roomName = Common.Room.CurrentRoom.GetRoomNameByDevice(device);
            btnRoom = this.AddLeftCaption(roomName, 850, 50, true);
            //这个坐标有点特殊
            btnRoom.Y = Application.GetRealHeight(72) + this.chidrenYaxis;
            btnRoom.TextSize = 12;
            btnRoom.TextColor = UserCenterColor.Current.TextGrayColor1;
            this.AddChidren(btnRoom, ChidrenBindMode.BindEventOnly);
            this.AddBottomView(roomName, 850);
            btnSelect = this.AddMostRightEmptyIcon(58, 58);
            btnSelect.Visible = false;
@@ -149,21 +132,6 @@
        #endregion
        #region ■ 一般方法___________________________
        /// <summary>
        /// 移除房间控件
        /// </summary>
        public void RemoveRoomControl()
        {
            //移除事件
            this.ChangedChidrenBindMode(btnRoom, ChidrenBindMode.NotBind);
            this.btnRoom.RemoveFromParent();
            this.btnDevie.Gravity = Gravity.CenterVertical;
            if (chidrenYaxis != 0)
            {
                this.btnDevie.Y += chidrenYaxis;
            }
        }
        #endregion
    }