From 2029e64ec0491f7e511dc15bffaf821bfbabe2de Mon Sep 17 00:00:00 2001 From: 黄学彪 <hxb@hdlchina.com.cn> Date: 星期一, 20 七月 2020 14:10:22 +0800 Subject: [PATCH] 上传一个很特别的新版本 --- ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/Base/DeviceRowCommon.cs | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 50 insertions(+), 0 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/Base/DeviceRowCommon.cs b/ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/Base/DeviceRowCommon.cs index 38c1f5b..69f42ef 100755 --- a/ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/Base/DeviceRowCommon.cs +++ b/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> -- Gitblit v1.8.0