예제 #1
0
 public void RefreshPicture(PictureClass prev)
 {
     if (prev != null)
     {
         picture.Left = prev.picture.Left + prev.picture.Width + 4;
     }
     else
     {
         picture.Left = 0;
     }
     picture.Invalidate();
 }
예제 #2
0
        public void AddNewPicture(Control parent, MemoryStream stream)
        {
            var pcc = new PictureClass();

            this.Parent = parent;
            pcc.NewPicture(parent, stream);
            pcc.Width = width;
            pcc.SetLeft(left);
            pcc.ResizeToHeight();
            left += pcc.Width + 4;
            pictures.Add(pcc);
        }
예제 #3
0
        public void RefreshList(int start, int end)
        {
            PictureClass prev = null;
            int          n    = 0;

            foreach (var pc in pictures)
            {
                if ((n >= start) && (n <= end))
                {
                    pc.RefreshPicture(prev);
                    pc.SetVisible(true);
                    prev = pc;
                }
                else
                {
                    pc.SetVisible(false);
                }
                n++;
            }
        }