using System;
|
using Shared.Phone.UserCenter;
|
using ZigBee.Device;
|
namespace Shared.Phone.Category.Controls
|
{
|
/// <summary>
|
/// 分类界面的PM2.5传感器设备行控件
|
/// </summary>
|
public class DevicePmSensorRowControl : DeviceRowCommon
|
{
|
/// <summary>
|
/// 初始化控件
|
/// </summary>
|
/// <param name="i_device"></param>
|
public override void InitControl(CommonDevice i_device, Common.Room i_nowSelectRoom)
|
{
|
base.InitControl(i_device, i_nowSelectRoom);
|
|
//添加跳转深度卡片信息事件
|
this.AddDetailInfoEvent(i_device);
|
}
|
|
#region ■ 深度卡片信息_______________________
|
|
/// <summary>
|
/// 添加跳转深度卡片信息事件
|
/// </summary>
|
private void AddDetailInfoEvent(CommonDevice i_device)
|
{
|
//深度卡片信息
|
this.frameTable.ButtonClickEvent += (sender, e) =>
|
{
|
//PM2.5传感器类型的深度卡片界面
|
var form = new MainPage.ControlForm.DevicePmSensorDetailCardForm();
|
form.RowOrCardControl = this;
|
form.AddForm(i_device, this.nowSelectRoom, 965, 1374);
|
form.FormCloseEvent += this.CardDetailInfoBackEvent;
|
};
|
}
|
|
#endregion
|
|
#region ■ 发送获取状态命令___________________
|
|
/// <summary>
|
/// 发送获取状态命令
|
/// </summary>
|
public override void SendStatuComand()
|
{
|
//检测能否发送获取状态命令
|
if (this.CheckCanSendStatuComand() == true)
|
{
|
HdlDeviceAttributeLogic.Current.SendFreshAirStatuComand(this.device);
|
}
|
}
|
|
#endregion
|
}
|
}
|