From 679c2a4c459c7ad0e9f727ad4196c0754716c28f Mon Sep 17 00:00:00 2001
From: WJC <wjc@hdlchina.com.cn>
Date: 星期三, 08 四月 2020 11:39:20 +0800
Subject: [PATCH] 2020-04-08-1
---
ZigbeeApp/Shared/Phone/UserCenter/Safety/SafetyManagementMainForm.cs | 72 ++++++++++++++++++++++-------------
1 files changed, 45 insertions(+), 27 deletions(-)
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Safety/SafetyManagementMainForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Safety/SafetyManagementMainForm.cs
index ebac787..76d6357 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Safety/SafetyManagementMainForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Safety/SafetyManagementMainForm.cs
@@ -65,30 +65,31 @@
/// </summary>
private void InitTabSwitchControl()
{
+ var frameBack = new FrameLayout();
+ frameBack.Height = Application.GetRealHeight(1300);
+ frameBack.Y = Application.GetRealHeight(444);
+ frameBack.BackgroundColor = 0xa1ffffff;
+ frameBack.SetCornerWithSameRadius(Application.GetRealHeight(58), HDLUtils.RectCornerTopLeft | HDLUtils.RectCornerTopRight);
+ bodyFrameLayout.AddChidren(frameBack);
+
//妗屽竷鎺т欢
frameLayoutDraw = new FrameLayout();
- frameLayoutDraw.Y = Application.GetRealHeight(590);
- frameLayoutDraw.Height = bodyFrameLayout.Height - Application.GetRealHeight(590);
- bodyFrameLayout.AddChidren(frameLayoutDraw);
-
- //涓存椂鐨勪竴涓笢瑗�,鐢ㄦ潵璁$畻鐪熷疄鍊艰�屽凡
- var btnTemp = new NormalViewControl(100, false);
- int realLogWidth = btnTemp.GetRealWidthByText(16, Language.StringByID(R.MyInternationalizationString.uSecurityLog));
- int realSensorWidth = btnTemp.GetRealWidthByText(16, Language.StringByID(R.MyInternationalizationString.uSensorStatu));
- btnTemp = null;
+ frameLayoutDraw.Y = Application.GetRealHeight(181);
+ frameLayoutDraw.Height = frameBack.Height - Application.GetRealHeight(181);
+ frameBack.AddChidren(frameLayoutDraw);
//瀹夐槻璁板綍(鐐瑰嚮鑼冨洿鏈夌偣灏忥紝闇�瑕佹墿澶у畠鐨勭偣鍑昏寖鍥�)
var frameLog = new FrameLayoutControl();
frameLog.UseClickStatu = false;
frameLog.Height = Application.GetRealHeight(123);
- frameLog.Width = realLogWidth;
- frameLog.X = Application.GetRealWidth(489) - realLogWidth;
- frameLog.Y = Application.GetRealHeight(467);
- bodyFrameLayout.AddChidren(frameLog);
+ frameLog.Width = Application.GetRealWidth(273);
+ frameLog.X = Application.GetRealWidth(259);
+ frameLog.Y = Application.GetRealHeight(58);
+ frameBack.AddChidren(frameLog);
//鏍囬
var btnLog = new NormalViewControl(100, 63, true);
- btnLog.Width = realLogWidth;
- btnLog.TextAlignment = TextAlignment.CenterRight;
+ btnLog.Width = frameLog.Width;
+ btnLog.TextAlignment = TextAlignment.Center;
btnLog.TextID = R.MyInternationalizationString.uSecurityLog;
btnLog.TextColor = UserCenterColor.Current.TextGrayColor3;
frameLog.AddChidren(btnLog, ChidrenBindMode.BindEventOnly);
@@ -105,16 +106,18 @@
var frameSensor = new FrameLayoutControl();
frameSensor.UseClickStatu = false;
frameSensor.Height = frameLog.Height;
- frameSensor.Width = realSensorWidth;
- frameSensor.X = Application.GetRealWidth(550);
+ frameSensor.Width = frameLog.Width;
+ frameSensor.X = frameLog.Right;
frameSensor.Y = frameLog.Y;
- bodyFrameLayout.AddChidren(frameSensor);
+ frameBack.AddChidren(frameSensor);
//鏍囬
var btnSensor = new NormalViewControl(100, 63, true);
- btnSensor.Width = realSensorWidth;
+ btnSensor.Width = frameSensor.Width;
btnSensor.TextID = R.MyInternationalizationString.uSensorStatu;
btnSensor.TextSize = 16;
+ btnSensor.TextAlignment = TextAlignment.Center;
btnSensor.TextColor = UserCenterColor.Current.TextColor2;
+ btnSensor.IsBold = true;
frameSensor.AddChidren(btnSensor, ChidrenBindMode.BindEventOnly);
//搴曠嚎
var btnSensorLine = new NormalViewControl(40, 10, true);
@@ -130,8 +133,10 @@
//瀛椾綋澶у皬鍜岄鑹插彉鏇�
btnSensor.TextColor = UserCenterColor.Current.TextGrayColor3;
btnSensor.TextSize = 14;
+ btnSensor.IsBold = false;
btnLog.TextColor = UserCenterColor.Current.TextColor2;
btnLog.TextSize = 16;
+ btnLog.IsBold = true;
btnLogLine.Visible = true;
btnSensorLine.Visible = false;
@@ -148,8 +153,10 @@
//瀛椾綋澶у皬鍜岄鑹插彉鏇�
btnSensor.TextColor = UserCenterColor.Current.TextColor2;
btnSensor.TextSize = 16;
+ btnSensor.IsBold = true;
btnLog.TextColor = UserCenterColor.Current.TextGrayColor3;
btnLog.TextSize = 14;
+ btnLog.IsBold = false;
btnLogLine.Visible = false;
btnSensorLine.Visible = true;
@@ -183,7 +190,7 @@
btnIcon.ButtonClickEvent += (sender, e) =>
{
//鑿滃崟鎺т欢
- var frameMenu = new TopRightMenuControl(2);
+ var frameMenu = new TopRightMenuControl(2, 2);
//闃插尯鍒楄〃
string menu1 = Language.StringByID(R.MyInternationalizationString.uGarrisonAreaList);
frameMenu.AddRowMenu(menu1, "Item/GarrisonList.png", "Item/GarrisonListSelected.png", () =>
@@ -231,7 +238,7 @@
topFrameLayout.AddChidren(btnShortCut);
btnShortCut.InitControl();
- if (UserCenterResourse.Option.SafetyShortcut == true)
+ if (UserCenterResourse.ResidenceOption.SafetyShortcut == true)
{
//浣跨敤蹇嵎鏂瑰紡
btnShortCut.IsSelected = true;
@@ -243,8 +250,8 @@
//纭畾鍙栨秷涓婚〉鐨勩�屽畨闃层�嶆嵎寰勶紵
this.ShowMassage(ShowMsgType.Confirm, Language.StringByID(R.MyInternationalizationString.uCancelSafetyShortcutMsg), () =>
{
- UserCenterResourse.Option.SafetyShortcut = false;
- UserCenterResourse.Option.Save();
+ UserCenterResourse.ResidenceOption.SafetyShortcut = false;
+ UserCenterResourse.ResidenceOption.Save();
btnShortCut.IsSelected = false;
});
}
@@ -253,8 +260,8 @@
//纭畾鍒涘缓銆屽畨闃层�嶆嵎寰勫埌涓婚〉锛�
this.ShowMassage(ShowMsgType.Confirm, Language.StringByID(R.MyInternationalizationString.uCreatSafetyShortcutMsg), () =>
{
- UserCenterResourse.Option.SafetyShortcut = true;
- UserCenterResourse.Option.Save();
+ UserCenterResourse.ResidenceOption.SafetyShortcut = true;
+ UserCenterResourse.ResidenceOption.Save();
btnShortCut.IsSelected = true;
});
}
@@ -421,6 +428,8 @@
}
}
}
+ //璋冩暣鍒楄〃鎺т欢楂樺害
+ listView.AdjustChidrenFrameHeight(listView.frameTable, Application.GetRealHeight(46));
//寮�鍚紶鎰熷櫒鎶ヨ鐩戣
this.StartCheckDeviceAlarm();
//寮�鍚澶囧湪绾跨洃娴�
@@ -481,7 +490,7 @@
var control = this.dicSensorStatuView[mainkey];
//鑾峰彇浼犳劅鍣ㄦ姤璀︿俊鎭殑缈昏瘧鏂囨湰
var msgInfo = HdlAlarmsLogic.Current.GetSensorAlarmInfo(device);
- Application.RunOnMainThread(() =>
+ HdlThreadLogic.Current.RunMain(() =>
{
control?.SetSensoReportInfo(msgInfo);
});
@@ -540,7 +549,16 @@
//鐣岄潰鍏抽棴
return;
}
- Common.LocalDevice.Current.GetDeviceListFromGateway(zbway, false, this.ReceiveDeviceStatuPush, ShowErrorMode.NO);
+ int statu = 0;
+ var list = Common.LocalDevice.Current.GetDeviceListFromGateway(zbway, ref statu, false, ShowErrorMode.NO);
+ if (statu != -1)
+ {
+ for (int i = 0; i < list.Count; i++)
+ {
+ //璁剧疆璁惧鍦ㄧ嚎鐘舵��
+ this.ReceiveDeviceStatuPush(list[i]);
+ }
+ }
}
});
}
--
Gitblit v1.8.0