private void OnResDownloadSuccess(byte[] pBytes)
    {
        GameMain.DispatcherEvent(CommonEvents.UpdateCheckVersionProgress, 0f, GameMain.Instance.GetText(5));
        string zipPath = AppConst.GetTmpPath("tmp.zip");

        File.WriteAllBytes(zipPath, pBytes);
        m_TotalProgressHandler += OnTotalProgressHandler;
        m_TotalFinishHandler   += OnTotalFinishHandler;
        FZipUtil.UnzipAsync(zipPath, AppConst.LOCAL_DOWNLOAD_PATH, m_TotalProgressHandler, m_TotalFinishHandler);
    }
Example #2
0
        public bool OnTotalProgress(long done, long total)
        {
            bool result = true;
            TotalProgressHandler handler = TotalProgress;

            if (handler != null)
            {
                handler(this, done, total);
            }
            return(true);
        }
 private void OnTotalFinishHandler(object sender, bool successed)
 {
     m_TotalProgressHandler -= OnTotalProgressHandler;
     m_TotalFinishHandler   -= OnTotalFinishHandler;
     Target.GetFSM().ChangeState(MainState_LoadDll.Instance);
 }