using System;
using System.Collections.Generic;
using System.Text;
namespace Shared.Phone.UserCenter.Safety
{
///
/// 安防密码的菜单界面
///
public class SafetyPasswordMenuForm : EditorCommonForm
{
#region ■ 变量声明___________________________
#endregion
#region ■ 初始化_____________________________
///
/// 画面显示(底层会固定调用此方法,借以完成画面创建)
///
public void ShowForm()
{
//设置头部信息
base.SetTitleText(Language.StringByID(R.MyInternationalizationString.uSafetyPasswordSettion));
//初始化中部信息
this.InitMiddleFrame();
}
///
/// 初始化中部信息
///
private void InitMiddleFrame()
{
//清空bodyFrame
this.ClearBodyFrame();
var listView = new VerticalListControl(29);
listView.Y = Application.GetRealHeight(-6);
listView.Height = Application.GetRealHeight(335);
listView.BackgroundColor = UserCenterColor.Current.White;
bodyFrameLayout.AddChidren(listView);
//添加【用户密码】行
var rowUserPsw = new FrameRowControl(listView.rowSpace / 2);
listView.AddChidren(rowUserPsw);
//图标
var btnUserPswIcon = rowUserPsw.AddLeftIcon(81);
btnUserPswIcon.UnSelectedImagePath = "Item/Point.png";
//用户密码
var btnUserPswText = rowUserPsw.AddLeftCaption(Language.StringByID(R.MyInternationalizationString.uUserPassword), 700);
btnUserPswText.TextSize = 15;
//向右的图标
rowUserPsw.AddRightArrow();
//底线
rowUserPsw.AddBottomLine();
rowUserPsw.ButtonClickEvent +=async (sender, e) =>
{
//打开画面之前,先校验管理员密码
bool result = await HdlSafeguardLogic.Current.ShowSafetyAdminValidatedDialog();
if (result == false)
{
return;
}
var form = new UserPasswordListForm();
form.AddForm();
};
//添加【胁迫密码】行
var rowCoercePsw = new FrameRowControl(listView.rowSpace / 2);
listView.AddChidren(rowCoercePsw);
//图标
var btnCoercePswIcon = rowCoercePsw.AddLeftIcon(81);
btnCoercePswIcon.UnSelectedImagePath = "Item/Point.png";
//胁迫密码
var btnCoercePswText = rowCoercePsw.AddLeftCaption(Language.StringByID(R.MyInternationalizationString.uCoercePassword), 700);
btnCoercePswText.TextSize = 15;
//向右的图标
rowCoercePsw.AddRightArrow();
rowCoercePsw.ButtonClickEvent += async (sender, e) =>
{
//打开画面之前,先校验管理员密码
bool result = await HdlSafeguardLogic.Current.ShowSafetyAdminValidatedDialog();
if (result == false)
{
return;
}
var form = new CoercePasswordMainForm();
form.AddForm();
};
}
#endregion
}
}