using System;
|
using System.Collections.Generic;
|
using System.Text;
|
|
namespace Shared.Phone.UserCenter.HdlBackup
|
{
|
/// <summary>
|
/// 数据备份的菜单界面
|
/// </summary>
|
public class HdlBackupMenuForm : EditorCommonForm
|
{
|
/// <summary>
|
/// 画面显示(底层会固定调用此方法,借以完成画面创建)
|
/// </summary>
|
public void ShowForm()
|
{
|
//设置头部信息
|
base.SetTitleText(Language.StringByID(R.MyInternationalizationString.uDataBackup));
|
|
//初始化中部信息
|
this.InitMiddleFrame();
|
}
|
|
/// <summary>
|
/// 初始化中部信息
|
/// </summary>
|
private void InitMiddleFrame()
|
{
|
//清空bodyFrame
|
this.ClearBodyFrame();
|
|
//初始化【同步数据】行
|
this.InitAutoBackupRow();
|
|
//初始化【自定义备份】行
|
this.InitManualBackupRow();
|
|
//初始化【网关备份】行
|
//this.InitGatewayBackupRow();
|
}
|
|
/// <summary>
|
/// 初始化【同步数据】行
|
/// </summary>
|
private void InitAutoBackupRow()
|
{
|
var rowLayout = new FrameRowControl();
|
bodyFrameLayout.AddChidren(rowLayout);
|
//底线
|
rowLayout.AddBottomLine();
|
|
//自动同步数据
|
var txName = rowLayout.AddLeftCaption("", 800);
|
txName.TextID = R.MyInternationalizationString.uAppAutoBackup;
|
|
rowLayout.AddRightArrow();
|
|
rowLayout.ButtonClickEvent += (sender, e) =>
|
{
|
var form = new HdlAutoBackUpForm();
|
form.AddForm();
|
};
|
}
|
|
/// <summary>
|
/// 初始化【自定义备份】行
|
/// </summary>
|
private void InitManualBackupRow()
|
{
|
var rowLayout = new FrameRowControl();
|
rowLayout.Y = ControlCommonResourse.ListViewRowHeight;
|
bodyFrameLayout.AddChidren(rowLayout);
|
//底线
|
rowLayout.AddBottomLine();
|
|
//自定义备份
|
var txName = rowLayout.AddLeftCaption("", 800);
|
txName.TextID = R.MyInternationalizationString.uAppManualBackup;
|
rowLayout.AddChidren(txName);
|
|
rowLayout.AddRightArrow();
|
|
rowLayout.ButtonClickEvent += (sender, e) =>
|
{
|
var form = new HdlManualBackUpForm();
|
form.AddForm();
|
};
|
}
|
|
/// <summary>
|
/// 初始化【网关备份】行
|
/// </summary>
|
private void InitGatewayBackupRow()
|
{
|
var rowLayout = new FrameRowControl();
|
rowLayout.Y = ControlCommonResourse.ListViewRowHeight * 2;
|
bodyFrameLayout.AddChidren(rowLayout);
|
|
//网关备份
|
var txName = rowLayout.AddLeftCaption("", 800);
|
txName.TextID = R.MyInternationalizationString.uGatewayBackup;
|
rowLayout.AddChidren(txName);
|
|
rowLayout.AddRightArrow();
|
|
rowLayout.ButtonClickEvent += (sender, e) =>
|
{
|
var form = new HdlGatewayListBackUpForm();
|
form.AddForm();
|
};
|
}
|
}
|
}
|