using System; using System.Collections.Generic; using System.Text; namespace Shared.Phone.UserCenter.HdlBackup { /// /// 自动备份的设置界面 /// public class HdlAutoBackupSettionForm : EditorCommonForm { /// /// 画面显示(底层会固定调用此方法,借以完成画面创建) /// public void ShowForm() { //设置标题信息 base.SetTitleText(Language.StringByID(R.MyInternationalizationString.uAutoBackupSettion)); //初始化中部控件 //this.InitMiddleFrame(); } ///// ///// 初始化中部控件 ///// //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"); // }; //} ///// ///// 上传数据 ///// //public void UpLoadBackupInfo() //{ // //回避界面卡死问题 // HdlThreadLogic.Current.Run(() => // { // //上传数据 // this.UpLoadBackupInfoAsync(); // }); //} ///// ///// 上传数据 ///// //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(); // }); //} ///// ///// 执行不再提示 ///// //public void DoNotPrompted() //{ // HdlAutoBackupLogic.SaveBackupNotPrompted(true); // this.CloseForm(); //} } }