| | |
| | | var connectMode = GetHttpConnectMode(checkAuthority);
|
| | | //获取从接口那里取到的比特数据
|
| | | var byteData = GettByteResponsePack(RequestName, connectMode, obj);
|
| | | if (byteData == null && setAgain == true)
|
| | | if (byteData == null)
|
| | | {
|
| | | if (setAgain == false)
|
| | | {
|
| | | //当前无法访问网络
|
| | | ShowNotNetMsg(listNotShowError);
|
| | | ShowNotNetMsg(RequestName, listNotShowError);
|
| | | return false;
|
| | | }
|
| | | byteData = ResetByteRequestHttps(RequestName, checkAuthority, obj);
|
| | |
| | | if (setAgain == false)
|
| | | {
|
| | | //当前无法访问网络
|
| | | ShowNotNetMsg(listNotShowError);
|
| | | ShowNotNetMsg(RequestName, listNotShowError);
|
| | | return "Error";
|
| | | }
|
| | | byteData = ResetByteRequestHttps(RequestName, checkAuthority, obj);
|
| | |
| | | if (setAgain == false)
|
| | | {
|
| | | //当前无法访问网络
|
| | | ShowNotNetMsg(listNotShowError);
|
| | | ShowNotNetMsg(RequestName, listNotShowError);
|
| | | return null;
|
| | | }
|
| | | byteData = ResetByteRequestHttps(RequestName, checkAuthority, obj);
|
| | |
| | | if (setAgain == false)
|
| | | {
|
| | | //当前无法访问网络
|
| | | ShowNotNetMsg(listNotShowError);
|
| | | ShowNotNetMsg(RequestName, listNotShowError);
|
| | | return null;
|
| | | }
|
| | | revertObj = ResetByteRequestHttps(RequestName, checkAuthority, obj);
|
| | |
| | | if (count == 3)
|
| | | {
|
| | | //显示没有网络的Msg
|
| | | ShowNotNetMsg(null);
|
| | | ShowNotNetMsg(RequestName, null);
|
| | | break;
|
| | | }
|
| | | }
|
| | |
| | | /// <summary>
|
| | | /// 显示没有网络的Msg
|
| | | /// </summary>
|
| | | private static void ShowNotNetMsg(List<string> listNotShowError)
|
| | | private static void ShowNotNetMsg(string RequestName, List<string> listNotShowError)
|
| | | {
|
| | | if (listNotShowError != null && listNotShowError.Contains("NotCheck") == true)
|
| | | {
|
| | | //不检测
|
| | | return;
|
| | | }
|
| | | //HdlLogLogic.Current.WriteLog(-1, "当前无网络连接:" + RequestName);
|
| | |
|
| | | HdlThreadLogic.Current.RunMain(() =>
|
| | | {
|
| | | // 当前无网络连接,请确认网络
|
| | |
| | | #endregion
|
| | |
|
| | | #region ■ 刷新本地缓存_______________________
|
| | |
|
| | | /// <summary>
|
| | | /// 刷新本地所有缓存
|
| | | /// 刷新本地所有缓存(目前此方法只提供给恢复备份数据使用)
|
| | | /// </summary>
|
| | | public static void RefreshAllMemory()
|
| | | {
|
| | | //刷新住宅对象
|
| | | RefreshHomeObject();
|
| | | //根据模板文件,恢复数据
|
| | | TemplateData.TemplateCommonLogic.Current.RecoverDataByTemplateBinFile();
|
| | | //强制生成设备和网关文件
|
| | | TemplateData.TemplateCommonLogic.Current.CreatDeviceAndGatewayFileFromMemoryByForce();
|
| | | //刷新本地网关文件
|
| | | HdlGatewayLogic.Current.ReFreshByLocal();
|
| | | //刷新本地设备
|
| | |
| | | //刷新APP前一次选择的网关ID(可以反复调用,需要在网关初始化完了之后才能调用)
|
| | | HdlGatewayLogic.Current.RefreshAppOldSelectGatewayId();
|
| | |
|
| | | //加载模板缓存
|
| | | //TemplateData.TemplateCommonLogic.Current.LoadLocalTemplateMemoryData();
|
| | |
|
| | | //0:已经同步过,不需要同步,这个时候需要提示备份
|
| | | if (result == 0 && ShowPrompted == true)
|
| | | {
|
| | |
| | | HdlRoomLogic.Current.RefreshAllRoomByLocation();
|
| | | //刷新左边刷新房间视图列表
|
| | | HdlRoomLogic.Current.RefreshRoomListView();
|
| | | //加载模板缓存
|
| | | //TemplateData.TemplateCommonLogic.Current.LoadLocalTemplateMemoryData();
|
| | | }
|
| | |
|
| | | /// <summary>
|