Example #1
0
            public static bool UnZipFileAsync(UpdateObjectVector _owner, string _appname, string _source, string _destination, Action <string> _finished, Action <float> _progress)
            {
                if (sUnZipMap.ContainsKey(_source))
                {
                    DLog.LogError("有相同文件正在解压当中.source = " + _source);
                    return(false);
                }
                UnZipTask ttaskunzip = new UnZipTask(_owner, _appname, _source, _destination, _finished, _progress);
                bool      tstart     = ttaskunzip.StartUnZipAsync();

                if (!tstart)
                {
                    ttaskunzip.Dispose();
                }
                return(tstart);
            }
Example #2
0
        static public void UnZipFileAsync(string _appname, string _source, string _destination, Action <string> _finished, Action <float> _progress)
        {
            if (sInstance == null)
            {
                CreatInstance();
            }
            string tdeleappname = GameCore.GetDelegateAppName(_finished);

            if (!string.IsNullOrEmpty(tdeleappname))
            {
                _appname = tdeleappname;
            }
            if (UnZipTask.UnZipFileAsync(sInstance.UpdateList, _appname, _source, _destination, _finished, _progress))
            {
                sInstance.SetActive(true);
            }
        }