黄学彪
2020-09-01 dee21bf452a8979d0515d13e534fbb69ed9715dd
ZigbeeApp/Shared/Phone/UserCenter/Device/AirConditioner/IndoorUnitListForm.cs
@@ -24,6 +24,10 @@
        /// 激活的设备地址
        /// </summary>
        private string actionDeviceKeys = null;
        /// <summary>
        /// 接收回复的端点
        /// </summary>
        private HashSet<int> listReceivePoint = new HashSet<int>();
        #endregion
@@ -36,6 +40,11 @@
        public void ShowForm(string i_diviceMac)
        {
            this.listDevice = Common.LocalDevice.Current.GetDevicesByMac(i_diviceMac);
            //收集全部端点
            foreach (var device in this.listDevice)
            {
                listReceivePoint.Add(device.DeviceEpoint);
            }
            //设置头部信息
            base.SetTitleText(Language.StringByID(R.MyInternationalizationString.uIndoorUnitSettion));
@@ -242,15 +251,24 @@
            }
            HdlThreadLogic.Current.RunThread(() =>
            {
                while (this.listReceivePoint.Count > 0 && this.Parent != null)
                {
                for (int i = 0; i < listDevice.Count; i++)
                {
                    if (this.Parent == null)
                    {
                        return;
                    }
                        //已经发送过了,就不用再发送
                        if (this.listReceivePoint.Contains(listDevice[i].DeviceEpoint) == true)
                        {
                    //读取状态
                    HdlDeviceAttributeLogic.Current.SendThermostatStatuComand(listDevice[i]);
                    System.Threading.Thread.Sleep(200);
                        }
                    }
                    //3秒后再次循环
                    System.Threading.Thread.Sleep(3000);
                }
            });
        }
@@ -276,6 +294,8 @@
                {
                    return;
                }
                //已经接收到数据,则移除端点
                this.listReceivePoint.Remove(device.DeviceEpoint);
                var rowInfo = dicControl[mainkeys];
                for (int i = 0; i < device.DeviceStatusReport.AttriBute.Count; i++)