From 66a9965c44ecc32a6696abca876ab9d1cd091584 Mon Sep 17 00:00:00 2001 From: gxc <guoxuecheng@guoxuechengdeMacBook-Pro.local> Date: 星期五, 28 二月 2020 15:25:13 +0800 Subject: [PATCH] 2020.2.28 --- ZigbeeApp/Shared/Phone/UserCenter/Residence/ResidenceListForm.cs | 53 +++++++++++++++++++++++------------------------------ 1 files changed, 23 insertions(+), 30 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Residence/ResidenceListForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Residence/ResidenceListForm.cs index bcfc50f..48bf303 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/Residence/ResidenceListForm.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/Residence/ResidenceListForm.cs @@ -117,11 +117,20 @@ listResidenceSort.Add(pageData.PageData[i].Id); } } + for (int i = 0; i < listResidenceSort.Count; i++) + { + //绉婚櫎鎺変笉瀛樺湪浜嗙殑椤哄簭 + if (dicData.ContainsKey(listResidenceSort[i]) == false) + { + listResidenceSort.RemoveAt(i); + i--; + } + } //淇濆瓨椤哄簭 string fullName = UserCenterLogic.CombinePath(DirNameResourse.LocalMemoryDirectory, DirNameResourse.ResidenceSortFile); UserCenterLogic.SaveFileContent(fullName, listResidenceSort); - Application.RunOnMainThread(() => + HdlThreadLogic.Current.RunMain(() => { if (this.Parent == null) { @@ -132,6 +141,10 @@ this.dicResidenceData = new Dictionary<string, Common.ResponseEntity.ResidenceObj>(); for (int i = 0; i < listResidenceSort.Count; i++) { + if (dicData.ContainsKey(listResidenceSort[i]) == false) + { + continue; + } var info = dicData[listResidenceSort[i]]; if (info.IsOthreShare == false) { @@ -206,16 +219,19 @@ { HdlThreadLogic.Current.RunThread(async () => { - ProgressBar.Show(); + this.ShowProgressBar(); + Config.Instance.HomeId = info.Id; Global.CreateHomeDirectory(info.Id); + //閲嶆柊鍒濆鍖栦綇瀹呭璞� + Config.Instance.Home = House.GetHouseByHouseId(info.Id); Config.Instance.Save(); //鍒锋柊涓汉涓績鐨勫唴瀛樺強绾跨▼ - await UserCenterLogic.InitUserCenterMenmoryAndThread(); + await UserCenterLogic.InitUserCenterMenmoryAndThread(false); Room.InitAllRoom(); - Application.RunOnMainThread(() => + HdlThreadLogic.Current.RunMain(() => { //閲嶆柊鍒锋柊鍒楄〃 this.listView.RemoveAll(); @@ -264,7 +280,7 @@ private void ShowEditorNameForm(Common.ResponseEntity.ResidenceObj info, NormalViewControl btnHome) { //鐢熸垚涓�涓脊绐楃敾闈� - var dialogForm = new DialogInputFrameControl(this, DialogFrameMode.OnlyInput); + var dialogForm = new DialogInputControl(); //缂栬緫浣忓畢 dialogForm.SetTitleText(Language.StringByID(R.MyInternationalizationString.uChangedName)); //璇疯緭鍏ヤ綇瀹呭悕绉� @@ -340,7 +356,7 @@ private void ShowAddNameForm() { //鐢熸垚涓�涓脊绐楃敾闈� - var dialogForm = new DialogInputFrameControl(this, DialogFrameMode.OnlyInput); + var dialogForm = new DialogInputControl(); //鍒涘缓浣忓畢 dialogForm.SetTitleText(Language.StringByID(R.MyInternationalizationString.uCreatResidence)); //璇疯緭鍏ヤ綇瀹呭悕绉� @@ -513,7 +529,7 @@ public PageSettingInfo PageSetting = new PageSettingInfo() { Page = 1, - PageSize = 500 + PageSize = 5000 }; } @@ -545,29 +561,6 @@ /// ZigbeeHomeGuid /// </summary> public string Id = string.Empty; - } - - /// <summary> - /// 缂栬緫浣忓畢鐨勫惎鍔ㄥ弬鏁� - /// </summary> - public class EditorResidencePra : IfacePraCommon - { - /// <summary> - /// RequestVersion - /// </summary> - public string RequestVersion = Common.CommonPage.RequestVersion; - /// <summary> - /// LoginAccessToken - /// </summary> - public string LoginAccessToken = Common.Config.Instance.Token; - /// <summary> - /// ZigbeeHomeId - /// </summary> - public string HomeId = ""; - /// <summary> - /// Name - /// </summary> - public string Name = string.Empty; } #endregion -- Gitblit v1.8.0