Ejemplo n.º 1
0
        private void GotoSlide(int index)
        {
            var tuple = FindSlideByIndex(index);

            SongBackground bg;

            if (tuple != null)
            {
                bg = song.Backgrounds[tuple.Item1.BackgroundIndex];
            }
            else if (index == 0)             // first (blank) slide
            {
                bg = song.Backgrounds[song.FirstSlide != null ? song.FirstSlide.BackgroundIndex : 0];
            }
            else             // last (blank) slide
            {
                bg = song.Backgrounds[song.LastSlide != null ? song.LastSlide.BackgroundIndex : 0];
            }

            if (tuple != null)
            {
                controller.GotoSlide(tuple.Item2, tuple.Item3);
            }
            else
            {
                controller.GotoBlankSlide(bg);
            }

            if (videoBackground == null)             // only change backgrounds if we're not using a video background
            {
                nextBackground = SongBackgroundToImageSourceConverter.CreateBackgroundSource(bg);
            }
        }
Ejemplo n.º 2
0
        protected override ImageSource CreateIcon()
        {
            // TODO: use SongStorage's method to get an icon?

            SongMedia s = (SongMedia)this.Data;

            return(SongBackgroundToImageSourceConverter.CreateBackgroundSource(s.Song.Backgrounds[0], 22));
        }