From 71f1df7772feec5cf83feefa851608adac18e005 Mon Sep 17 00:00:00 2001
From: gxc <guoxuecheng@guoxuechengdeMacBook-Pro.local>
Date: 星期三, 06 十一月 2019 17:45:23 +0800
Subject: [PATCH] 2019.11.6
---
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlShardLogic.cs | 50 +++++++++++++++-----------------------------------
1 files changed, 15 insertions(+), 35 deletions(-)
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlShardLogic.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlShardLogic.cs
index 0970bc3..07ebc6e 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlShardLogic.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlShardLogic.cs
@@ -57,19 +57,12 @@
//鏂囦欢澶�
string strDir = System.IO.Path.Combine(DirNameResourse.LocalMemoryDirectory, DirNameResourse.DownLoadShardDirectory);
- //涓嶅厑璁告寜绯荤粺鐨勮繑鍥為敭
- Shared.Common.CommonPage.BackKeyCanClick = false;
- UserCenterResourse.Option.AppCanSignout = false;
-
foreach (string keys in listDistributedMark)
{
var dataPra = new { DistributedMark = keys, HouseDistributedMark = Common.Config.Instance.Home.Id, IsOtherAccountControl = Common.Config.Instance.isAdministrator };
var result = await UserCenterLogic.GetResponseDataByRequestHttps("ZigbeeDataShare/GetOneShareData", false, dataPra);
if (result == null)
{
- //鍏佽鎸夌郴缁熺殑杩斿洖閿�
- Shared.Common.CommonPage.BackKeyCanClick = true;
- UserCenterResourse.Option.AppCanSignout = true;
return null;
}
var dataResult = Newtonsoft.Json.JsonConvert.DeserializeObject<GetShardInfoResult>(result);
@@ -80,10 +73,6 @@
//璁剧疆杩涘害鍊�
ProgressBar.SetValue(1);
}
-
- //鍏佽鎸夌郴缁熺殑杩斿洖閿�
- Shared.Common.CommonPage.BackKeyCanClick = true;
- UserCenterResourse.Option.AppCanSignout = true;
return listFile;
}
@@ -108,28 +97,27 @@
/// <summary>
/// 鑾峰彇鏈湴鍏ㄩ儴鐨勫叡浜枃浠�
/// </summary>
+ /// <param name="room">鎸囧畾鍙幏鍙栨寚瀹氭埧闂寸殑</param>
/// <returns></returns>
- public List<string> GetLocalAllShardFile()
+ public List<string> GetLocalAllShardFile(Common.Room room = null)
{
string path = UserCenterLogic.CombinePath(DirNameResourse.LocalMemoryDirectory, DirNameResourse.DownLoadShardDirectory);
var listFile = HdlAutoBackupLogic.GetFileFromDirectory(path);
-
- return listFile;
- }
-
- /// <summary>
- /// 鏂囦欢鏄惁瀛樺湪
- /// </summary>
- /// <param name="fileName"></param>
- /// <returns></returns>
- public bool IsFileExists(string fileName)
- {
- string fullName = UserCenterLogic.CombinePath(DirNameResourse.LocalMemoryDirectory, DirNameResourse.DownLoadShardDirectory, fileName);
- if (System.IO.File.Exists(fullName) == false)
+ if (room == null)
{
- return false;
+ return listFile;
}
- return true;
+ //鎴块棿
+ var listRoomFile = new List<string>() { room.FileName };
+ //鍦烘櫙鏂囦欢
+ listRoomFile.AddRange(room.SceneUIFilePathList);
+ //璁惧鏂囦欢
+ foreach (var uiName in room.DeviceUIFilePathList)
+ {
+ string deviceName = uiName.Replace("DeviceUI_", string.Empty);
+ listRoomFile.Add(deviceName);
+ }
+ return null;
}
#endregion
@@ -480,10 +468,6 @@
//鑾峰彇涓婁紶鐨勬枃浠�,鐒跺悗灏嗘枃浠跺鍒跺埌鎸囧畾鏂囦欢澶�
var listFile = this.GetUploadListFile(ref roomTemp, listDevice, listScene, listChirdDevice, listChirdScene);
- //涓嶅厑璁告寜绯荤粺鐨勮繑鍥為敭
- Shared.Common.CommonPage.BackKeyCanClick = false;
- UserCenterResourse.Option.AppCanSignout = false;
-
//鎵撳紑杩涘害鏉�
ProgressBar.Show();
//璁剧疆鏈�澶у��
@@ -492,10 +476,6 @@
var result = await this.DoUploadShardContent(memberShardInfo, nowRoom, listFile);
//鍏抽棴杩涘害鏉�
ProgressBar.Close();
-
- //鍏佽鎸夌郴缁熺殑杩斿洖閿�
- Shared.Common.CommonPage.BackKeyCanClick = true;
- UserCenterResourse.Option.AppCanSignout = true;
if (result == false)
{
--
Gitblit v1.8.0