From ecba45c93391066bc30c7bd602c3a7683fbb99a7 Mon Sep 17 00:00:00 2001 From: xm <1271024303@qq.com> Date: 星期五, 31 七月 2020 10:56:12 +0800 Subject: [PATCH] 临时备份 --- ZigbeeApp/Shared/Phone/MainPage/HomeMainPageForm.cs | 48 ++++-------------------------------------------- 1 files changed, 4 insertions(+), 44 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/MainPage/HomeMainPageForm.cs b/ZigbeeApp/Shared/Phone/MainPage/HomeMainPageForm.cs index 636fc83..4e2b13b 100755 --- a/ZigbeeApp/Shared/Phone/MainPage/HomeMainPageForm.cs +++ b/ZigbeeApp/Shared/Phone/MainPage/HomeMainPageForm.cs @@ -85,8 +85,6 @@ this.AddNormalDeviceReportEvent(); //娣诲姞浼犳劅鍣ㄧ姸鎬佷笂鎶ヤ簨浠� this.AddSensorDeviceReportEvent(); - //寮�鍚紶鎰熷櫒鐘舵�佽繕鍘熺殑绾跨▼ - this.StartRecoverSenorStatuThread(); } /// <summary> @@ -546,8 +544,8 @@ bodyFrameLayout.RemoveAll(); bodyFrameLayout.Height = Application.GetRealHeight(750); this.listBodyContr.RecoverTableHeight(); - this.dicSceneCardControl = new Dictionary<int, Controls.SceneCardControl>(); - this.dicDeviceCardControl = new Dictionary<string, Controls.DeviceCardCommon>(); + this.dicSceneCardControl.Clear(); + this.dicDeviceCardControl.Clear(); var listDevice = new List<CommonDevice>(); foreach (var mainkeys in HdlRoomLogic.Current.NowMainPageRoom.ListDevice) @@ -806,8 +804,8 @@ bodyFrameLayout.RemoveAll(); bodyFrameLayout.Height = Application.GetRealHeight(750); this.listBodyContr.RecoverTableHeight(); - this.dicSceneCardControl = new Dictionary<int, Controls.SceneCardControl>(); - this.dicDeviceCardControl = new Dictionary<string, Controls.DeviceCardCommon>(); + this.dicSceneCardControl.Clear(); + this.dicDeviceCardControl.Clear(); var listScene = new List<SceneUI>(); foreach (int sceneId in HdlRoomLogic.Current.NowMainPageRoom.ListSceneId) @@ -1158,44 +1156,6 @@ } }, ShowErrorMode.NO); - }); - } - - #endregion - - #region 鈻� 浼犳劅鍣ㄧ姸鎬佽繕鍘焈____________________ - - /// <summary> - /// 寮�鍚紶鎰熷櫒鐘舵�佽繕鍘熺殑绾跨▼ - /// </summary> - private void StartRecoverSenorStatuThread() - { - HdlThreadLogic.Current.RunThread(() => - { - while (this.Parent != null) - { - try - { - var dicControl = this.dicDeviceCardControl; - foreach (var contr in dicControl.Values) - { - //濡傛灉鏄紶鎰熷櫒,鍒欏埛鏂扮姸鎬� - if (contr.device.Type == DeviceType.IASZone && contr.Parent != null - && ((IASZone)contr.device).iASInfo == null) - { - HdlThreadLogic.Current.RunMain(() => - { - //璁惧鐘舵�佸繀椤诲埛鏂� - string statuText = HdlDeviceOtherLogic.Current.GetDeviceStatu(contr.device); - contr.SetDeviceStatuText(statuText); - - }, ShowErrorMode.NO); - } - } - System.Threading.Thread.Sleep(8000); - } - catch { System.Threading.Thread.Sleep(3000); } - } }); } -- Gitblit v1.8.0