| | |
| | | |
| | | |
| | | |
| | | //下载光伏数据 |
| | | 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}"); |
| | | } |
| | | ////下载光伏数据 |
| | | //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(); |
| | | //}) { IsBackground = true }.Start(); |
| | | |
| | | |
| | | |