private void ItemOnImageLoaded(ImageControl obj)
 {
     ImageLoadingPool.Remove(obj);
     if (ImageWaitForLoadingPool.Any())
     {
         var item = ImageWaitForLoadingPool[0];
         ImageWaitForLoadingPool.Remove(item);
         ImageLoadingPool.Add(item);
         item.ImageLoadEnd += ItemOnImageLoaded;
         var unused = item.LoadImageAndDetailTask();
     }
 }
 public void AddImages(MoeItems imgs)
 {
     foreach (var img in imgs)
     {
         var itemCtrl = new ImageControl(Settings, img);
         itemCtrl.DownloadButton.Click    += (sender, args) => { ImageItemDownloadButtonClicked?.Invoke(itemCtrl.ImageItem, itemCtrl.PreviewImage.Source); };
         itemCtrl.PreviewButton.Click     += (sender, args) => { MoeItemPreviewButtonClicked?.Invoke(itemCtrl.ImageItem, itemCtrl.PreviewImage.Source); };
         itemCtrl.MouseEnter              += (sender, args) => MouseOnImageControl = itemCtrl;
         itemCtrl.ImageCheckBox.Checked   += (sender, args) => SelectedImageControls.Add(itemCtrl);
         itemCtrl.ImageCheckBox.Unchecked += (sender, args) => SelectedImageControls.Remove(itemCtrl);
         ImageItemsWrapPanel.Children.Add(itemCtrl);
         itemCtrl.Sb("ShowSb").Begin();
         if (ImageLoadingPool.Count < Settings.MaxOnLoadingImageCount)
         {
             ImageLoadingPool.Add(itemCtrl);
         }
         else
         {
             ImageWaitForLoadingPool.Add(itemCtrl);
         }
         itemCtrl.MouseRightButtonUp += ItemCtrlOnMouseRightButtonUp;
     }
 }