protected override void Thread_Looping() { base.Thread_Looping(); if (resourceURLListEnumerator.MoveNext() && relativePathListEnumerator.MoveNext()) { URLWithCDN urlTemp = resourceURLListEnumerator.Current; string relativePath = relativePathListEnumerator.Current; if (urlTemp == null) { return; } if (urlTemp.IsLocal) { connection = new LocalConnect(urlTemp.ToString(), Global.Instance.CombineFullPath(downloadPath.URL, relativePath)); } else { connection = new HttpConnect(urlTemp.ToString(), Global.Instance.CombineFullPath(downloadPath.URL, relativePath), string.Empty); } connection.DownloadResource(delegate(bool result, object log) { AppendMissionLog(log); if (result) { urlSucceedNumber++; } else { urlFailedNumber++; } SetMissionProgress((urlSumNumber == 0) ? (0) : ((urlFailedNumber + urlSucceedNumber) / ((float)urlSumNumber))); }); } else { EndMissionThread(); } }
protected override void Thread_Looping() { base.Thread_Looping(); if (resourceURLListEnumerator.MoveNext()) { URLWithCDN urlTemp = resourceURLListEnumerator.Current; if (urlTemp == null) { return; } if (urlTemp.IsLocal) { connection = new LocalConnect(urlTemp.ToString()); } else { connection = new HttpConnect(urlTemp.ToString()); } connection.CheckResource(delegate(bool result, object log) { AppendMissionLog(log); if (result) { urlSucceedNumber++; } else { urlFailedNumber++; } SetMissionProgress((urlSumNumber == 0) ? (0) : ((urlFailedNumber + urlSucceedNumber) / ((float)urlSumNumber))); }); } else { EndMissionThread(); } }