From 66a9965c44ecc32a6696abca876ab9d1cd091584 Mon Sep 17 00:00:00 2001
From: gxc <guoxuecheng@guoxuechengdeMacBook-Pro.local>
Date: 星期五, 28 二月 2020 15:25:13 +0800
Subject: [PATCH] 2020.2.28
---
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/SafetySensorStatuControl.cs | 50 +++++++++++++++++++++++++++++---------------------
1 files changed, 29 insertions(+), 21 deletions(-)
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/SafetySensorStatuControl.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/SafetySensorStatuControl.cs
index e67e3d1..34b3443 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/SafetySensorStatuControl.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/SafetySensorStatuControl.cs
@@ -35,8 +35,10 @@
public SafetySensorStatuControl()
{
this.Height = Application.GetRealHeight(256);
+ this.Width = Application.GetRealWidth(968);
+ this.Gravity = Gravity.CenterHorizontal;
this.BackgroundColor = UserCenterColor.Current.White;
- this.Radius = 6;
+ this.Radius = (uint)Application.GetRealHeight(17);
}
/// <summary>
@@ -48,7 +50,7 @@
//鍖哄煙
var btnArea = new NormalViewControl(400, 49, true);
btnArea.Y = Application.GetRealHeight(40);
- btnArea.X = Application.GetRealWidth(104);
+ btnArea.X = Application.GetRealWidth(46);
btnArea.TextSize = 12;
btnArea.TextColor = UserCenterColor.Current.TextGrayColor3;
btnArea.Text = Common.Room.CurrentRoom.GetRoomNameByDevice(device);
@@ -56,27 +58,27 @@
//鐘舵��
var btnStatu = new NormalViewControl(200, 49, true);
btnStatu.Y = btnArea.Y;
- btnStatu.X = this.Width - Application.GetRealWidth(200 + 101);
+ btnStatu.X = this.Width - Application.GetRealWidth(200 + 46);
btnStatu.TextSize = 12;
btnStatu.TextAlignment = TextAlignment.CenterRight;
btnStatu.TextColor = UserCenterColor.Current.TextGrayColor1;
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(104);
+ btnLine.X = Application.GetRealWidth(46);
btnLine.Y = Application.GetRealHeight(104);
this.AddChidren(btnLine);
//璁惧鍚嶇О
var btnDeviceName = new NormalViewControl(400, 58, true);
- btnDeviceName.X = Application.GetRealWidth(104);
+ btnDeviceName.X = Application.GetRealWidth(46);
btnDeviceName.Y = Application.GetRealHeight(141);
btnDeviceName.Text = Common.LocalDevice.Current.GetDeviceEpointName(device);
this.AddChidren(btnDeviceName);
//鍦ㄧ嚎鐘舵��
btnOnline = new NormalViewControl(200, 58, true);
- btnOnline.X = this.Width - Application.GetRealWidth(200 + 101);
+ btnOnline.X = this.Width - Application.GetRealWidth(200 + 46);
btnOnline.Y = btnDeviceName.Y;
btnOnline.TextAlignment = TextAlignment.CenterRight;
this.SetOnlineStatu(device.IsOnline == 1);
@@ -117,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;
@@ -124,7 +143,7 @@
{
//鍥炬爣
btnMsgIcon = new IconViewControl(58);
- btnMsgIcon.X = Application.GetRealWidth(922);
+ btnMsgIcon.X = Application.GetRealWidth(864);
btnMsgIcon.Y = Application.GetRealHeight(141);
btnMsgIcon.UnSelectedImagePath = "Item/Tips.png";
this.AddChidren(btnMsgIcon);
@@ -132,22 +151,11 @@
btnMsg = new NormalViewControl(400, 58, true);
btnMsg.TextAlignment = TextAlignment.CenterRight;
btnMsg.TextColor = 0xfff34747;
- btnMsg.X = Application.GetRealWidth(910 - 400);
+ btnMsg.X = this.Width - Application.GetRealWidth(400 + 115);
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