黄学彪
2020-09-01 dee21bf452a8979d0515d13e534fbb69ed9715dd
ZigbeeApp/Shared/Phone/MainPage/HomeMainPageForm.cs
@@ -697,17 +697,31 @@
                        }
                        HdlThreadLogic.Current.RunThread(() =>
                        {
                            for (int i = 0; i < listContr.Count; i++)
                            while (listDeviceBackContr.Parent != null)
                            {
                                if (listDeviceBackContr.Parent == null)
                                bool hadSend = false;
                                for (int i = 0; i < listContr.Count; i++)
                                {
                                    return;
                                    if (listDeviceBackContr.Parent == null)
                                    {
                                        return;
                                    }
                                    //如果还没有接收到数据,则再次发送
                                    if (listContr[i].ReceiveResponeResultStatu() == false)
                                    {
                                        //发送获取状态的命令
                                        listContr[i].SendStatuComand();
                                        hadSend = true;
                                        System.Threading.Thread.Sleep(200);
                                    }
                                }
                                System.Threading.Thread.Sleep(200);
                                //发送获取状态的命令
                                listContr[i].SendStatuComand();
                                if (hadSend == false)
                                {
                                    //如果已经全部回路都接收了网关回复,则不再二次发送
                                    break;
                                }
                                System.Threading.Thread.Sleep(2000);
                            }
                        }, ShowErrorMode.NO);
                    }
                });
@@ -1192,6 +1206,8 @@
                                    //设备状态必须刷新
                                    string statuText = HdlDeviceOtherLogic.Current.GetDeviceStatu(contr.device);
                                    contr.SetDeviceStatuText(statuText);
                                    //传感器切换为灰色状态
                                    contr.SwitchCardStatuAppeal(false);
                                }, ShowErrorMode.NO);
                            }