| | |
| | | endTime = DateTime.Now.AddSeconds(5); |
| | | |
| | | MainPage.Log($"读取设备信息成功"); |
| | | MainPage.Log($"sid列表获取===="+ deviceResult.Data.ToString()); |
| | | var deviceList = Newtonsoft.Json.JsonConvert.DeserializeObject<DevcieApiPack>(deviceResult.Data.ToString()); |
| | | if (deviceList == null) |
| | | { |
| | |
| | | } |
| | | }) |
| | | { IsBackground = true }.Start(); |
| | | |
| | | |
| | | |
| | | |
| | | ////下载光伏数据 |
| | | //new System.Threading.Thread(() => { |
| | | // try |
| | | // {//00 |
| | | // HttpServerRequest http = new HttpServerRequest(); |
| | | // var packData = http.GetInverterList(); |
| | | // if (packData != null) |
| | | // { |
| | | // if (packData.Code == StateCode.SUCCESS) |
| | | // { |
| | | // var inverterList = JsonConvert.DeserializeObject<List<InverterInfo>>(packData.Data.ToString()); |
| | | // if (inverterList!= null) |
| | | // { |
| | | // FunctionList.List.InverterList = inverterList; |
| | | // } |
| | | // } |
| | | // } |
| | | // } |
| | | // catch (Exception ex) |
| | | // { |
| | | // MainPage.Log($"读取光伏数据异常:{ex.Message}"); |
| | | // } |
| | | |
| | | //}) { IsBackground = true }.Start(); |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | FileUtlis.Files.DeleteFile(file); |
| | | } |
| | | } |
| | | FunctionList.List.securities.Clear(); |
| | | foreach (var function in infoList) |
| | | { |
| | | function.SaveFile(); |