From 017af840d60fd6a56da9711308bf8239cb7fc1e6 Mon Sep 17 00:00:00 2001 From: JLChen <551775569@qq.com> Date: 星期五, 13 十一月 2020 11:01:01 +0800 Subject: [PATCH] 2020-11-13 1.部分接口替换备份 --- HDL_ON/UI/UI2/4-PersonalCenter/PersonalDataPageBLL.cs | 44 ++++++++++++++++++++++++++++++++++++++------ 1 files changed, 38 insertions(+), 6 deletions(-) diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/PersonalDataPageBLL.cs b/HDL_ON/UI/UI2/4-PersonalCenter/PersonalDataPageBLL.cs index 90f7720..84049af 100644 --- a/HDL_ON/UI/UI2/4-PersonalCenter/PersonalDataPageBLL.cs +++ b/HDL_ON/UI/UI2/4-PersonalCenter/PersonalDataPageBLL.cs @@ -1,4 +1,5 @@ 锘縰sing System; +using HDL_ON.DAL.Server; using HDL_ON.Entity; using Shared; @@ -38,10 +39,39 @@ { btnLogout.MouseUpEventHandler += (sender, e) => { + #region 淇濆瓨鏈湴鏁版嵁鑷虫枃浠跺す + string oldRegionRootPath = FileUtils.CreateRegionBackup(DB_ResidenceData.residenceData.CurReginID.ToString()); + new System.Threading.Thread(() => + { + try + { + var backuplist = FileUtils.ReadFiles(); + FileUtils.DeleteRegionFiles(oldRegionRootPath); + //绉诲姩鏂囦欢 + foreach (var fileName in backuplist) + { + System.IO.FileInfo fileInfo = new System.IO.FileInfo(FileUtils.RootPath + fileName); + if (fileInfo.Exists) + { + fileInfo.MoveTo(oldRegionRootPath + fileName); + MainPage.Log("move file : " + fileName); + } + } + } + catch (Exception ex) + { + MainPage.Log($"xxx:{ex.Message}"); + } + finally + { + FileUtils.DeleteAllFile(); + } + }).Start(); + #endregion + MainPage.LoginUser.lastTime = DateTime.MinValue; MainPage.LoginUser.SaveUserInfo(); MainPage.GoLoginPage(MainPage.LoginUser); - FileUtils.DeleteAllFile(); DB_ResidenceData.residenceData.EixtAccount(); }; } @@ -88,6 +118,7 @@ } }), pid.ToString(), 1, 1); pictureOptionView.RemoveFromParent(); + baseView.RemoveFromParent(); }; btnAlbum.MouseUpEventHandler = (sender, e) => @@ -116,6 +147,7 @@ } }, pid.ToString(), 1, 1); pictureOptionView.RemoveFromParent(); + baseView.RemoveFromParent(); }; } @@ -132,7 +164,7 @@ { new Tip() { - CloseTime = 3, + CloseTime = 1, Text = Language.StringByID(StringId.UesrNameCannotBeEmpty), Direction = AMPopTipDirection.None, }.Show(bodyView); @@ -148,8 +180,8 @@ { try { - var responsePack = new DAL.Server.HttpServerRequest().EditUserName(str); - if (responsePack.StateCode.ToUpper() == "SUCCESS") + var responsePack = new HttpServerRequest().EditUserName(str); + if (responsePack.StateCode.ToUpper() == HttpUtil.SUCCESS_CODE) { MainPage.LoginUser.userName = str; MainPage.LoginUser.SaveUserInfo(); @@ -177,7 +209,7 @@ var tip = new Tip() { Text = tipStr, - CloseTime = 3, + CloseTime = 1, Direction = AMPopTipDirection.None }; tip.Show(bodyView); @@ -198,7 +230,7 @@ }) { IsBackground = true }.Start(); }; - new PublicAssmebly().LoadDialog_EditParater(StringId.UesrName, MainPage.LoginUser.userName, callBack, StringId.UesrNameCannotBeEmpty, 0, new System.Collections.Generic.List<string>()); + new PublicAssmebly().LoadDialog_EditParater(StringId.ChangeName, MainPage.LoginUser.userName, callBack, StringId.UesrNameCannotBeEmpty, 0, new System.Collections.Generic.List<string>()); }; btnUserName.MouseUpEventHandler = eventHandler; btnEditUserNameIcon.MouseUpEventHandler = eventHandler; -- Gitblit v1.8.0