From 6fa9d69da922c8049f5acfcbb9ce9fd26811024c Mon Sep 17 00:00:00 2001
From: xm <1271024303@qq.com>
Date: 星期四, 16 四月 2020 17:10:57 +0800
Subject: [PATCH] 请合并代码

---
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/SafetySensorStatuControl.cs |   36 +++++++++++++++++++++---------------
 1 files changed, 21 insertions(+), 15 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/SafetySensorStatuControl.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/SafetySensorStatuControl.cs
index bed3e57..01d604f 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/SafetySensorStatuControl.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/SafetySensorStatuControl.cs
@@ -38,7 +38,7 @@
             this.Width = Application.GetRealWidth(968);
             this.Gravity = Gravity.CenterHorizontal;
             this.BackgroundColor = UserCenterColor.Current.White;
-            this.Radius = 8;
+            this.Radius = (uint)Application.GetRealHeight(17);
         }
 
         /// <summary>
@@ -53,7 +53,7 @@
             btnArea.X = Application.GetRealWidth(46);
             btnArea.TextSize = 12;
             btnArea.TextColor = UserCenterColor.Current.TextGrayColor3;
-            btnArea.Text = Common.Room.CurrentRoom.GetRoomNameByDevice(device);
+            btnArea.Text = HdlRoomLogic.Current.GetRoomNameByDevice(device);
             this.AddChidren(btnArea);
             //鐘舵��
             var btnStatu = new NormalViewControl(200, 49, true);
@@ -65,7 +65,7 @@
             btnStatu.TextID = R.MyInternationalizationString.uStatu;
             this.AddChidren(btnStatu);
             //绾�
-            var btnLine = new NormalViewControl(Application.GetRealWidth(876), 2, false);
+            var btnLine = new NormalViewControl(Application.GetRealWidth(876), ControlCommonResourse.BottomLineHeight, false);
             btnLine.BackgroundColor = UserCenterColor.Current.ButtomLine;
             btnLine.X = Application.GetRealWidth(46);
             btnLine.Y = Application.GetRealHeight(104);
@@ -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