From f14dcfd967404e197e7ec995ca8d6f2b090d3b7d Mon Sep 17 00:00:00 2001
From: xm <1271024303@qq.com>
Date: 星期五, 11 九月 2020 09:16:59 +0800
Subject: [PATCH] 优化多功能面板:绑定温湿度传感器目标,和设备列表回路显示。优化数据矫正功能温湿度度不设置的情况。优化门锁时间设置最后一天和最后最后一个月的时间显示等 细节

---
 ZigbeeApp/Shared/Phone/Category/CategoryMainForm.cs |   50 +++++++++++++++++++++++---------------------------
 1 files changed, 23 insertions(+), 27 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/Category/CategoryMainForm.cs b/ZigbeeApp/Shared/Phone/Category/CategoryMainForm.cs
index 2fe6c56..41140ca 100755
--- a/ZigbeeApp/Shared/Phone/Category/CategoryMainForm.cs
+++ b/ZigbeeApp/Shared/Phone/Category/CategoryMainForm.cs
@@ -67,9 +67,6 @@
             //鍏堟竻闄ゅ惂
             this.RemoveAll();
 
-            //鍒濆鍖栭粯璁ゆゼ灞侷D
-            this.InitDefultFloorId();
-
             //鍒濆鍖栧ご閮ㄦ帶浠�
             this.InitTopControl();
             //鍒濆鍖栦腑闂存帶浠�
@@ -585,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);
@@ -916,7 +928,8 @@
                                     //璁惧鐘舵�佸繀椤诲埛鏂�
                                     string statuText = HdlDeviceOtherLogic.Current.GetDeviceStatu(contr.device);
                                     contr.SetDeviceStatuText(statuText);
-
+                                    //浼犳劅鍣ㄥ垏鎹负鐏拌壊鐘舵��
+                                    contr.SwitchRowStatuAppeal(false);
                                 }, ShowErrorMode.NO);
                             }
                         }
@@ -1022,23 +1035,6 @@
                 timeStr += sec + secondText;
             }
             return timeStr;
-        }
-
-        /// <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