示例#1
0
        /// <summary>
        /// Clear the palette... remove all removable thumbnails
        /// </summary>
        public void Clear()
        {
            // Just build a new list and swap it out
            Bitmaps.Clear();

            if (myThumbnails.Count > 0)
            {
                SelectItem(myThumbnails[0]);
            }
            else
            {
                mySelectedThumbnail = null;
            }
        }
示例#2
0
        private void InitData(string id)
        {
            Bitmaps.Clear();
            BitmapsIndex = 0;
            string dir   = PathHelper.GetScreenShotDir(id);
            var    files = Directory.GetFiles(dir, "*.jpg");

            if (files.Length > 0)
            {
                for (int i = 0; i < files.Length; i++)
                {
                    Bitmaps.Add(i, new Bitmap(files[i]));
                }
                PicPreview.Image = Bitmaps[0];
            }
        }