From 6cbd0936d3245fd7c433884ac9c1f5448a7cf657 Mon Sep 17 00:00:00 2001
From: 黄学彪 <hxb@hdlchina.com.cn>
Date: 星期五, 13 十二月 2019 13:49:44 +0800
Subject: [PATCH] 合并了代码
---
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlShardLogic.cs | 72 +++++++++++++++++++-----------------
1 files changed, 38 insertions(+), 34 deletions(-)
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlShardLogic.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlShardLogic.cs
index b9e473b..f8d5139 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlShardLogic.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlShardLogic.cs
@@ -478,7 +478,6 @@
/// <summary>
/// 鑾峰彇鎴愬憳鍏变韩鍒楄〃鐒跺悗淇濆瓨鍒版湰鍦�(鐢ㄥ畬涔嬪悗鏈�濂借皟鐢ㄦ竻绌� ClearShardDirectory鍑芥暟娓呯┖)
/// </summary>
- /// <param name="SubAccountDistributedMark">鎴愬憳鍒楄〃鎺ュ彛杩斿洖鐨凷ubAccountDistributedMark</param>
/// <param name="memberShardInfo">
/// <para>鎴愬憳鐨勫垎浜暟鎹�</para>
/// <para>濡傛灉涓嶇煡閬撹繖鏄粈涔堜笢瑗�,灏盢ew涓�涓�,鐒跺悗缂撳瓨璧锋潵,璋冪敤鍏朵粬鍑芥暟閮介渶瑕佽繖涓笢瑗�</para>
@@ -495,8 +494,9 @@
}
memberShardInfo.Refresh = false;
- //鎵撳紑杩涘害鏉�
- ProgressBar.Show();
+ //姝e湪鑾峰彇鍒嗕韩鏁版嵁
+ ProgressFormBar.Current.Start();
+ ProgressFormBar.Current.SetMsg(Language.StringByID(R.MyInternationalizationString.uShardContentGetting));
var infoPra = new
{
@@ -508,7 +508,7 @@
if (result == null)
{
//鍏抽棴杩涘害鏉�
- ProgressBar.Close();
+ ProgressFormBar.Current.Close();
return false;
}
var listData = Newtonsoft.Json.JsonConvert.DeserializeObject<List<ReceiveShardInfoResult>>(result);
@@ -543,7 +543,7 @@
if (listFile == null)
{
//鍏抽棴杩涘害鏉�
- ProgressBar.Close();
+ ProgressFormBar.Current.Close();
return false;
}
@@ -551,7 +551,7 @@
this.GetMemberShardContentListFromLocal(memberShardInfo);
//鍏抽棴杩涘害鏉�
- ProgressBar.Close();
+ ProgressFormBar.Current.Close();
return true;
}
@@ -572,41 +572,45 @@
//鍏堝垵濮嬪寲鎴块棿
foreach (string fileName in listFile)
{
- if (fileName.StartsWith("Room_") == true)
+ try
{
- //鎴块棿鏂囦欢
- var byteData = this.GetShardFileContent(fileName);
- if (byteData != null)
+ if (fileName.StartsWith("Room_") == true)
{
- string valueData = System.Text.Encoding.UTF8.GetString(byteData);
- var roomTemp = Newtonsoft.Json.JsonConvert.DeserializeObject<Common.Room>(valueData);
- memberShardInfo.dicShardRoom[fileName] = roomTemp;
+ //鎴块棿鏂囦欢
+ var byteData = this.GetShardFileContent(fileName);
+ if (byteData != null)
+ {
+ string valueData = System.Text.Encoding.UTF8.GetString(byteData);
+ var roomTemp = Newtonsoft.Json.JsonConvert.DeserializeObject<Common.Room>(valueData);
+ memberShardInfo.dicShardRoom[fileName] = roomTemp;
+ }
}
- }
- else if (fileName == DirNameResourse.ShardFloorFile)
- {
- //妤煎眰鏂囦欢
- var byteData = this.GetShardFileContent(fileName);
- if (byteData != null)
+ else if (fileName == DirNameResourse.ShardFloorFile)
{
- string valueData = System.Text.Encoding.UTF8.GetString(byteData);
- memberShardInfo.dicShardFloor = Newtonsoft.Json.JsonConvert.DeserializeObject<Dictionary<string, string>>(valueData);
+ //妤煎眰鏂囦欢
+ var byteData = this.GetShardFileContent(fileName);
+ if (byteData != null)
+ {
+ string valueData = System.Text.Encoding.UTF8.GetString(byteData);
+ memberShardInfo.dicShardFloor = Newtonsoft.Json.JsonConvert.DeserializeObject<Dictionary<string, string>>(valueData);
+ }
}
- }
- else if (fileName.StartsWith("Device_") == true)
- {
- string[] Arry = fileName.Split(new string[] { "_" }, StringSplitOptions.RemoveEmptyEntries);
- string mainKeys = Common.LocalDevice.Current.GetDeviceMainKeys(Arry[2], Convert.ToInt32(Arry[3]));
- this.dicShardDeviceFile[mainKeys] = fileName;
+ else if (fileName.StartsWith("Device_") == true)
+ {
+ string[] Arry = fileName.Split(new string[] { "_" }, StringSplitOptions.RemoveEmptyEntries);
+ string mainKeys = Common.LocalDevice.Current.GetDeviceMainKeys(Arry[2], Convert.ToInt32(Arry[3]));
+ this.dicShardDeviceFile[mainKeys] = fileName;
- //璁惧鏂囦欢
- listDeviceFile.Add(fileName);
+ //璁惧鏂囦欢
+ listDeviceFile.Add(fileName);
+ }
+ else if (fileName.StartsWith("Scene_") == true)
+ {
+ //鍦烘櫙鏂囦欢
+ listSceneFile.Add(fileName);
+ }
}
- else if (fileName.StartsWith("Scene_") == true)
- {
- //鍦烘櫙鏂囦欢
- listSceneFile.Add(fileName);
- }
+ catch (Exception ex) { HdlLogLogic.Current.WriteLog(ex); }
}
//璁剧疆鎴块棿閲岄潰璁惧鐨刄I瀵硅薄(鍥犱负杩欎釜涓滆タ鏄弽搴忓垪鍖栧嚭鏉ョ殑,璁惧UI瀵硅薄鏄笉搴忓垪鍖栧璞�)
--
Gitblit v1.8.0