Esempio n. 1
0
        // METHODS
        private void GetViewerCarouselImageList(string path)
        {
            try
            {
                ImageList ilist = new ImageList();
                CarouselImageCollection icollect = ViewerCarousel.ImageListCollection;
                ViewerCarousel.ImageSlides = true;
                ViewerCarousel.UseOriginalImageinPreview = true;
                string[] images = Directory.GetFiles(path);
                FilePath = path;
                foreach (string i in images)
                {
                    string p = Path.GetFileNameWithoutExtension(i);
                    Bitmap b = new Bitmap(i);
                    b.Tag = p;
                    CarouselImage c = new CarouselImage();
                    c.ItemImage = b;
                    ilist.Images.Add(b);
                    icollect.Add(c);
                }

                ViewerCarousel.ImageList = ilist;
            }
            catch (Exception ex)
            {
                new Error(ex).ShowDialog();
            }
        }
Esempio n. 2
0
        private void GetAppropriationCarouselImageList(string path)
        {
            try
            {
                ImageList ilist = new ImageList();
                CarouselImageCollection icollect = AppropriationCarousel.ImageListCollection;
                AppropriationCarousel.ImageSlides = true;
                AppropriationCarousel.UseOriginalImageinPreview = true;
                string[] images = Directory.GetFiles(path);
                foreach (string i in images)
                {
                    Bitmap b = new Bitmap(i);
                    b.Tag = i;
                    CarouselImage c = new CarouselImage();
                    c.ItemImage = b;
                    ilist.Images.Add(b);
                    icollect.Add(c);
                }

                AppropriationCarousel.ImageList = ilist;
            }
            catch (Exception e)
            {
                new Error(e).ShowDialog();
            }
        }
Esempio n. 3
0
        // METHODS
        private void GetFunctionCarouselImageList(string path)
        {
            ImageList ilist = new ImageList();
            CarouselImageCollection icollect = FunctionCarousel.ImageListCollection;

            FunctionCarousel.ImageSlides = true;
            FunctionCarousel.UseOriginalImageinPreview = true;
            string[] images = Directory.GetFiles(path);
            foreach (string i in images)
            {
                string p = Path.GetFileNameWithoutExtension(i);
                Bitmap b = new Bitmap(i);
                b.Tag = p;
                CarouselImage c = new CarouselImage();
                c.ItemImage = b;
                ilist.Images.Add(b);
                icollect.Add(c);
            }

            FunctionCarousel.ImageList = ilist;
        }