예제 #1
0
        void Current_PictureAddedToQueue(PictureDownload sender)
        {
            if (pictureStatusList.ContainsKey(sender)) return;

            this.Invoke((Action)delegate
            {
                PictureStatus ps = new PictureStatus();
                flpDownloads.Controls.Add(ps);
                ps.Dock = DockStyle.Top;

                pictureStatusList.Add(sender, ps);

                ps.SetPicture(sender);
            });
        }
예제 #2
0
        void Current_PictureAddedToQueue(PictureDownload sender)
        {
            if (pictureStatusList.ContainsKey(sender))
            {
                return;
            }

            this.Invoke((Action) delegate
            {
                PictureStatus ps = new PictureStatus();
                flpDownloads.Controls.Add(ps);
                ps.Dock = DockStyle.Top;

                pictureStatusList.Add(sender, ps);

                ps.SetPicture(sender);
            });
        }
예제 #3
0
        void Current_PictureRemovedFromQueue(PictureDownload sender)
        {
            lock (pictureStatusList)
            {
                if (!pictureStatusList.ContainsKey(sender))
                {
                    return;
                }

                this.Invoke((Action) delegate
                {
                    PictureStatus ps = pictureStatusList[sender];

                    ps.UnhookEvents();
                    flpDownloads.Controls.Remove(ps);

                    pictureStatusList.Remove(sender);
                });
            }
        }