Some suggestions

Jan 3, 2010 at 10:51 AM
Edited Jan 3, 2010 at 1:19 PM

Hi there, yesterday I started playing with Slide.Show 2 and it is very good, keep up the good work.

Having said that I have 2 questions:

  1. Is it possible to display the number of items in an album when in album view? Like total number of pictures and videos?
  2. Does Slide.Show support nested albums? I would like to put my videos in a subfolder like this:

album "Africa"
    pic1
    pic2
    subalbum "Videos"
         vid1
         vid2

album "Europe"
    pic1
    pic2
    subalbum "Videos"
         vid1
         vid2

etc...

EDIT: i for now solved the first point. Since I use the XML data provider i have altered the ParseAlbums method in XmlDataProvider.cs to count the number of pictures and videos using the album.Slides collection like this:

note that this code is the most basic and needs aditional file type support, for me it does the trick ;)

private Album[] ParseAlbums(XmlReader reader, string dataTransition)
{
	List<Album> albums = new List<Album>();
         int pictureCount = 0;
         int videoCount = 0;

	while (reader.Read())
	{
		if (reader.IsStartElement() && reader.Name == "album")
		{
                    	pictureCount = 0;
                    	videoCount = 0;

	                  Album album = new Album();
         	           	album.Title = reader.GetAttribute("title");
			album.Description = reader.GetAttribute("description")
			album.Thumbnail = GetSource(reader);
                    	album.Slides = ParseSlides(reader.ReadSubtree(), reader.GetAttribute("transition") ?? dataTransition);

                    	foreach (Slide slide in album.Slides)
                    	{
                        		if (slide.Source.ToString().ToLower().EndsWith(".jpg"))
                            		++pictureCount;
                        		else
                            		++videoCount;
                    	}

                    	album.Description += "\r\n" + String.Format("({0} foto's, {1} video's)", pictureCount, videoCount);
                    	albums.Add(album);
 		}
	}
	return albums.ToArray();
}