From 4f40e8385ff6725be8e8b642e50f9f7201a27dfa Mon Sep 17 00:00:00 2001
From: wei <kaede@kaededeMacBook-Air.local>
Date: 星期五, 11 十二月 2020 15:58:32 +0800
Subject: [PATCH] Merge branch 'NewFilePath' of http://172.16.1.23:6688/r/~wxr/HDL_APP_Project into NewFilePath
---
HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPageBLL.cs | 80 ++++++++++++++++++++--------------------
1 files changed, 40 insertions(+), 40 deletions(-)
diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPageBLL.cs b/HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPageBLL.cs
index 4cdd3c0..e00aa2f 100644
--- a/HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPageBLL.cs
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPageBLL.cs
@@ -177,14 +177,14 @@
/// <param name="homeTemp"></param>
void LoadEvent_ChangeCurHome(RegionInfoRes homeTemp)
{
- if (DB_ResidenceData.residenceData.CurReginID == homeTemp.RegionID)
+ if (UserInfo.Current.CurReginID == homeTemp.RegionID)
{
return;
}
- string oldRegionRootPath = FileUtils.CreateRegionBackup(DB_ResidenceData.residenceData.CurReginID.ToString());
- string newRegionRootPath = FileUtils.CreateRegionBackup(homeTemp.RegionID.ToString());
- DB_ResidenceData.residenceData.CurReginID = homeTemp.RegionID;
- DB_ResidenceData.residenceData.SaveResidenceData();
+ //string oldRegionRootPath = FileUtils.CreateRegionBackup(DB_ResidenceData.residenceData.CurReginID.ToString());
+ //string newRegionRootPath = FileUtils.CreateRegionBackup(homeTemp.RegionID.ToString());
+ UserInfo.Current.CurReginID = homeTemp.RegionID;
+ UserInfo.Current.SaveUserInfo();
var waitPage = new Loading();
bodyView.AddChidren(waitPage);
waitPage.Start(Language.StringByID(StringId.PleaseWait));
@@ -192,43 +192,43 @@
{
try
{
- var backuplist = FileUtils.ReadFiles();
- int index = 0;
- FileUtils.DeleteRegionFiles(oldRegionRootPath);
- //绉诲姩鏂囦欢
- foreach (var fileName in backuplist)
- {
- System.IO.FileInfo fileInfo = new System.IO.FileInfo(FileUtils.RootPath + fileName);
- if (fileName.Contains(ImageUtlis.HEADIMAGE) || fileName == OnAppConfig.ConfigFile)
- {
- continue;
- }
- if (fileInfo.Exists)
- {
- fileInfo.MoveTo(oldRegionRootPath + fileName);
- MainPage.Log("move file : " + fileName);
- }
- index++;
- Application.RunOnMainThread(() =>
- {
- int pro = (int)(index * 1.0 / backuplist.Count * 50);
- waitPage.Text = pro.ToString() + "%";
- });
- }
- //鍒犻櫎鏈湴鏂囦欢
- foreach (var fileName in backuplist)
- {
- if (fileName.Contains(ImageUtlis.HEADIMAGE))
- {
- continue;
- }
- FileUtils.DeleteFile(fileName);
- }
- //鍊掑嚭鏂颁綇瀹呮暟鎹�
- FileUtils.RestoreRegionFiles(newRegionRootPath);
+ //var backuplist = FileUtils.ReadFiles();
+ //int index = 0;
+ //FileUtils.DeleteRegionFiles(oldRegionRootPath);
+ ////绉诲姩鏂囦欢
+ //foreach (var fileName in backuplist)
+ //{
+ // System.IO.FileInfo fileInfo = new System.IO.FileInfo(FileUtils.RootPath + fileName);
+ // if (fileName.Contains(ImageUtlis.HEADIMAGE) || fileName == OnAppConfig.ConfigFile)
+ // {
+ // continue;
+ // }
+ // if (fileInfo.Exists)
+ // {
+ // fileInfo.MoveTo(oldRegionRootPath + fileName);
+ // MainPage.Log("move file : " + fileName);
+ // }
+ // index++;
+ // Application.RunOnMainThread(() =>
+ // {
+ // int pro = (int)(index * 1.0 / backuplist.Count * 50);
+ // waitPage.Text = pro.ToString() + "%";
+ // });
+ //}
+ ////鍒犻櫎鏈湴鏂囦欢
+ //foreach (var fileName in backuplist)
+ //{
+ // if (fileName.Contains(ImageUtlis.HEADIMAGE))
+ // {
+ // continue;
+ // }
+ // FileUtils.DeleteFile(fileName);
+ //}
+ ////鍊掑嚭鏂颁綇瀹呮暟鎹�
+ //FileUtils.RestoreRegionFiles(newRegionRootPath);
+ UserInfo.Current.CurReginID = homeTemp.RegionID;
UserInfo.Current.SaveUserInfo();
DB_ResidenceData.residenceData.EixtAccount();
- DB_ResidenceData.residenceData.CurReginID = homeTemp.RegionID;
OnAppConfig.Instance.SaveUserConfig();
SpatialInfo.CurrentSpatial.InitRoomFunction();
DB_ResidenceData.residenceData.SaveResidenceData();
--
Gitblit v1.8.0