HDL Home App 第二版本 旧平台金堂用 正在使用
黄学彪
2019-10-10 2ed75b8b337048e5d75e6d9ec8307633134f02fd
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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
using System;
using System.Collections.Generic;
using System.Text;
 
namespace Shared.Phone.UserCenter.HdlBackup
{
    /// <summary>
    /// 自动备份的设置界面
    /// </summary>
    public class HdlAutoBackupSettionForm : EditorCommonForm
    {
        /// <summary>
        /// 画面显示(底层会固定调用此方法,借以完成画面创建)
        /// </summary>
        public void ShowForm()
        {
            //设置标题信息
            base.SetTitleText(Language.StringByID(R.MyInternationalizationString.uAutoBackupSettion));
 
            //初始化中部控件
            //this.InitMiddleFrame();
        }
 
        ///// <summary>
        ///// 初始化中部控件
        ///// </summary>
        //private void InitMiddleFrame()
        //{
        //    //清空bodyFrame
        //    this.ClearBodyFrame();
 
        //    //信息行
        //    var msgRow = new FrameLayout();
        //    msgRow.Y = Application.GetRealHeight(40);
        //    msgRow.Height = ControlCommonResourse.NormalControlHeight;
        //    bodyFrameLayout.AddChidren(msgRow);
 
        //    //检测到数据更新,是否需要备份
        //    var btnMsg = new RowCenterView(false);
        //    btnMsg.TextID = R.MyInternationalizationString.uIsHadNotBackupDataOnScan;
        //    msgRow.AddChidren(btnMsg);
 
        //    //立即备份(推荐)
        //    var statuBackupRow = new StatuRowLayout();
        //    statuBackupRow.Y = msgRow.Bottom;
        //    bodyFrameLayout.AddChidren(statuBackupRow);
        //    var btnBackup = new RowCenterView(false);
        //    string txtValue = Language.StringByID(R.MyInternationalizationString.uImmediatelyBackup);
        //    txtValue += " (" + Language.StringByID(R.MyInternationalizationString.uRecommendation) + ")";
        //    btnBackup.Text = txtValue;
        //    statuBackupRow.AddChidren(btnBackup);
 
        //    statuBackupRow.AddRightArrow();
        //    statuBackupRow.MouseUpEvent += (sender, e) =>
        //    {
        //        //确认是否上传数据到服务器?
        //        string msg = Language.StringByID(R.MyInternationalizationString.uSynchronizeDataToServiceMsg);
        //        this.ShowConfirmMsg(msg, "UpLoadBackupInfo");
        //    };
 
        //    //暂不提醒
        //    var statuNextRow = new StatuRowLayout();
        //    statuNextRow.Y = statuBackupRow.Bottom;
        //    bodyFrameLayout.AddChidren(statuNextRow);
        //    var btnNext = new RowCenterView(false);
        //    btnNext.TextID = R.MyInternationalizationString.uTemporaryStopRemind;
        //    statuNextRow.AddChidren(btnNext);
 
        //    statuNextRow.AddRightArrow();
        //    statuNextRow.MouseUpEvent += (sender, e) =>
        //    {
        //        HdlAutoBackupLogic.SaveBackupNotPrompted(false, 3);
        //        this.CloseForm();
        //    };
 
        //    //不再提示
        //    var statuNotRow = new StatuRowLayout();
        //    statuNotRow.Y = statuNextRow.Bottom;
        //    bodyFrameLayout.AddChidren(statuNotRow);
        //    var btnNotReminder = new RowCenterView(false);
        //    btnNotReminder.TextID = R.MyInternationalizationString.uNotPrompted;
        //    statuNotRow.AddChidren(btnNotReminder);
 
        //    statuNotRow.AddRightArrow();
        //    statuNotRow.MouseUpEvent += (sender, e) =>
        //    {
        //        //确认不再提示?
        //        string msg = Language.StringByID(R.MyInternationalizationString.uConfirmNotPrompted);
        //        this.ShowConfirmMsg(msg, "DoNotPrompted");
        //    };
        //}
 
        ///// <summary>
        ///// 上传数据
        ///// </summary>
        //public void UpLoadBackupInfo()
        //{
        //    //回避界面卡死问题
        //    HdlThreadLogic.Current.Run(() =>
        //    {
        //        //上传数据
        //        this.UpLoadBackupInfoAsync();
        //    });
 
        //}
 
        ///// <summary>
        ///// 上传数据
        ///// </summary>
        //public async void UpLoadBackupInfoAsync()
        //{
        //    int result = await HdlAutoBackupLogic.DoUpLoadAutoBackupData();
        //    if (result == -1)
        //    {
        //        //文件上传失败
        //        string msg = Language.StringByID(R.MyInternationalizationString.uFileUpLoadFail);
        //        this.ShowErrorMsg(msg);
 
        //        return;
        //    }
        //    //数据成功上传到服务器
        //    string msg2 = Language.StringByID(R.MyInternationalizationString.uSynchronizeDataToServiceSuccessMsg);
        //    this.ShowMassage(msg2);
 
        //    Application.RunOnMainThread(() =>
        //    {
        //        this.CloseForm();
        //    });
        //}
 
        ///// <summary>
        ///// 执行不再提示
        ///// </summary>
        //public void DoNotPrompted()
        //{
        //    HdlAutoBackupLogic.SaveBackupNotPrompted(true);
        //    this.CloseForm();
        //}
    }
}