public void GetImage(string url)
 {
     var imageDownload = new ImageRequest(url);
     imageDownload.DownloadCompleted += ImageDownloadDownloadCompleted;
     imageDownload.DownloadFailed += imageDownload_DownloadFailed;
     GlobalVariables.WorkerImage.AddDownload(imageDownload);
 }
 public void GetImage(string url)
 {
     //if (isLoading) return;
     if (ImageSource != null) return;
     var imageDownload = new ImageRequest(url);
     imageDownload.DownloadCompleted += ImageDownloadDownloadCompleted;
     imageDownload.DownloadFailed += imageDownload_DownloadFailed;
     GlobalVariables.WorkerImage.AddDownload(imageDownload);
     //isLoading = true;
 }
 protected override void OnNavigatedTo(NavigationEventArgs e)
 {
     base.OnNavigatedTo(e);
     string url;
     if (NavigationContext.QueryString.TryGetValue("url", out url))
     {
         var imageRequest = new ImageRequest(url);
         imageRequest.DownloadCompleted += (image) =>
         {
             Dispatcher.BeginInvoke(() =>
             {
                 ImageContainer.Source = image;
             });
         };
         GlobalVariables.WorkerImage.AddDownload(imageRequest);
     }
 }
 protected override void OnNavigatedTo(NavigationEventArgs e)
 {
     base.OnNavigatedTo(e);
     string url;
     if (NavigationContext.QueryString.TryGetValue("url", out url))
     {
         var imageRequest = new ImageRequest(url);
         imageRequest.DownloadCompleted += (image) => Dispatcher.BeginInvoke(() =>
         {
             ImageContainer.Source = image;
             SaveEditingLockscreen(image);
             Dispatcher.BeginInvoke(() =>
                                        {
                                            Loading.Visibility = Visibility.Collapsed;
                                        });
             _canPress = true;
         });
         GlobalVariables.WorkerImage.AddDownload(imageRequest);
     }
 }
示例#5
0
 public void AddDownload(ImageRequest request)
 {
     ListsJobs.Add(request);
     count++;
 }