using System;
using System.Windows.Media.Media3D;
using System.IO;
using System.Windows.Controls;
using System.Collections.Generic;
using System.ComponentModel;
namespace Ded.Cdtek.Gui.Flow
{
    [TypeConverter()]
    public class FlowVisual3D : ModelVisual3D
    {
        #region Fields
        private readonly List<Cover> coverList = new List<Cover>();
        private DirectoryInfo imageDir;
        private Slider slider;
        //private int currentIndex = 0;
        #endregion
        public FlowVisual3D(DirectoryInfo imageDir, Slider slider)
        {
            this.imageDir = imageDir;
            this.slider = slider;
            int imageCount = 0;
            foreach (FileInfo image in imageDir.GetFiles("*.jpg"))
            {
                var cover = new Cover(image.FullName, imageCount++);
                Children.Add(cover);
                coverList.Add(cover);
            }
        }
        public FlowVisual3D()
        {
        }
        public DirectoryInfo ImageDir
        {
            get { return imageDir; }
        }
        public string ImagePath
        {
            get { return imageDir.FullName; }
            set { imageDir = new DirectoryInfo(value); }
        }
    }
}
