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/SafeguardLogControl.cs | 69 ++++++++++++++++++++++------------
1 files changed, 45 insertions(+), 24 deletions(-)
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/SafeguardLogControl.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/SafeguardLogControl.cs
index 112fde4..1ec9341 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/SafeguardLogControl.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/SafeguardLogControl.cs
@@ -23,6 +23,14 @@
/// 鍚勯槻鍖虹殑琛屾帶浠�
/// </summary>
private Dictionary<int, List<FrameLayout>> dicRowFrame = new Dictionary<int, List<FrameLayout>>();
+ /// <summary>
+ /// 妗屽竷鎺т欢
+ /// </summary>
+ private FrameLayout frameTable = null;
+ /// <summary>
+ /// 寮�鏀捐繖涓帶浠跺嚭鏉�,鏈夌偣鐢�
+ /// </summary>
+ private NormalViewControl btnTime = null;
#endregion
@@ -33,9 +41,7 @@
/// </summary>
public SafeguardLogControl()
{
- this.BackgroundColor = UserCenterColor.Current.White;
- this.Radius = 17;
- this.Height = Application.GetRealHeight(260);
+ this.Height = Application.GetRealHeight(260 + 44);
}
/// <summary>
@@ -45,31 +51,39 @@
/// <param name="dicInfo">闃插尯鎶ヨ淇℃伅</param>
public void InitControl(string dayText, Dictionary<int, List<SafeguardAlarmInfo>> dicInfo)
{
+ this.frameTable = new FrameLayout();
+ frameTable.Gravity = Gravity.CenterHorizontal;
+ frameTable.Radius = (uint)Application.GetRealHeight(17);
+ frameTable.Height= Application.GetRealHeight(260);
+ frameTable.Width = Application.GetRealWidth(968);
+ frameTable.BackgroundColor = UserCenterColor.Current.White;
+ this.AddChidren(frameTable);
+
//璁板綍鏃堕棿
- var btnTime = new NormalViewControl(300, 58, true);
- btnTime.X = Application.GetRealWidth(92);
+ this.btnTime = new NormalViewControl(300, 58, true);
+ btnTime.X = Application.GetRealWidth(35);
btnTime.Y = Application.GetRealHeight(29);
btnTime.TextColor = UserCenterColor.Current.TextGrayColor3;
btnTime.TextID = R.MyInternationalizationString.uRecordTime;
- this.AddChidren(btnTime);
+ this.frameTable.AddChidren(btnTime);
//鏃ユ湡
string month = dayText.Substring(4, 2);
string day = dayText.Substring(6, 2);
var btnDay = new NormalViewControl(300, 58, true);
- btnDay.X = this.Width - Application.GetRealWidth(300 + 89);
+ btnDay.X = frameTable.Width - Application.GetRealWidth(300 + 35);
btnDay.Y = btnTime.Y;
btnDay.TextColor = UserCenterColor.Current.TextColor2;
btnDay.TextAlignment = TextAlignment.CenterRight;
btnDay.Text = month + Language.StringByID(R.MyInternationalizationString.Month) + day + Language.StringByID(R.MyInternationalizationString.Day);
- this.AddChidren(btnDay);
+ this.frameTable.AddChidren(btnDay);
//绾�
var btnLine = new NormalViewControl(Application.GetRealWidth(904), ControlCommonResourse.BottomLineHeight, false);
- btnLine.X = Application.GetRealWidth(86);
+ btnLine.X = Application.GetRealWidth(29);
btnLine.Y = Application.GetRealHeight(98);
btnLine.BackgroundColor = UserCenterColor.Current.ButtomLine;
- this.AddChidren(btnLine);
+ this.frameTable.AddChidren(btnLine);
//棰勫垱寤轰簲澶ч槻鍖虹殑妗屽竷
var listId = new List<int>() { 1, 2, 4, 5, 3 };
@@ -79,7 +93,7 @@
var frame1 = new FrameLayout();
frame1.Height = Application.GetRealHeight(10);
frame1.Y = tempY == 0 ? Application.GetRealHeight(98) : tempY;
- this.AddChidren(frame1);
+ this.frameTable.AddChidren(frame1);
dicFrame[listId[i]] = frame1;
dicRowFrame[listId[i]] = new List<FrameLayout>();
@@ -101,7 +115,8 @@
}
//鍙樻洿楂樺害
frame1.Height = listRow[listRow.Count - 1].Bottom + Application.GetRealHeight(55);
- this.Height = frame1.Bottom;
+ this.frameTable.Height = frame1.Bottom;
+ this.Height = frame1.Bottom + Application.GetRealHeight(44);
tempY = frame1.Bottom;
}
else
@@ -113,13 +128,15 @@
if (dicInfo == null || dicInfo.Count == 0)
{
//浠婃棩鏃犱换浣曟姤璀﹁褰�
- btnMsg = new NormalViewControl(this.Width, Application.GetRealHeight(58), false);
- btnMsg.Y = btnLine.Bottom + Application.GetRealHeight(29);
+ btnMsg = new NormalViewControl(frameTable.Width, Application.GetRealHeight(60), false);
+ btnMsg.Y = btnLine.Bottom + Application.GetRealHeight(28);
btnMsg.TextColor = UserCenterColor.Current.TextGrayColor3;
btnMsg.TextID = R.MyInternationalizationString.uNowDayNotHadAlarmLog;
btnMsg.TextAlignment = TextAlignment.Center;
- this.AddChidren(btnMsg);
+ this.frameTable.AddChidren(btnMsg);
}
+ //娣诲姞搴曢儴闃村奖鐗规晥
+ this.frameTable.SetViewShadow(true);
}
#endregion
@@ -135,7 +152,7 @@
FrameLayout frame = dicFrame[zoneId];
//鍥炬爣
var btnIcon = new IconViewControl(69);
- btnIcon.X = Application.GetRealWidth(86);
+ btnIcon.X = Application.GetRealWidth(29);
btnIcon.Y = Application.GetRealHeight(23);
//鍙細鏄�1~5
if (zoneId == 1 || zoneId == 2)
@@ -149,13 +166,13 @@
frame.AddChidren(btnIcon);
//闃插尯鍚�
var btnName = new NormalViewControl(400, 58, true);
- btnName.X = Application.GetRealWidth(167);
+ btnName.X = Application.GetRealWidth(109);
btnName.Y = Application.GetRealHeight(35);
btnName.Text = HdlSafeguardLogic.Current.GetGarrisonText(zoneId);
frame.AddChidren(btnName);
//宸插惎鍔�
var btnStatu = new NormalViewControl(300, 46, true);
- btnStatu.X = frame.Width - Application.GetRealWidth(300 + 89);
+ btnStatu.X = frame.Width - Application.GetRealWidth(300 + 35);
btnStatu.Y = Application.GetRealHeight(35);
btnStatu.TextSize = 12;
btnStatu.TextColor = UserCenterColor.Current.TextGrayColor1;
@@ -251,8 +268,12 @@
if (realHeight > 0)
{
//鍙樻洿鏁翠釜鎺т欢鐨勭湡瀹為珮搴�
- this.Height = realHeight;
+ this.frameTable.Height = realHeight;
+ this.Height = realHeight + Application.GetRealHeight(44);
}
+ //娣诲姞搴曢儴闃村奖鐗规晥
+ this.frameTable.SetViewShadow(true);
+
return value;
}
@@ -272,7 +293,7 @@
//鎴块棿
var btnRoom = new NormalViewControl(165, 58, true);
- btnRoom.X = Application.GetRealWidth(92);
+ btnRoom.X = Application.GetRealWidth(35);
btnRoom.TextColor = UserCenterColor.Current.TextGrayColor3;
btnRoom.Text = alarmInfo.RoomName;
rowFrame.AddChidren(btnRoom);
@@ -280,13 +301,13 @@
string mainkeys = Common.LocalDevice.Current.GetDeviceMainKeys(alarmInfo.DeviceAddr, alarmInfo.DeviceEpoint);
var device = Common.LocalDevice.Current.GetDevice(mainkeys);
var btnDevice = new NormalViewControl(271, 58, true);
- btnDevice.X = Application.GetRealWidth(256);
+ btnDevice.X = Application.GetRealWidth(199);
btnDevice.TextColor = UserCenterColor.Current.TextGrayColor3;
btnDevice.Text = device == null ? alarmInfo.DeviceName : Common.LocalDevice.Current.GetDeviceEpointName(device);
rowFrame.AddChidren(btnDevice);
//鎶ヨ淇℃伅
var btnMsg = new NormalViewControl(303, 58, true);
- btnMsg.X = Application.GetRealWidth(527);
+ btnMsg.X = Application.GetRealWidth(469);
btnMsg.TextColor = UserCenterColor.Current.TextGrayColor3;
//鐢垫睜鐢甸噺
if (alarmInfo.BatteryMsg != null)
@@ -304,8 +325,8 @@
}
rowFrame.AddChidren(btnMsg);
//鏃堕棿锛氭椂鍒嗙
- var btnTime = new NormalViewControl(176, 58, true);
- btnTime.X = Application.GetRealWidth(829);
+ var btnTime = new NormalViewControl(190, 58, true);
+ btnTime.X = Application.GetRealWidth(758);
btnTime.TextColor = UserCenterColor.Current.TextGrayColor3;
btnTime.TextAlignment = TextAlignment.CenterRight;
btnTime.Text = alarmInfo.Time;
--
Gitblit v1.8.0