using System;
|
using HDL_ON.UI.CSS;
|
using Shared;
|
|
namespace HDL_ON.UI
|
{
|
public class FacePassagePage : FrameLayout
|
{
|
FrameLayout bodyView;
|
/// <summary>
|
/// 面容id
|
/// </summary>
|
string faceid = "";
|
|
public FacePassagePage()
|
{
|
bodyView = this;
|
}
|
|
public void LoadPage()
|
{
|
new TopViewDiv(bodyView, Language.StringByID(StringId.FacePassage)).LoadTopView();
|
bodyView.BackgroundColor = CSS_Color.BackgroundColor;
|
|
|
var contentView = new FrameLayout()
|
{
|
Y = Application.GetRealHeight(64),
|
Height = Application.GetRealHeight(667-64),
|
};
|
bodyView.AddChidren(contentView);
|
|
var topView = new FrameLayout()
|
{
|
Height = Application.GetRealHeight(189),
|
BackgroundColor = CSS_Color.MainBackgroundColor,
|
};
|
contentView.AddChidren(topView);
|
|
var btnFaceIcon = new Button()
|
{
|
Gravity = Gravity.CenterHorizontal,
|
Y = Application.GetRealHeight(20),
|
Width = Application.GetRealWidth(102),
|
Height = Application.GetRealWidth(102),
|
UnSelectedImagePath = "PersonalCenter/FacePassage/FaceIcon.png",
|
};
|
topView.AddChidren(btnFaceIcon);
|
|
var btnText1 = new Button()
|
{
|
X = Application.GetRealWidth(16),
|
Y = Application.GetRealWidth(54),
|
TextAlignment = TextAlignment.CenterLeft,
|
TextColor = CSS_Color.FirstLevelTitleColor,
|
TextSize = CSS_FontSize.SubheadingFontSize,
|
TextID = StringId.ApplyFaceIdTo,
|
IsBold = true,
|
};
|
topView.AddChidren(btnText1);
|
|
topView.AddChidren(new Button() { Height = 1,BackgroundColor = CSS_Color.DividingLineColor,Y = Application.GetRealHeight(188) ,X = Application.GetRealWidth(16),Width = Application.GetRealWidth(359)});
|
|
#region 社区门禁通行
|
var communityRow = new FrameLayout()
|
{
|
Y = topView.Bottom,
|
Height = Application.GetRealHeight(50),
|
BackgroundColor = CSS_Color.MainBackgroundColor,
|
};
|
contentView.AddChidren(communityRow);
|
|
var btnCommunityTitle = new Button()
|
{
|
X = Application.GetRealWidth(16),
|
Width = Application.GetRealWidth(300),
|
TextAlignment = TextAlignment.CenterLeft,
|
TextColor = CSS_Color.FirstLevelTitleColor,
|
TextSize = CSS_FontSize.TextFontSize,
|
TextID = StringId.CommunityAccessControl,
|
};
|
communityRow.AddChidren(btnCommunityTitle);
|
|
|
var btnCommunityAccessControlIcon = new Button()
|
{
|
X = Application.GetRealWidth(314),
|
Gravity = Gravity.CenterVertical,
|
Width = Application.GetMinRealAverage(48),
|
Height = Application.GetMinRealAverage(36),
|
UnSelectedImagePath = "Public/Switch.png",
|
SelectedImagePath = "Public/SwitchOn.png",
|
};
|
communityRow.AddChidren(btnCommunityAccessControlIcon);
|
|
|
|
#endregion
|
|
|
var btnTip = new Button()
|
{
|
Y = Application.GetRealHeight(270),
|
Height = Application.GetRealHeight(48),
|
TextAlignment = TextAlignment.Center,
|
TextColor = CSS_Color.MainColor,
|
TextSize = CSS_FontSize.TextFontSize,
|
TextID = StringId.AboutFaceIdAndPrivacy
|
};
|
contentView.AddChidren(btnTip);
|
|
|
var btnSetFaceId = new Button()
|
{
|
Y = Application.GetRealHeight(539),
|
Gravity = Gravity.CenterHorizontal,
|
Width = Application.GetRealWidth(220),
|
Height = Application.GetRealWidth(44),
|
Radius = (uint)Application.GetRealWidth(22),
|
BackgroundColor = CSS_Color.MainColor,
|
TextID = StringId.SetFace,
|
TextSize = CSS_FontSize.SubheadingFontSize,
|
TextColor = CSS_Color.MainBackgroundColor,
|
TextAlignment = TextAlignment.Center,
|
IsBold = true,
|
};
|
contentView.AddChidren(btnSetFaceId);
|
|
if (string.IsNullOrEmpty(faceid))
|
{
|
}
|
else
|
{
|
btnSetFaceId.TextID = StringId.ResetFace;
|
|
var btnEraseData = new Button()
|
{
|
Y = Application.GetRealHeight(481),
|
Gravity = Gravity.CenterHorizontal,
|
Width = Application.GetRealWidth(220),
|
Height = Application.GetRealWidth(44),
|
Radius = (uint)Application.GetRealWidth(22),
|
BackgroundColor = CSS_Color.WarningColor,
|
TextID = StringId.EraseData,
|
TextSize = CSS_FontSize.SubheadingFontSize,
|
TextColor = CSS_Color.MainBackgroundColor,
|
TextAlignment = TextAlignment.Center,
|
IsBold = true,
|
};
|
contentView.AddChidren(btnEraseData);
|
}
|
|
|
}
|
}
|
}
|