Beispiel #1
0
        public void AddImage(Snapshot rec, Image img)
        {
            ImagePanel imagePanel = new ImagePanel();

            imagePanel.SetImage(rec, img);
            ImagePanel.Controls.Add(imagePanel);
            aList.Add(rec.FrameNumber);
            BuildList();
            if (rec.FrameNumber > (int)aList[aList.Count - 1])
            {
                return;
            }
            if (rec.FrameNumber < (int)aList[0])
            {
                ImagePanel.Controls.SetChildIndex(imagePanel, 0);
            }
            else
            {
                for (int newIndex = 0; newIndex < aList.Count - 1; ++newIndex)
                {
                    if ((int)aList[newIndex] == rec.FrameNumber)
                    {
                        ImagePanel.Controls.SetChildIndex(imagePanel, newIndex);
                        break;
                    }
                }
                Application.DoEvents();
            }
        }
Beispiel #2
0
        public void LoadSnaphots()
        {
            bool b = false;

            if (Global.IsRights(Global.RightsProfile, UserRights.EXPORT))
            {
                b = true;
            }
            ImagePanel.Controls.Clear();
            using (RPM_Snapshot rpmSnapshot = new RPM_Snapshot())
            {
                List <Snapshot> snapshots = rpmSnapshot.GetSnapshots(this.FileID);
                if (snapshots.Count <= 0)
                {
                    return;
                }
                foreach (Snapshot rec in snapshots)
                {
                    ImagePanel imagePanel = new ImagePanel();
                    Image      image      = Utilities.ByteArrayToImage(rec.Thumbnail);
                    imagePanel.CanExport(b);
                    if (Global.IsRedact && Global.IsRights(Global.RightsProfile, UserRights.REDACT))
                    {
                        imagePanel.IsRedact(true);
                    }
                    imagePanel.SetImage(rec, image);
                    ImagePanel.Controls.Add(imagePanel);
                }
            }
        }