From dee21bf452a8979d0515d13e534fbb69ed9715dd Mon Sep 17 00:00:00 2001 From: 黄学彪 <hxb@hdlchina.com.cn> Date: 星期二, 01 九月 2020 15:33:13 +0800 Subject: [PATCH] 上传一个版本 --- ZigbeeApp/Shared/Phone/Category/CategoryMainForm.cs | 30 +++++++++++++++++++++++------- 1 files changed, 23 insertions(+), 7 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/Category/CategoryMainForm.cs b/ZigbeeApp/Shared/Phone/Category/CategoryMainForm.cs index b09d0bf..41140ca 100755 --- a/ZigbeeApp/Shared/Phone/Category/CategoryMainForm.cs +++ b/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); } } -- Gitblit v1.8.0