public void InitPictureView(ClassPictureDetailInfo pDetail) { m_strImageFolderName = pDetail.ClassType[0].Class_Img_Folder; stackPanel1.Children.Clear(); for (int i = 0; i < pDetail.ClassType.Count; i++) { string filePath = string.Empty; if (pDetail.ClassType[i].Class_File_Type == 0) { //filePath = "ImageFile/" + pDetail.ClassType[i].Class_File_Name; filePath = pDetail.ClassType[i].Class_File_Name; WebDownloader.GetInstance().DownloadFile(filePath, PictureDownloadComplete, this); } else if (pDetail.ClassType[i].Class_File_Type == 2) { //filePath = "ImageFile/" + pDetail.ClassType[i].Class_Video_Title; string[] strVideoTitles = new string[] { "" }; string[] stringSeparators = new string[] { "||" }; strVideoTitles = pDetail.ClassType[i].Class_Video_Title.Split(stringSeparators, StringSplitOptions.RemoveEmptyEntries); for (int j = 0; j < strVideoTitles.Length; j++) { //filePath = "VideoFile/" + strVideoTitles[j]; filePath = strVideoTitles[j]; WebDownloader.GetInstance().DownloadFile(filePath, PictureDownloadComplete, this); } } //WebDownloader.GetInstance().DownloadFile(filePath, PictureDownloadComplete, this); } }
public void InitPictureView(ClassPictureDetailInfo pDetail) { stackPanel1.Children.Clear(); WebDownloader.GetInstance().CancelDownload(this); for (int i = 0; i < pDetail.ClassType.Count; i++) { string filePath = "ImageFile/" + pDetail.ClassType[i].Class_File_Name; WebDownloader.GetInstance().DownloadFile(filePath, PictureDownloadComplete, this); } }