From c0021397eeb8335d6d1f20990c71533c3d94e7af Mon Sep 17 00:00:00 2001
From: gxc <guoxuecheng@guoxuechengdeMacBook-Pro.local>
Date: 星期五, 10 一月 2020 17:02:38 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/dev-tzy' into DEV_GXC

---
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/SafetySensorStatuControl.cs |   30 ++++++++++++++++++------------
 1 files changed, 18 insertions(+), 12 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/SafetySensorStatuControl.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/SafetySensorStatuControl.cs
index 176cc98..34b3443 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/SafetySensorStatuControl.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/SafetySensorStatuControl.cs
@@ -119,6 +119,23 @@
             {
                 return;
             }
+            string strMsg = reportInfo.AlarmMsg;
+            if (reportInfo.DemolishmenMsg != null)
+            {
+                //琚媶鎶ヨ
+                strMsg = reportInfo.DemolishmenMsg;
+            }
+            else if (reportInfo.BatteryMsg != null)
+            {
+                //鐢垫睜鎶ヨ
+                strMsg = reportInfo.BatteryMsg;
+            }
+            if (strMsg == null || strMsg == string.Empty)
+            {
+                //涓嶆槸鍦ㄥ唽鐨勬姤璀︽秷鎭�
+                return;
+            }
+
             //鍦ㄧ嚎鐘舵�佺殑鎺т欢闅愯棌
             btnOnline.Visible = false;
 
@@ -138,18 +155,7 @@
                 btnMsg.Y = Application.GetRealHeight(141);
                 this.AddChidren(btnMsg);
             }
-            if (reportInfo.DemolishmenMsg != null)
-            {
-                btnMsg.Text = reportInfo.DemolishmenMsg;
-            }
-            else if (reportInfo.BatteryMsg != null)
-            {
-                btnMsg.Text = reportInfo.BatteryMsg;
-            }
-            else
-            {
-                btnMsg.Text = reportInfo.AlarmMsg;
-            }
+            btnMsg.Text = strMsg;
         }
 
         #endregion

--
Gitblit v1.8.0