Exemplo n.º 1
0
        //下载成功时
        private void DownloadSuccess()
        {
            string tmp = _currentConfig.localPath_url + ".tmp";

            if (File.Exists(tmp))
            {
                if (File.Exists(_currentConfig.localPath_url))
                {
                    File.Delete(_currentConfig.localPath_url);
                }
                File.Move(tmp, _currentConfig.localPath_url);
            }
            //将这个文件从下载中移除
            _md5File.PopTmpFile(_currentConfig.key);
            //下载完成 更新md5
            _md5File.UpdateLocalMd5File(_currentConfig.key);
            OneComplete(new SDownloadEventResult(DownloadEventType.OneComplete, _currentConfig));
        }