Esempio n. 1
0
        /// <summary>
        /// Creates a new MangaViewModel
        /// </summary>
        /// <param name="manga">Manga</param>
        /// <param name="item_height"></param>
        /// <param name="speed"></param>
        public MangaViewModel(Manga manga, int item_height, decimal speed)
        {
            item_height_ = item_height;
            speed_ = speed;
            manga_ = manga;
            slides_ = new PagedList<SlideViewModel>();

            int item = 0;
            foreach (var slide in manga_.Slides)
            {
                int page = item / kItemsPerPage;
                item++;
                slides_.Add(page, new SlideViewModel(slide, item_height_));
            }

            slides_.Update(0);
        }