黄学彪
2020-09-01 dee21bf452a8979d0515d13e534fbb69ed9715dd
ZigbeeApp/Shared/Phone/Category/CategoryMainForm.cs
@@ -582,15 +582,30 @@
                }
                HdlThreadLogic.Current.RunThread(() =>
                {
                    for (int i = 0; i < listContr.Count; i++)
                    while (listView.Parent != null)
                    {
                        if (listView.Parent == null)
                        bool hadSend = false;
                        for (int i = 0; i < listContr.Count; i++)
                        {
                            return;
                            if (listView.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);
@@ -913,7 +928,8 @@
                                    //设备状态必须刷新
                                    string statuText = HdlDeviceOtherLogic.Current.GetDeviceStatu(contr.device);
                                    contr.SetDeviceStatuText(statuText);
                                    //传感器切换为灰色状态
                                    contr.SwitchRowStatuAppeal(false);
                                }, ShowErrorMode.NO);
                            }
                        }