0
절대 URL에서 200 개의 이미지를 다운로드하고 격리 된 저장소에 저장했습니다. 내 목록이나 스택 패널 하나 하나씩 표시하고 싶습니다. 다운로드가 완료되고 고립 된 저장소에 200 번째 이미지가 저장 될 때까지 스택 패널에 심볼로드를 표시하고 싶습니다.격리 된 저장소에서 저장소 프로세스가 완료 될 때까지 기호로드가 필요합니다.
if (h < 150)
{
WebClient m_webClient = new WebClient();
Uri m_uri = new Uri("http://d1mu9ule1cy7bp.cloudfront.net/2012/media/catalogues/47/pages/p_" + h + "/IKEA_mobile_high.jpg");
m_webClient.OpenReadCompleted += new OpenReadCompletedEventHandler(webClient_OpenReadCompleted);
m_webClient.OpenReadAsync(m_uri);
}
}
void webClient_OpenReadCompleted(object sender, OpenReadCompletedEventArgs e)
{
int count;
try
{
Stream stream = e.Result;
byte[] buffer = new byte[1024];
using (IsolatedStorageFile isf = IsolatedStorageFile.GetUserStoreForApplication())
{
//isf.Remove();
using (System.IO.IsolatedStorage.IsolatedStorageFileStream isfs = new IsolatedStorageFileStream("IMAGES" + loop2(k) + ".jpg", FileMode.Create, isf))
{
count = 0;
while (0 < (count = stream.Read(buffer, 0, buffer.Length)))
{
isfs.Write(buffer, 0, count);
}
stream.Close();
isfs.Close();
}
}
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString());
}
GetImages();
}
}
} 당신이해야 할 모든 단순히 ProgressBar
를 추가 한 후이 오랫동안 실행중인 작업의 진행 상황을 보여주는 경우
귀하의 질문은 무엇입니까? –
격리 된 저장소에 모든 이미지가 다운로드 될 때까지 진행률 표시 줄을 표시하고 내 페이지에서 완료된 다운로드 프로세스의 백분율을 표시하려고합니다. 위에 표시된 코드로 이미지를 다운로드했습니다. –