| | |
| | | using System.Threading.Tasks; |
| | | using HDL_ON.DAL.Server; |
| | | using HDL_ON.Entity; |
| | | using HDL_ON.UI; |
| | | using HDL_ON.UI.UI2.FuntionControlView.Video; |
| | | using HDL_ON.UI.UI2.Intelligence.Automation; |
| | | using Newtonsoft.Json; |
| | |
| | | string code = StateCode.SUCCESS; |
| | | |
| | | Inverter.Ins.H5Page = null;//重置光伏页面 |
| | | var downloadDataThread = new System.Threading.Thread(async() => |
| | | var downloadDataThread = new System.Threading.Thread(() => |
| | | { |
| | | try |
| | | { |
| | |
| | | return; |
| | | } |
| | | MainPage.Log($"刷新个人信息成功"); |
| | | |
| | | //int count = 0; |
| | | //while (count < 10) |
| | | //{ |
| | | // if (DB_ResidenceData.Instance.CheckWhetherGatewayIdIsNull()) |
| | | // { |
| | | // System.Threading.Thread.Sleep(200); |
| | | // } |
| | | // else |
| | | // { |
| | | // break; |
| | | // } |
| | | // count++; |
| | | //} |
| | | //if (DB_ResidenceData.Instance.CheckWhetherGatewayIdIsNull()) |
| | | //{ |
| | | // return; |
| | | //} |
| | | |
| | | //return; |
| | | |
| | | try |
| | | { |
| | |
| | | catch (Exception ex){ |
| | | MainPage.Log("Error", $"读取本地数据异常:{ex.StackTrace}"); |
| | | } |
| | | |
| | | try |
| | | { |
| | | HomePage.LoadEvent_CheckTokenValid(); |
| | | if (IsValidToken && !UserInfo.Current.IsTipedInvalidToken) |
| | | { |
| | | UserInfo.Current.IsTipedInvalidToken = true; |
| | | UserInfo.Current.SaveUserInfo(); |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | try |
| | | { |
| | | new PublicAssmebly().TipOptionMsg(StringId.Tip, StringId.TokenInvalidTipMsg, StringId.OfflineControl, StringId.GoLogin, () => |
| | | { |
| | | HDLCommon.Current.Logout(); |
| | | }); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | MainPage.Log("Error", $"提示登录凭证窗口加载异常:{ex.StackTrace}"); |
| | | } |
| | | }); |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | MainPage.Log("Error", $"更新登录凭证方法调用异常:{ex.StackTrace}"); |
| | | } |
| | | } |
| | | } |
| | | }) |
| | |
| | | { |
| | | lock (FunctionList.List.securities) |
| | | { |
| | | try |
| | | { |
| | | var pack = Ins.HttpRequest.GetSecurityList(); |
| | | if (pack.Code == StateCode.SUCCESS) |
| | | { |
| | |
| | | foreach (var function in packList) |
| | | { |
| | | sidList.Add(function.sid); |
| | | } |
| | | if (sidList.Count == 0) |
| | | { |
| | | return; |
| | | } |
| | | var infoListPack = Ins.httpRequest.GetSecurityInfo(sidList, new List<string>()); |
| | | var infoList = JsonConvert.DeserializeObject<List<SecurityAlarm>>(infoListPack.Data.ToString()); |
| | |
| | | MainPage.Log($"读取安防列表失败:Code:{pack.Code}; Msg:{pack.message}"); |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | MainPage.Log("Error", $"读取安防列表失败:Code:{ex.StackTrace}"); |
| | | } |
| | | } |
| | | } |
| | | |
| | | /// <summary> |