private void StartDownLoadTask(string taskName, WebUrlLocalPath paths, Action <string> simpleTaskFinish) { HFLog.L(taskName + "被创建了"); this.currentTaskName = taskName; this.currentPath = paths; this.simpleTaskFinish = simpleTaskFinish; Start(); }
private void DownLoadFile(WebUrlLocalPath path) { StartDownLoadTask("Task" + currentTaskIndex, path, delegate(string taskName) { HFLog.L("单个下载完成"); if (currentTaskIndex < taskCount - 1) { if (progress != null) { progress((currentTaskIndex + 1.0f) / taskCount); } currentTaskIndex++; DownLoadFile(allTaskPath[currentTaskIndex]); } else { progress(1); DownLoadManager.Instance.currentDownLoadCount--; HFLog.L("所有下载队列下载完成"); } }); }