From c3e1b733fc45bd9f0b88bfb560cfa87a270b079b Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期三, 09 九月 2020 17:33:58 +0800
Subject: [PATCH] 20200909

---
 HDL_ON/UI/UI2/4-PersonalCenter/PersonalDataPageBLL.cs |   37 +++++++++++++++++++++++++++++++++----
 1 files changed, 33 insertions(+), 4 deletions(-)

diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/PersonalDataPageBLL.cs b/HDL_ON/UI/UI2/4-PersonalCenter/PersonalDataPageBLL.cs
index 90f7720..0d86008 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();
             };
         }
@@ -132,7 +161,7 @@
                     {
                         new Tip()
                         {
-                            CloseTime = 3,
+                            CloseTime = 1,
                             Text = Language.StringByID(StringId.UesrNameCannotBeEmpty),
                             Direction = AMPopTipDirection.None,
                         }.Show(bodyView);
@@ -177,7 +206,7 @@
                                     var tip = new Tip()
                                     {
                                         Text = tipStr,
-                                        CloseTime = 3,
+                                        CloseTime = 1,
                                         Direction = AMPopTipDirection.None
                                     };
                                     tip.Show(bodyView);
@@ -198,7 +227,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