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/MainPage/HomeMainPageForm.cs | 50 +++++++++++++++++++++++--------------------------- 1 files changed, 23 insertions(+), 27 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/MainPage/HomeMainPageForm.cs b/ZigbeeApp/Shared/Phone/MainPage/HomeMainPageForm.cs index bd885f9..0b5571f 100755 --- a/ZigbeeApp/Shared/Phone/MainPage/HomeMainPageForm.cs +++ b/ZigbeeApp/Shared/Phone/MainPage/HomeMainPageForm.cs @@ -74,9 +74,6 @@ listBodyContr.RecoverTableHeight(); } - //鍒濆鍖栭粯璁ゆゼ灞侷D - this.InitDefultFloorId(); - //鍒濆鍖栧ご閮ㄦ帶浠� this.InitTopFrameLayoutControl(); //鍒濆鍖栦腑闂存帶浠� @@ -700,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); } }); @@ -1195,6 +1206,8 @@ //璁惧鐘舵�佸繀椤诲埛鏂� string statuText = HdlDeviceOtherLogic.Current.GetDeviceStatu(contr.device); contr.SetDeviceStatuText(statuText); + //浼犳劅鍣ㄥ垏鎹负鐏拌壊鐘舵�� + contr.SwitchCardStatuAppeal(false); }, ShowErrorMode.NO); } @@ -1265,23 +1278,6 @@ return false; } return true; - } - - /// <summary> - /// 鍒濆鍖栭粯璁ゆゼ灞侷D - /// </summary> - private void InitDefultFloorId() - { - if (Config.Instance.Home.CurrentFloorId != string.Empty) - { - return; - } - var dicFloor = HdlRoomLogic.Current.GetFloorSortList(); - foreach (var floorId in dicFloor.Keys) - { - Config.Instance.Home.CurrentFloorId = floorId; - break; - } } #endregion -- Gitblit v1.8.0