private void ReportProgress(ChitraKiAlbumAurVivaran obj) { foundImageCount = (foundImageCount + obj.ImageDirTotalImages); //TODO : write here invoke required and invoke to display images found count on form //if(InvokeRequired) // Invoke(new Action(() => label13.Text = foundImageCount.ToString() + " images found")); AllImages.Add(obj); }
private void ShowGallerySelectionImages(ChitraKiAlbumAurVivaran obj) { imglist.Clear(); CreateImageList(obj); imglist.LargeImageList = imgs; foreach (var item in obj.PeerImages) { // image key is the image sleected from imagelist collection, key must present in imagelist above imglist.Items.Add(item.ImageName, item.ImageKey); imglist.Show(); } imgs.Images.Add(obj.ImageKey, Image.FromFile(obj.ImageFullName).GetThumbnailImage(200, 200, null, IntPtr.Zero)); imgs.ImageSize = new Size(200, 200); imglist.Items.Add(obj.ImageName, obj.ImageKey); imglist.Show(); }
private void CreateImageList(ChitraKiAlbumAurVivaran obj) { imgs.ImageSize = new Size(200, 200); imgs.ColorDepth = ColorDepth.Depth32Bit; List <Image> images = new List <Image>(); foreach (var item in obj.PeerImages) { using (Image im = Image.FromFile(item.ImageFullName)) { //images.Add(); var imtemp = ResizeImage(im, 200, 200); imgs.Images.Add(item.ImageKey, imtemp); //im.Dispose();// = null; } } }
private void ShowDirectory(ChitraKiAlbumAurVivaran obj) { Button btn = (new Button() { Text = obj.ImageDirName + " (" + obj.ImageDirTotalImages + ")", TextImageRelation = TextImageRelation.ImageBeforeText, Size = new Size(120, 52), AutoSizeMode = AutoSizeMode.GrowAndShrink, TextAlign = ContentAlignment.MiddleLeft, FlatStyle = FlatStyle.Popup, BackColor = Color.White, Image = new Bitmap("..\\..\\..\\pics\\vst.png"), ImageAlign = ContentAlignment.TopLeft, Tag = obj }); btn.Click += DirectoryButtonClick; folder_list.Controls.Add(btn); }