From 5428935270159bfc42c2934ed7fb1091554fc9a4 Mon Sep 17 00:00:00 2001 From: 黄学彪 <hxb@hdlchina.com.cn> Date: 星期四, 09 七月 2020 17:12:42 +0800 Subject: [PATCH] 修改了 sokect --- ZigbeeApp/Shared/Phone/UserCenter/Residence/ResidenceManagementForm.cs | 37 +++++-------------------------------- 1 files changed, 5 insertions(+), 32 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Residence/ResidenceManagementForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Residence/ResidenceManagementForm.cs index 09a400e..dee8d57 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/Residence/ResidenceManagementForm.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/Residence/ResidenceManagementForm.cs @@ -24,14 +24,6 @@ /// </summary> private VerticalFrameControl listBackContr = null; /// <summary> - /// 妤煎眰椤哄簭 - /// </summary> - private List<string> listFloorSort = new List<string>(); - /// <summary> - /// 鎴块棿椤哄簭 - /// </summary> - private List<string> listRoomSort = new List<string>(); - /// <summary> /// 褰撳墠APP鐨勪綇瀹呮ā寮� 0:杩樻病鏈夎缃湁妯″紡 1:妤煎眰妯″紡 2:娌℃湁妤煎眰妯″紡 /// </summary> private int AppResidenceMode = 0; @@ -282,23 +274,17 @@ { //鑾峰彇妤煎眰 var dicFloor = HdlRoomLogic.Current.GetFloorSortList(); - this.listFloorSort.Clear(); - foreach (string keys in dicFloor.Keys) - { - listFloorSort.Add(keys); - } - - if (Common.Config.Instance.Home.FloorDics.Count == 0) + if (dicFloor.Count == 0) { return; } HdlThreadLogic.Current.RunMainInThread(() => { - int count = listFloorSort.Count - 1; - for (int i = 0; i < listFloorSort.Count; i++) + int count = dicFloor.Count; + foreach (var keys in dicFloor.Keys) { - string keys = listFloorSort[i]; - this.AddFloorRow(keys, dicFloor[keys], i != count); + count--; + this.AddFloorRow(keys, dicFloor[keys], count != 0); } //璋冩暣鎺т欢楂樺害 this.AdjustContrlTableHeight(); @@ -392,9 +378,6 @@ HdlRoomLogic.Current.RemoveRoom(roomId); } Common.Config.Instance.Home.Save(); - //淇濆瓨椤哄簭 - listFloorSort.Remove(keys); - HdlRoomLogic.Current.SaveFloorSort(listFloorSort); if (Common.Config.Instance.Home.FloorDics.Count == 0) { @@ -540,12 +523,6 @@ { //鑾峰彇妤煎眰鐨勬埧闂� var listRoom = HdlRoomLogic.Current.GetFloorSortRoom(string.Empty); - this.listRoomSort.Clear(); - for (int i = 0; i < listRoom.Count; i++) - { - this.listRoomSort.Add(listRoom[i].Id); - } - for (int i = 0; i < listRoom.Count; i++) { //娣诲姞鎴块棿琛� @@ -593,7 +570,6 @@ //濡傛灉鏄垎浜殑鎴块棿锛屼笉鑳界紪杈戝拰淇敼 return; } - //缂栬緫 var btnEditor = frameRow.AddEditorControl(); btnEditor.ButtonClickEvent += (sender, e) => @@ -614,9 +590,6 @@ this.ShowMassage(ShowMsgType.Confirm, Language.StringByID(R.MyInternationalizationString.uDeleteRoomMsg), () => { HdlRoomLogic.Current.RemoveRoom(room.Id); - //淇濆瓨椤哄簭 - this.listRoomSort.Remove(room.Id); - HdlRoomLogic.Current.SaveRoomSort(string.Empty, this.listRoomSort); var listAllRoom = HdlRoomLogic.Current.GetAllListRooms(); if (listAllRoom.Count <= 1) -- Gitblit v1.8.0