黄学彪
2020-07-20 2029e64ec0491f7e511dc15bffaf821bfbabe2de
ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/Base/DeviceRowCommon.cs
@@ -46,6 +46,10 @@
        /// </summary>
        private MostRightIconControl btnSwitch = null;
        /// <summary>
        /// 电池控件
        /// </summary>
        private IconViewControl btnBattery = null;
        /// <summary>
        /// 是否获取网关反馈的结果  0:没有获取得到  1:已经获取得到
        /// </summary>
        private int ResponeResult = 0;
@@ -146,6 +150,24 @@
            this.btnSwitch = new MostRightIconControl(69, 69);
            btnSwitch.UnSelectedImagePath = "Item/Switch.png";
            btnSwitch.SelectedImagePath = "Item/SwitchSelected.png";
            //电池控件
            if (this.device.Type == DeviceType.IASZone)
            {
                this.btnBattery = new IconViewControl(69);
                btnBattery.X = this.Width - Application.GetRealWidth(69 + 29);
                btnBattery.UnSelectedImagePath = "Item/Battery.png";
                btnBattery.Gravity = Gravity.CenterVertical;
                this.frameTable.AddChidren(btnBattery, ChidrenBindMode.BindEvent);
                if (chidrenYaxis != 0)
                {
                    btnBattery.Y += chidrenYaxis;
                }
                if (this.device.IsBatteryDown == false)
                {
                    btnBattery.Visible = false;
                }
            }
            //分享的房间,则不能编辑和删除
            if (this.nowSelectRoom.IsSharedRoom == false)
@@ -423,6 +445,34 @@
        #endregion
        #region ■ 显示低电量_________________________
        /// <summary>
        /// 刷新电池电量状态
        /// </summary>
        public void RefreshBatteryStatu()
        {
            if (this.btnBattery == null) { return; }
            if (this.device.IsBatteryDown == true)
            {
                //电量低,显示图标
                if (this.btnBattery.Visible == false)
                {
                    this.btnBattery.Visible = true;
                }
            }
            else
            {
                //电量足够,隐藏图标
                if (this.btnBattery.Visible == true)
                {
                    this.btnBattery.Visible = false;
                }
            }
        }
        #endregion
        #region ■ 一般方法___________________________
        /// <summary>