From a715181089be0d31cd737a5367ffd02690b9d77f Mon Sep 17 00:00:00 2001 From: wxr <464027401@qq.com> Date: 星期四, 12 十一月 2020 13:36:01 +0800 Subject: [PATCH] 20201112 --- HDL_ON/UI/UI2/4-PersonalCenter/PersonalDataPageBLL.cs | 49 +++++++++++++++++++++++++++++++++++++++++-------- 1 files changed, 41 insertions(+), 8 deletions(-) diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/PersonalDataPageBLL.cs b/HDL_ON/UI/UI2/4-PersonalCenter/PersonalDataPageBLL.cs index d26f168..41b9bcd 100644 --- a/HDL_ON/UI/UI2/4-PersonalCenter/PersonalDataPageBLL.cs +++ b/HDL_ON/UI/UI2/4-PersonalCenter/PersonalDataPageBLL.cs @@ -38,10 +38,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(); }; } @@ -49,16 +78,18 @@ /// <summary> /// 鍔犺浇鑳屾櫙鍥鹃�夋嫨鍖哄煙浜嬩欢鍒楄〃 /// </summary> - void LoadEvent_PictureOptionViewEventList() + void LoadEvent_PictureOptionViewEventList(FrameLayout baseView) { pictureOptionView.MouseUpEventHandler = (sender, e) => { - pictureOptionView.RemoveFromParent(); + baseView.RemoveFromParent(); }; - + baseView.MouseUpEventHandler = (sender, e) => { + baseView.RemoveFromParent(); + }; btnCancel.MouseUpEventHandler = (sender, e) => { - pictureOptionView.RemoveFromParent(); + baseView.RemoveFromParent(); }; btnTakePicture.MouseUpEventHandler = (sender, e) => @@ -86,6 +117,7 @@ } }), pid.ToString(), 1, 1); pictureOptionView.RemoveFromParent(); + baseView.RemoveFromParent(); }; btnAlbum.MouseUpEventHandler = (sender, e) => @@ -114,6 +146,7 @@ } }, pid.ToString(), 1, 1); pictureOptionView.RemoveFromParent(); + baseView.RemoveFromParent(); }; } @@ -130,7 +163,7 @@ { new Tip() { - CloseTime = 3, + CloseTime = 1, Text = Language.StringByID(StringId.UesrNameCannotBeEmpty), Direction = AMPopTipDirection.None, }.Show(bodyView); @@ -175,7 +208,7 @@ var tip = new Tip() { Text = tipStr, - CloseTime = 3, + CloseTime = 1, Direction = AMPopTipDirection.None }; tip.Show(bodyView); @@ -196,7 +229,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