| | |
| | | /// </summary>
|
| | | public Common.Room nowSelectRoom = null;
|
| | | /// <summary>
|
| | | /// 标记它是由哪个控件调起的
|
| | | /// </summary>
|
| | | public ViewGroup RowOrCardControl = null;
|
| | | /// <summary>
|
| | | /// 状态控件
|
| | | /// </summary>
|
| | | private NormalViewControl btnStatu = null;
|
| | |
| | |
|
| | | HdlThreadLogic.Current.RunThread(() =>
|
| | | {
|
| | | int waitime = 30;
|
| | | int waitime = 40;
|
| | | while (waitime > 0)
|
| | | {
|
| | | System.Threading.Thread.Sleep(100);
|
| | |
| | | break;
|
| | | }
|
| | | waitime--;
|
| | | //2秒的时候,还是接受不到的话,强制再次刷新设备状态
|
| | | if (waitime == 20)
|
| | | {
|
| | | //从新发送获取设备的状态(强制)
|
| | | this.device.HadReadDeviceStatu = false;
|
| | | if (this.RowOrCardControl != null)
|
| | | {
|
| | | this.RowOrCardControl.GetType().InvokeMember("SendStatuComand", System.Reflection.BindingFlags.InvokeMethod, null, this.RowOrCardControl, null);
|
| | | }
|
| | | }
|
| | | }
|
| | | if (waitime <= 0)
|
| | | if (waitime <= 0 && this.Parent != null)
|
| | | {
|
| | | //没有获取得到结果
|
| | | HdlThreadLogic.Current.RunMain(() =>
|
| | |
| | | private void AddDeviceReportEvent()
|
| | | {
|
| | | string mainKeys = Common.LocalDevice.Current.GetDeviceMainKeys(this.device);
|
| | | //节点反馈
|
| | | HdlGatewayReceiveLogic.Current.AddAttributeEvent("DeviceDetailCardControl" + mainKeys, ReceiveComandDiv.A节点控制反馈, (report) =>
|
| | | {
|
| | | string mainKey2 = Common.LocalDevice.Current.GetDeviceMainKeys(report);
|
| | | if (mainKeys != mainKey2)
|
| | | {
|
| | | //不是同一个东西
|
| | | return;
|
| | | }
|
| | | //检测结果
|
| | | if (this.CheckResponeResultStatu(ReceiveComandDiv.A节点控制反馈, report) == true)
|
| | | {
|
| | | //结果已经接收到
|
| | | this.ResponeResult = 1;
|
| | | }
|
| | | });
|
| | | //属性上报
|
| | | HdlGatewayReceiveLogic.Current.AddAttributeEvent("DeviceDetailCardAttribute" + mainKeys, ReceiveComandDiv.A设备属性上报, (report) =>
|
| | | {
|