Example #1
0
        /// <summary>
        /// 下载云端MD5文件与本地MD5对比
        /// </summary>
        /// <param name="ResClass"></param>
        /// <param name="processEvent">如果不是AR的AB,那么久需要直接下载,这里是AB包下载进度回调</param>
        /// <param name="aBMD5CallBack">MD5下载完成后的回调,会将结果传回去</param>
        /// <param name="isHasRecog"></param>
        public void ABMD5Request(string ResClass, ABProcessEvent processEvent, ABMD5CallBack aBMD5CallBack = null, bool isHasRecog = false)
        {
            OneABClassInfo oldClassInfo = SerializeHelper.FromJson <OneABClassInfo>(FileHelper.ReadTxtToStr(GetSavePathByClass(ResClass, false)));

            AddDownload(ResClass, true, ABDataHolder.Instance.GetMD5DownURL() + ResClass + "Info.txt");
            DownManager.Instance.StartDownABMD5(ABClassDownInfo.Allocate(ResClass,
                                                                         ABDataHolder.Instance.GetMD5DownURL() + ResClass + "Info.txt",
                                                                         GetSavePathByClass(ResClass, true), true, aBMD5CallBack, ABMD5ResultCallback, processEvent, oldClassInfo, isHasRecog));
        }
Example #2
0
 public void OnRecycled()
 {
     IsRecycled     = true;
     ResClass       = "";
     ABMD5Callback  = null;
     ABprocessevent = null;
     oldClassInfo   = null;
     newClassInfo   = null;
     NeedDownList   = null;
     IsDownFinish   = false;
     CurSize        = 0;
     totalSize      = 0;
     allprocess     = 0;
 }
Example #3
0
        public static ABClassDownInfo Allocate(string ResClass, string m_srcUrl, string m_savePath, bool isMD5File,
                                               ABMD5CallBack aBMD5CallBack, ABMD5CallBack aBMD5CallBackLocal, ABProcessEvent ABprocessevent,
                                               OneABClassInfo OldABClassinfo = null, bool isHasRecog = false)
        {
            ABClassDownInfo aBDownInfo = SafeObjectPool <ABClassDownInfo> .Instance.Allocate();

            aBDownInfo.ResClass           = ResClass;
            aBDownInfo.oldClassInfo       = OldABClassinfo;
            aBDownInfo.isHasRecog         = isHasRecog;
            aBDownInfo.m_srcUrl           = m_srcUrl;
            aBDownInfo.m_savePath         = m_savePath;
            aBDownInfo.isMD5File          = isMD5File;
            aBDownInfo.ABMD5Callback      = aBMD5CallBack;
            aBDownInfo.ABMD5CallbackLocal = aBMD5CallBackLocal;
            aBDownInfo.ABprocessevent     = ABprocessevent;
            return(aBDownInfo);
        }
Example #4
0
 public void UpdateProductAB(string ResClass, ABProcessEvent processEvent)
 {
     //因为有语言的切换,因此这里要重新赋值
     mABDownInfo[ResClass].ABprocessevent = processEvent;
     DownClassAB(ResClass);
 }