WJC
2019-10-24 528c105b3aea0e6e00477365f16f57c1e3d7eb1c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
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();
            };
        }
    }
}