From 18a7f9f40e5fab3bee5d4ac3d8fd0273dea052d6 Mon Sep 17 00:00:00 2001
From: 黄学彪 <hxb@hdlchina.com.cn>
Date: 星期日, 26 四月 2020 12:05:28 +0800
Subject: [PATCH] 先上传一个非最新的版本
---
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/SafetyMasterControl.cs | 84 ++++++++++++++++--------------------------
1 files changed, 32 insertions(+), 52 deletions(-)
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/SafetyMasterControl.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/SafetyMasterControl.cs
index 70913a4..e5428f4 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/SafetyMasterControl.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/SafetyMasterControl.cs
@@ -23,6 +23,10 @@
/// 鎾ら槻
/// </summary>
private GarrisonControl btnReGarrisonGarrison = null;
+ /// <summary>
+ /// 妗屽竷鎺т欢
+ /// </summary>
+ private FrameLayout frameTable = null;
#endregion
@@ -36,8 +40,6 @@
this.Gravity = Gravity.CenterHorizontal;
this.Width = Application.GetRealWidth(964);
this.Height = Application.GetRealHeight(340);
- this.Radius = (uint)Application.GetMinRealAverage(20);
- this.BackgroundColor = UserCenterColor.Current.White;
}
/// <summary>
@@ -49,17 +51,24 @@
this.btnReGarrisonGarrison = null;
this.btnRemovehomeGarrison = null;
+ this.frameTable = new FrameLayout();
+ frameTable.Height = this.Height;
+ frameTable.Width = this.Width;
+ frameTable.Radius = (uint)Application.GetRealHeight(58);
+ frameTable.BackgroundColor = UserCenterColor.Current.White;
+ this.AddChidren(frameTable);
+
//鍙充笂鍦嗚鑳屾櫙
- var btnTopRight = new NormalViewControl(50, 50, true);
+ var btnTopRight = new NormalViewControl(150, 60, true);
btnTopRight.BackgroundColor = UserCenterColor.Current.White;
- btnTopRight.Radius = (uint)Application.GetMinRealAverage(6);
+ btnTopRight.RadiusEx = 17;
this.AddChidren(btnTopRight);
btnTopRight.X = this.Width - btnTopRight.Width;
//宸︿笅鍦嗚鑳屾櫙
- var btnBottomRight = new NormalViewControl(50, 50, true);
+ var btnBottomRight = new NormalViewControl(150, 60, true);
btnBottomRight.BackgroundColor = UserCenterColor.Current.White;
- btnBottomRight.Radius = (uint)Application.GetMinRealAverage(6);
+ btnBottomRight.RadiusEx = 17;
this.AddChidren(btnBottomRight);
btnBottomRight.Y = this.Height - btnBottomRight.Height;
@@ -68,7 +77,7 @@
{
//鍦ㄥ甯冮槻
btnAthomeGarrison = new GarrisonControl();
- this.AddChidren(btnAthomeGarrison);
+ frameTable.AddChidren(btnAthomeGarrison);
btnAthomeGarrison.InitControl(GarrisonMode.AtHome);
btnAthomeGarrison.ButtonClickEvent += (sender, e) =>
{
@@ -80,7 +89,7 @@
//绂诲甯冮槻
btnRemovehomeGarrison = new GarrisonControl();
btnRemovehomeGarrison.X = btnAthomeGarrison.Right + Application.GetRealWidth(32);
- this.AddChidren(btnRemovehomeGarrison);
+ frameTable.AddChidren(btnRemovehomeGarrison);
btnRemovehomeGarrison.InitControl(GarrisonMode.RemoveHome);
btnRemovehomeGarrison.ButtonClickEvent += (sender, e) =>
{
@@ -92,7 +101,7 @@
//鎾ら槻
btnReGarrisonGarrison = new GarrisonControl();
btnReGarrisonGarrison.X = btnRemovehomeGarrison.Right + Application.GetRealWidth(32);
- this.AddChidren(btnReGarrisonGarrison);
+ frameTable.AddChidren(btnReGarrisonGarrison);
btnReGarrisonGarrison.InitControl(GarrisonMode.RemoveGarrison);
btnReGarrisonGarrison.ButtonClickEvent += (sender, e) =>
{
@@ -104,7 +113,7 @@
//甯冮槻
btnAthomeGarrison = new GarrisonControl();
btnAthomeGarrison.X = Application.GetRealWidth(166);
- this.AddChidren(btnAthomeGarrison);
+ frameTable.AddChidren(btnAthomeGarrison);
btnAthomeGarrison.InitControl(GarrisonMode.AtHome);
btnAthomeGarrison.ButtonClickEvent += (sender, e) =>
{
@@ -116,7 +125,7 @@
//鎾ら槻
btnReGarrisonGarrison = new GarrisonControl();
btnReGarrisonGarrison.X = btnAthomeGarrison.Right + Application.GetRealWidth(32);
- this.AddChidren(btnReGarrisonGarrison);
+ frameTable.AddChidren(btnReGarrisonGarrison);
btnReGarrisonGarrison.InitControl(GarrisonMode.RemoveGarrison);
btnReGarrisonGarrison.ButtonClickEvent += (sender, e) =>
{
@@ -159,8 +168,7 @@
//濡傛灉璁剧疆鏈夊唴閮ㄩ槻鍖�
string msg = string.Empty;
if (HdlSafeguardLogic.Current.IsHadInternalDefenseArea() == true)
-
- {
+ {
//鍦ㄥ甯冮槻璁剧疆鎴愬姛
msg = Language.StringByID(R.MyInternationalizationString.uSetAtHomeGarrisonSuccess);
}
@@ -169,18 +177,8 @@
//甯冮槻璁剧疆鎴愬姛
msg = Language.StringByID(R.MyInternationalizationString.uSetGarrisonSuccess);
}
-
- if (UserCenterResourse.DicActionForm.ContainsKey("SafetyManagementMainForm") == true)
- {
- //娣诲姞甯冮槻涓婃姤鐨勮鎺т欢
- var form = (Safety.SafetyManagementMainForm)UserCenterResourse.DicActionForm["SafetyManagementMainForm"];
- form?.AddSafeguardLogPushRow(null);
- }
- else
- {
- var control = new ShowMsgControl(ShowMsgType.Tip, msg);
- control.Show();
- }
+ var control = new ShowMsgControl(ShowMsgType.Tip, msg);
+ control.Show();
});
}
@@ -209,19 +207,10 @@
{
return;
}
- if (UserCenterResourse.DicActionForm.ContainsKey("SafetyManagementMainForm") == true)
- {
- //娣诲姞甯冮槻涓婃姤鐨勮鎺т欢
- var form = (Safety.SafetyManagementMainForm)UserCenterResourse.DicActionForm["SafetyManagementMainForm"];
- form?.AddSafeguardLogPushRow(null);
- }
- else
- {
- //绂诲甯冮槻璁剧疆鎴愬姛
- string msg = Language.StringByID(R.MyInternationalizationString.uSetRemoveHomeGarrisonSuccess);
- var control = new ShowMsgControl(ShowMsgType.Tip, msg);
- control.Show();
- }
+ //绂诲甯冮槻璁剧疆鎴愬姛
+ string msg = Language.StringByID(R.MyInternationalizationString.uSetRemoveHomeGarrisonSuccess);
+ var control = new ShowMsgControl(ShowMsgType.Tip, msg);
+ control.Show();
});
}
@@ -246,19 +235,10 @@
//鏍规嵁甯冮槻妯″紡锛岃缃浘鏍囩殑閫夋嫨鐘舵��
this.SetIconStatuByGarrisonMode(GarrisonMode.RemoveGarrison);
- if (UserCenterResourse.DicActionForm.ContainsKey("SafetyManagementMainForm") == true)
- {
- //娣诲姞甯冮槻涓婃姤鐨勮鎺т欢
- var form = (Safety.SafetyManagementMainForm)UserCenterResourse.DicActionForm["SafetyManagementMainForm"];
- form?.AddSafeguardLogPushRow(null);
- }
- else
- {
- //绂诲甯冮槻璁剧疆鎴愬姛
- string msg = Language.StringByID(R.MyInternationalizationString.uRemoveGarrisonSuccess);
- var control = new ShowMsgControl(ShowMsgType.Tip, msg);
- control.Show();
- }
+ //绂诲甯冮槻璁剧疆鎴愬姛
+ string msg = Language.StringByID(R.MyInternationalizationString.uRemoveGarrisonSuccess);
+ var control = new ShowMsgControl(ShowMsgType.Tip, msg);
+ control.Show();
});
}
@@ -373,7 +353,7 @@
int backHeight = Application.GetMinRealAverage(132);
btnBack = new NormalViewControl(backHeight, backHeight, false);
btnBack.Gravity = Gravity.CenterHorizontal;
- btnBack.Radius = (uint)backHeight;
+ btnBack.Radius = (uint)backHeight / 2;
btnBack.BackgroundColor = UserCenterColor.Current.BodyFrameLayout;
this.AddChidren(btnBack, ChidrenBindMode.BindEventOnly);
--
Gitblit v1.8.0