From 271015c6e90c195103cc7f34eda87966acd74dcc Mon Sep 17 00:00:00 2001 From: wei <kaede@kaededeMacBook-Air.local> Date: 星期日, 13 十二月 2020 20:46:12 +0800 Subject: [PATCH] 2020121301 --- HDL_ON/Entity/FunctionList.cs | 35 ++++++++++++----------------------- 1 files changed, 12 insertions(+), 23 deletions(-) diff --git a/HDL_ON/Entity/FunctionList.cs b/HDL_ON/Entity/FunctionList.cs index 8a5d17c..0610a77 100644 --- a/HDL_ON/Entity/FunctionList.cs +++ b/HDL_ON/Entity/FunctionList.cs @@ -216,16 +216,17 @@ /// </summary> public void Clear() { - aCs = new List<AC>(); - lights = new List<Light>(); - curtains = new List<Curtain>(); - floorHeatings = new List<FloorHeating>(); - tVs = new List<TV>(); - switchSockets = new List<SwitchSocket>(); - fans = new List<Fan>(); - sensorsEnvironmentalScience = new List<Sensor>(); - scenes = new List<Scene>(); - deviceFunctionList = null; + _FunctionList.aCs = new List<AC>(); + _FunctionList.lights = new List<Light>(); + _FunctionList.curtains = new List<Curtain>(); + _FunctionList.floorHeatings = new List<FloorHeating>(); + _FunctionList.tVs = new List<TV>(); + _FunctionList.switchSockets = new List<SwitchSocket>(); + _FunctionList.fans = new List<Fan>(); + _FunctionList.sensorsEnvironmentalScience = new List<Sensor>(); + _FunctionList.scenes = new List<Scene>(); + _FunctionList.deviceFunctionList = null; + _FunctionList = null; } /// <summary> @@ -377,19 +378,6 @@ var deviceList = Newtonsoft.Json.JsonConvert.DeserializeObject<DevcieApiPack>(pack.Data.ToString()); if (deviceList != null) { - foreach(var serverFunction in deviceList.list) - { - MainPage.Log($"deviceId:{serverFunction.deviceId}"); - } - - ////灏嗕笅杞藉埌鍒版暟鎹叏閮ㄤ繚瀛� - //new Thread(() => { - // foreach (var temp in deviceList.list) - // { - // temp.SaveFunctionData(); - // } - //}) - //{ IsBackground = true }.Start(); for (int i =0;i < List.GetDeviceFunctionList().Count;) { var localFunction = List.GetDeviceFunctionList()[i]; @@ -403,6 +391,7 @@ i++; if (localFunction.modifyTime != newFunction.modifyTime) { + MainPage.Log($"local:{localFunction.modifyTime}\r\n server:{newFunction.modifyTime}"); localFunction.name = newFunction.name; localFunction.collect = newFunction.collect; localFunction.modifyTime = newFunction.modifyTime; -- Gitblit v1.8.0